Menu ▾ ▴

#22 Set data breakpoints

open
nobody
None
2026-10-15
2026-10-15
No

BREAKPOINTS lists data breakpoints set by hand in the IDE (address $<addr> ... watching <expr>), and BREAKSET/BREAKDELETE work on them by number, but there is no command to create one. BREAK only sets source breakpoints.

The ToolsAPI has IOTADebuggerServices.NewAddressBreakpoint(Address, Length, AccessType, AProcess) with TOTAAccessType = (atRead, atWrite, atExecute), declared in the ToolsAPI.pas of Delphi 7, 2007 and 13 alike; Delphi 13 also has an overload taking a TOTAAddress (2007 does not; the versions in between were not checked). Whether it works in each version has not been measured; NewSourceBreakpoint is declared in Delphi 7 too and fails there.

Open questions:

  • The IDE's own Add Data Breakpoint dialog takes an expression and keeps it (IOTAAddressBreakpoint.DataExpr). NewAddressBreakpoint takes only an address, and GxInspect has no command that evaluates an expression, so the command would take an address and a length to begin with. Whether an expression can be passed on, and whether a breakpoint created by address is re-evaluated when the process restarts, is not known.
  • The address and the length need a process; what the call does without one, or with a length the CPU's debug registers cannot watch, is not known.
  • The ToolsAPI comment says the call creates a source breakpoint when the address is on a line boundary. That is about code addresses (atExecute); for data it presumably does not apply, but that is not measured either.

Discussion


Log in to post a comment.