Modules/debug

From MSX Game Library

Revision as of 15:22, 5 May 2024 by Aoineko (talk | contribs) (Created page with "{{MODULE |name=debug |category=Tool |image= |dependency1= |dependency2= |dependency3= |sample1= |sample1_desc= |sample2= |sample2_desc= |sample3= |sample3_desc= |sample4= |sam...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

< Modules

debug

Code: debug.h

Category: Tool

Dependencies: None

Samples: None yet

The debug module offers features to create interaction between a running program and a debug device (generally, an emulator) to help programmers to debug their program.

Usage

To use this module, include "debug.h" in your source code, and add "debug" to the modules list (LibModules) in your project's configuration file (project_config.js).


Samples

See module use cases in the sample programs: None yet

Settings

Library configuration (msxgl_config.h):

// Debugger and profiler options
// - DEBUG_DISABLE ................ No debug or profile feature
// - DEBUG_EMULICIOUS ............. Debug features for Emulicious
// - DEBUG_OPENMSX ................ Debug features for openMSX using 'debugdevice' extension
// - DEBUG_OPENMSX_P .............. Debug features for openMSX using PVM script (tools/script/openMSX/debugger_pvm.tcl)
// - DEBUG_OPENMSX_G .............. Profiler features for openMSX using Grauw script (tools/script/openMSX/profiler_grauw.tcl)
// - DEBUG_OPENMSX_S .............. Profiler features for openMSX using Salutte script (tools/script/openMSX/profiler_salutte.tcl)
#define DEBUG_TOOL					DEBUG_DISABLE
#define PROFILE_LEVEL				10

When DEBUG_TOOL is set to DEBUG_OPENMSX_P, you also need to setup additionnal emulator command line in your project configuration (project_config.js):

//-- Emulator extra parameters to be add to command-line (string). Emulator sotfware specific
EmulExtraParam= `-script ${ToolsDir}script/openMSX/debugger_pvm.tcl`;

When DEBUG_TOOL is set to DEBUG_OPENMSX_G, you also need to setup additionnal emulator command line in your project configuration (project_config.js):

//-- Emulator extra parameters to be add to command-line (string). Emulator sotfware specific
EmulExtraParam= `-script ${ToolsDir}script/openMSX/profiler_grauw.tcl`;

When DEBUG_TOOL is set to DEBUG_OPENMSX_S, you also need to setup additionnal emulator command line in your project configuration (project_config.js):

//-- Emulator extra parameters to be add to command-line (string). Emulator sotfware specific
EmulExtraParam= `-script ${ToolsDir}script/openMSX/profiler_salute.tcl`;

Dependencies

Dependency on other modules: None

Documentation