[Lazarus] Issuing debug commands from the ide.

Martin lazarus at mfriebe.de
Fri Jun 1 15:08:19 CEST 2012


I was wondering, when I saw the log that you posted on mantis.... I saw 
breakpoints in the debugger code ....

On 01/06/2012 13:45, Ludo Brands wrote:
> Hi,
>
> I made a small patch for lazarus that allows to issue debugger commands in
> the Evaluate/Modify window. Commands are entered as an expression starting
> with a '>' character. For example evaluating'>x/20x $sp' will show you the
> 20 first values on the stack. When entering debug commands the result area
> is not cleared but the commands issued and their results are appended to the
> existing result, just as in a console gdb session.
Have you tried to compile the IDE with DBG_WITH_DEBUGGER_DEBUG
  defined?

It does exactly the above. It has been there a very long time.

It has also been decided, that this feature will only be available via 
this define.
Reason: This is mainly for people who wish to debug/experiment with the 
debugger. And it also requires knowledge of both: gdb and how the IDE 
deals with gdb.

If in this command window you execute statements, that run the exe 
("-exec-continue" / "c") then the  IDE looses sync, and your debug 
session is gone. Even if you change the stackframe or thread, you can 
get wrong results....
Fixing all this will only make the ide code more complex and harder to 
maintain.


> The same syntax can also be used in a watch expression when using the
> default style. The command will then be executed at every step or breakpoint
> hit and the result shown in the watch window. The one line output in the
> watch window limits of course what you can display.
>
> If anybody is interested in this, I'll submit it to mantis.
>
Not sure of the use of that?
What data do you want to display?






More information about the Lazarus mailing list