UAE Debugging Tool Version 3.4 Beta3

THIS SOFTWARE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. THE AUTHOR DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES.
UAEDT is not in the public domain, I reserve all rights to it. You may freely distribute copies of the Standard edition or Trial version as long as you do so in an unmodified form and include all files and documentation that are present in the original archive. You may not charge for the distribution of UAEDT other than a reasonable fee to cover your distribution costs.

 

Author
Harald-René Flasch
mailto:hfr@hfrmobile.com
http://www.hfrmobile.com

 

Contents
Info
Menu
CDbgLog
History

What is UAEDT?

UAEDT (UAE Debugging Tool) is not just an "Debug Monitor". UAEDT also provides stress tests, database manipulations and other useful things for testing your applications.

Be careful in using some features of UAE Debugging Tool!


Menu

"!"

Error Lookup

Display error message from a given error number. CAUTION: Not all Windows CE based devices will contain the system message table resources. This is a selectable part of the Windows CE operating system and is often removed to conserve space. In this case you'll receive the error 317: "The system cannot find message for message number 0x%1 in message file for %2".

OK: error lookup
X, Close: close the dialog

Calculator

Calculator for calculating values from/to dec, hex, oct and binary values.

>>: change base
OK: calculate
X, Close: close the dialog

Database

Available since UAEDT 3.1 it is possible to manipulate databases. If you are using these features be very careful!

List all
Display all databases available on the device.

