pascaldragon at googlemail.com
Fri Mar 27 14:53:58 CET 2015
Am 27.03.2015 14:17 schrieb "Joost van der Sluis" <joost at cnoc.nl>:
> On 03/27/2015 01:45 PM, JuuS wrote:
>> procedure BreakIf( b : Boolean );
>> if b then
>> INT 3 <======debugger would then stop here
>> and one could then F8 step to the offending
>> routine based on the boolean condition passed
>> I believe this is windows specific (?) and I'm now working on Linux
>> The question is:
>> This does not work in Linux and I wonder if there is a similar way to
>> achieve this in Linux environment?
> Wow.. that's a nasty trick....
> And it should still work, also on Linux.
> But I think that debuggers nowadays are more clever, they detect that the
breakpoint is actually self-inflicted, and so they decide to continue.
After all: the developer can have it's reasons to call this interrupt, and
the debugger should not influence normal execution.
This might be true on an embedded system, but if you run any of the normal
OSes where you can't modify interrupt handlers anyway then on x86(_64) INT
3 (or $CC) /always/ means breakpoint. And from experience I know that both
GDB and WinDBG respect these as they should.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Lazarus