ObjAsm
Search…
⌃K

Debugging

ObjAsm provides a macro based debug system that can output information to some devices. Depending on the configuration, the output can be directed to a window (DebugCenter), a console window or to a file. This is activated using the DEBUG keyword in the SysSetup macro indicating in brackets WND, CON or LOG respectively.
SysSetup OOP, WIN64, WIDE_STRING, DEBUG(WND)
Additional keywords can be specified to activate special features like:
  • INFO: displays additional information
  • TRACE: activates method tracing (required for DbgTraceObject and DbgTraceShow)
  • RESGUARD: activates the API monitoring (32-bit)
  • STKGUARD: activates the stack protection system (32-bit)
  • TIMESTAMP: displays time information
  • "name": specifies the DebugCenter child window name.

Macros

All macros directs the output to the “DestWnd” window.

Strings

  • DbgLine "DestWnd": displays a separation line
  • DbgText, "Text", "DestWnd": displays a given text
  • DbgWarning "Text", "DestWnd": displays a given text using the red color
  • DbgStr pStr, "DestWnd": displays a string pointed to by the first argument

Integer numbers

These macros display variables (register or symbols, max. 64 bits) followed by an additional information string.
  • DbgBin Variable, "Info", "DestWnd": displays the content of variable in binary format
  • DbgDec Variable, "Info", "DestWnd": displays the content of variable in decimal format
  • DbgHex Variable, "Info", "DestWnd": displays the content of variable in hexadecimal format

Floating point numbers

This macro displays the content of real4 and real8 variables.
  • DbgFloat Variable, "Info", "DestWnd": displays the content of variable in scientific notation

GUID numbers

  • DbgFloat Variable, "Info", "DestWnd": displays the content of variable in scientific notation.

Bitmaps

  • DbgBmp hBmp, "DestWnd": displays the bitmap referred to by hBmp (only possible using DebugCenter)

Memory

  • DbgGlobalMemUsage "Info", "DestWnd": displays the status of global memory
  • DbgMem pMem, Size, format, "Info", "DestWnd": displays the content of the memory block pointed to by pMem
The output format can be specified with one of the following constants:
  1. 1.
    DBG_MEM_STR,
  2. 2.
    DBG_MEM_UI8, DBG_MEM_UI16, DBG_MEM_UI32,
  3. 3.
    DBG_MEM_I8, DBG_MEM_I16, DBG_MEM_I32,
  4. 4.
    DBG_MEM_R4, DBG_MEM_R8

Hardware

  • DbgFPU "Info", "DestWnd": displays the complete status of the FPU

API

  • DbgApiError "Info", "DestWnd": displays API error status that can be retrieved using the GetLastError API
  • DbgComError dError, "Info", "DestWnd": displays COM error based on the dError value

Object

  • DbgObject Instance::Class, "Info", "DestWnd": displays the content of all members of the given object instance
  • DbgTraceObject Instance / DbgTraceShow Class, "Info", "DestWnd": displays how many times the methods of a specific object instance were called and the number of CPU cycles it took to execute. Tracing is limited to only one object instance!

Helpers

  • Fix "Text": echoes a message to the compilation output device
  • ASSERT Argument, "Info", "DestWnd": Displays a message if the argument value is FALSE
  • DbgClearAll: Clears the output device.