List records
Lists all records in the specified database. Specify a database as follows:

  • Use !|Database|List all
  • Select the line with the database
  • Use !|Database|List records
  • Delete database
    Deletes the whole specified database (see List records). This menu item is only available if a database is selected.

    Delete record
    Deletes the specified record in a database. This menu item is only available if a database and a record is selected.

    Processes

    Since UAEDT 3.3 it is possible to enumerate and kill processes. Be careful if you use the "Processes" features!

    List all
    Enumerates all running processes.

    Terminate process
    Terminates the current selected process. If no process is selected this menu item will not be available.

    Windows

    Since UAEDT 3.3 it is possible to enumerate and manipulate windows by their handles. Be careful if you use the "Windows" features!

    List all
    Enumerates all windows (visible and non-visible windows).

    Close window
    Sends WM_CLOSE to the current selected window. If no window is selected this menu item will not be available.

    System

    Since UAEDT 3.3 it is possible to enumerate and manipulate windows by their handles. Be careful if you use the "Windows" features!

    LoadLibrary
    Available since Version 3.4! Trys to load a library (DLL) using the LoadLibrary API function. Writes the result of the operation into the debug monitor. Can be used to verify if a given library is a valid CE library or not.

    DMProcessConfigXML
    Available since Version 3.4! Used to test XML configurations. Only works for WM2003 and later.
    Examples can be found in DMProcessConfigXMLSamples.txt which is located in the application directory of UAEDT.

    Exit

    Closes the UAE Debugging Tool.

    Stress

    The Stress/UAE features only show you how your system reacts if there are problems. Be careful....!

    Loop

    A simple loop. you can specify the parameters for this loop in Setup|Loop. Be careful if using this feature. As long as the loop is not finished UAE Debugging Tool keeps inactive.

    Loop WM_TIMER

    Similar to Loop but UAE Debugging Tool keeps active. Good for testing your application if there is bad system performance. The loop can be aborted with the Abort Loop WM_TIMER menu item.

    UAE

    The UAE features will show you the behavior of your system in some cases like 'endless loop of an application', 'access violation' and more.... I was surprised how Windows CE reacts in some cases....

    Monitor

    If you like to trace information from your application to the UAEDT monitor you have to start UAEDT before launching the application (your application) to debug!

    Entry from Buffer

    For internal use. This command is executed if you use the C++ class CDbgLog from your application in order to write debugging information to UAE Debugging Tool window.

    View Line

    Displays the current selected line.

    Mark Block

    Marks a { } block. Nested blocks are also considered. The current selected line has to be a "name {" or "} name" line otherwise this menu item is disabled.

    Unmark Lines

    Deselects all selected lines.

    Clear

    Empty Debug Monitor. See also Setup|Options... menu item.

    Reset nested calls

    Sets the internal nested call counter (to handle indent for nested called functions) to zero.  See also Setup|Options... menu item.

    Setup

    Configures common options for UAEDT.

    Options

    Ask before close UAEDT
    Asks before you can close the UAEDT application.

    Ask before reset nested calls
    Asks before the internal nested calls counter is reset. You should use this option because you do not often reset the internal "indent counter".

    Ask before clear monitor content
    Asks before the monitor content is reset. May you do not use this option when you often reset the monitor content.

    Adjust monitor if showing IME
    If this option is enabled the size of the debug monitor window is adjusted when the input panel is displayed.

    Loop

    Configures the Loop stress tests.

    Default values for Loop:
      Count=100
      Delay=500
    Default values for Loop (WM_TIMER):
      Count=100
      Delay=200
      Timer=500

    Tested under Windows CE 2.11, Aero 1520, MIPS

    Monitor

    Configures the UAEDT debug monitor.

    Log to file
    Writes the information to the specified log file.

    Indent characters
    With this option you specify the characters which are used to make indents for nested calls. Default value are two spaces.

    Quick Draw
    If this option is enabled the debug monitor does not scroll to the if a line is added. For database tests you should enable this option. If you are writing from your applications (using CDbgLog class) to the debug monitor it practical to disable this option.

    Database

    Configures some options for the database features. See also menu item !|Database.

    Security twice confirmation
    Asks before deleting a database or record using the exact data which is applied to delete data. It is highly recommended to enable this option.

    Max. line length
    Specifies the maximal length of a line written to the debug monitor if using the database features. This is useful because some lines might be very long e.g. if you working with the e-mail database.

    Be careful in using some features of UAE Debugging Tool!


    CDbgLog

    You can use the C++ class CDbgLog in order to write debugging information to the UAEDT monitor.

    You can find the CDbgLog class in the application directory in DBGLOGLIBCE.ZIP (which contains the library and the CDbgLog class). This class is distributed as static library with MFC support. This library was created using eMbedded Visual C++ 3.0.

    You just have to include the DbgLogInterface.h header file (e.g. in your stdafx.h file). The correct library will be linked automatically.

    ctor

    CDbgLog::CDbgLog(LPCTSTR lpStr);
    Writes lpStr to the UAEDT window using the correct format (e.g. CDbgLog dbg(L"CMyApp::CMyApp()") -->  'CMyApp::CMyApp() {') for displaying nested calls.

    dtor

    CDbgLog::~CDbgLog();
    Writes the string provided by the ctor to the UAEDT window using the correct format (e.g. CDbgLog dbg(L"CMyApp::CMyApp()") -->  '} CMyApp::CMyApp()' or '} CMyApp::CMyApp() (return info)') for displaying nested calls. See also SetReturn() method.

    public methods

    void Log(LPCTSTR lpStr);
    Writes lpStr to the UAEDT window using the correct format.


    void LogInt(LPCTSTR lpFormat, int n);
    Writes the integer value n to the UAEDT window using the format string lpFormat. (e.g. dbg.Log(L"m_nValue=%02d", m_nValue);)


    void SetReturn(LPCTSTR lpStrRet);
    Sets information which is displayed by the dtor. This method has an LPCTSTR parameter in order to keep generic. (e.g. dbg.SetReturn(L"TRUE"); -->  '} CMyApp::CMyApp() (TRUE)'). See also dtor.


    public member variables

    static bool m_fOutputDebugStringAPI;
    Defines if the Log????() methods also should write information via OutputDebugString() to a debugger. This is useful if you debug your application with a desktop debugger.


    Samples

    // CDbgLog, LogInt() sample
    void CMyDlg::DbgMembers()
    {
      CDbgLog dbg(L"CMyDlg::DbgMembers()");

      dbg.LogInt(L"m_x=%d", m_x);
      dbg.LogInt(L"m_y=%d", m_y);
    }

    // CDbgLog, SetReturn() sample
    bool MyFunc()
    {
      CDbgLog dbg(L"MyFunc()");

      if (!fOK)
      {
       dbg.SetReturn(L"false");
       return false;
      }

      dbg.SetReturn(L"true");
      return true;
    }

    Remarks
    Do not write only CDbgLog(L"MyFunc()") because this will cause the dtor called immediately. This causes incorrect display of nested calls of methods or functions. Always use a variable e.g. dbg as shown in the samples above.


    History

    Version Description
    3.4 Beta3
    • Solved Enum Processes problem on WM5 devices
    • Improved SIP handling
    • DMProcessConfigXML works fine now
    3.4 Beta2
    • Applied hfrmobile style guide
    • Improved help
    • Landscape support
    • Database: Supporting (datetime) type
    • Added DMProcessConfigXML (WM2003 or later only)
    • Added LoadLibrary test
    3.3
    • moved from hfrweb to hfrmobile
    • DBGLOGLIB Version 2.1c (added x86 Emulator support)
    • Improved help
    • Look & Feel
    • Fixed calculator bug
    • Fixed selection bug (if selected A and B and de-selected A, A was used)
    • Improved ErrorLookup dialog
    • Added "enum/terminate processes" feature
    • Added "enum/close windows" features
    • Improved help
    • Improved menu
    3.2
    • DBGLOGLIB Version 2.1
    • added support for Palm-size PC: SH3
    • added support for Pocket PC: MIPS, ARM and SH3
    • added support for H/PC Pro: MIPS, ARM, SH3 and SH4
    3.1
    • database manipulations
    • QScroll mode
    • general options
    • reset indent for nested calls
    • set indent characters
    3.0
    • CDbgLog C++ class also writes debugging information to debugger running on the desktop machine.
      Info: The information written to the debugger on the desktop machine is not displayed nested like in UAEDT debug monitor.
    • improved help for the CDbgLog C++ class
    • Error Lookup
    • log file
    • ask before closing UAEDT
    • added Calculator
    • CDbgLog Version 1.02
    2.0
    • added Mark block feature
    • added Unmark Lines menu item
    • added DBGLOGLIBCE.ZIP (contains the CDbgLog C++ class as static library for MIPS, SH3 and x86 emulation)
    • released on HFRWEB
    1.03
    • disable "Clear" menu item if there are no items to remove
    • CDbgLog class!!!
    • improved help
    • renamed .cab file (UAEDT)
    • release for HFRWEB (really...!)
    1.01
    • ready for release on HFRWEB
    • DbgLog now works!
    • improved help
    • new page title for help
    • index button disabled
    • improved menu
    • start/stop WM_TIMER loop
    1.0
    • first release for HFRWEB
    • added stress features
    • added help
    0.9.1
    • first tests with access violation; div by 0 endless loop and stack overflow