Feature suggestion: location conditioned watchpoint
Martin Simmons
qqxnjvamvxwx@dyxyl.com
Sat Oct 19 13:19:08 GMT 2024
>>>>> On Sat, 19 Oct 2024 09:35:40 +0200, Etienne Buira via Gdb said:
>
> I tried to debug memory corruption issue with gdb, using watchpoints,
> and as the bug appeared rarely, i wish i could state "break on this
> memloc write, if it is not this known good location".
>
> I searched the docs for conditions and convenience variables, but could
> not find anything useful.
>
> Ideally, i would like to issue a command like:
> condition WPNUM !(location path/to/myfile.c:42)
>
> If there is already a way to do this, i'd like to hear about it, or
> please consider it as feature suggestion.
You could use a condition like:
$pc != <some_address>
where <some_address> is the address of the instruction that changes the
location.
__Martin
More information about the Gdb
mailing list