Re: Tracking a variable in gdb

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi John,

On Tue, 1 Oct 2013 02:00:41 -0500
"John J. Boyer" <john.boyer@xxxxxxxxxxxxxxxxx> 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 .

_______________________________________________
Blinux-list mailing list
Blinux-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/blinux-list





[Index of Archives]     [Linux Speakup]     [Fedora]     [Linux Kernel]     [Yosemite News]     [Big List of Linux Books]