[fpc-devel] bounty: FPC based debugger

Martin lazarus at mfriebe.de
Mon Sep 12 14:17:30 CEST 2011


On 12/09/2011 13:11, Jonas Maebe wrote:
>
> On 12 Sep 2011, at 12:23, Martin wrote:
>
>> The big issue, is that gdb often scopes them wrong, and you loose the 
>> watch point before you it triggers
>
> If you use an expression in a watch point, gdb will reevaluate that 
> expression if a value used in the watch expression changes.
>
> Since in general you don't want that, you can take the address of the 
> watched value once when the watchpoint is enabled and then put a 
> watchpoint on that calculated address (similar to what Martin 
> Schreiber said).

Yes, I know that, and done that too.

BTW, another issue with watchpoint is, that gdb 9latest tested with 7.2, 
need to test 7.3) warns you to late => actually applies to any 
breakpoint that can not be set)

If you have more watchpoints than gdb can set (or any other breakpoint 
fails the following happens (depends on gdbn version)

[gdb paused]
- inserting watch abnd breakpoints]
- send step or run command
[ gdb will print warnings / not error]
[gdb will step or partly step]
- send step or run command again
[gdb will give an error, about the watch/breakpoints]

on that first partly step, something could have happen to the watched 
value...

I need to see if that is fixed in gdb 7.3





More information about the fpc-devel mailing list