[Lazarus] Issuing debug commands from the ide.
lazarus at mfriebe.de
Fri Jun 1 20:52:12 CEST 2012
On 01/06/2012 19:37, Benito van der Zander wrote:
>> I already pointed out, how easy you can upset the IDE-to-gdb
>> interface, if you issue the wrong command.
> You said that, but I have never seen it happen.
But then, it is fair to say you are experienced with gdb.
There are also lots of people starting on lazarus, who have not even
heard of gdb.
> Althought gdb crashes sometime randomly, even without running own
> And running arbitrary commands is not special, there are other things
> that upset gdb, just as well.
> function TEST: integer;
> while true do ;
> Evaluate TEST() and the debugging is broken, until you call "reset
I know. currently you can trigger function evaluation, even though
nothing is ready to deal with.
I already have code, that parses expressions, and might in future
prevent function calling.
> And that might happen with all evaluations, just as likely as if you
> run direct commands.
Yes, or trying to modify an ansistring => boom
I didn't say that the debugger was perfect.
That is no reason to add more pitfalls.
Anyway, we both have our points. And it doesn't seem to change.
>> Feel free to provide it as an installable package.
> Can a plugin even send commands to the debugger, if that define is not
That part of the interface can be added permanently.
The idea s to spilt the debugger and have packages.
Then an interface would be created.
But the relevant parts of the interface can be added and published as
soon as someone provides them
> And then you have the package, a new Lazarus version appears, and it
> doesn't work anymore...
>> Though one question:
>> I can see how you can (technically) change this while the debugger is
>> But isn't that to late. If your app crashes without that, and you
>> already started the debugger. Then would it not crash?
> If the first breakpoint is hit, all threads are stopped anyways.
> Only single stepping causes a problem
Yes. I read up.
BTW what about "thread apply" in gdb?
>> Anyway if we have a list of such options, then they can be added as
>> feature request.
> They could.
> But why maintain another list of options, if gdb already knows its
Because it is more user friendly, than having to goggle gdb and type
some commandline style stuff...
More information about the Lazarus