Tracking a variable in gdb

Shlomi Fish shlomif at shlomifish.org
Tue Oct 1 18:53:56 UTC 2013


Hi John,

On Tue, 1 Oct 2013 02:00:41 -0500
"John J. Boyer" <john.boyer at abilitiessoft.com> wrote:

> What is the syntax for telling gdb to break when a variable changes? 
> I've read the manual, but I can't find this information.
> 

perhaps try adding a watchpoint:

http://sourceware.org/gdb/onlinedocs/gdb/Set-Watchpoints.html

Note that sometimes it is helpful to take the address of the variable and
watch its * expression, because this is more likely to be constant.
  
Hope it helps.

Regards,

	Shlomi Fish

-- 
-----------------------------------------------------------------
Shlomi Fish       http://www.shlomifish.org/
Rethinking CPAN - http://shlom.in/rethinking-cpan

CPAN thrives *because* of the unfettered uploading of shit, not in spite of it.
    — Andy Lester

Please reply to list if it's a mailing list post - http://shlom.in/reply .




More information about the Blinux-list mailing list