Mervine, Keith wrote:
Greetings,
        Is there a way to watch a particular piece of the ch->pcdata
structure in GDB?

I have a var that changes but I cant find where it is being changed.....

ch->pcdata->bail


(gdb) break char_update
(gdb) run 4000
Breakpoint 1, char_update () at update.c:613
613         ch_quit     = NULL;
(gdb) display ch->name
1: ch->name = 0x90900047 <Address 0x90900047 out of bounds>
(gdb) next
616         save_number++;
1: ch->name = 0x90900047 <Address 0x90900047 out of bounds>
(gdb) next
618         if (save_number > 29)
1: ch->name = 0x90900047 <Address 0x90900047 out of bounds>
(gdb) next
621         for ( ch = char_list; ch != NULL; ch = ch_next )
1: ch->name = 0x90900047 <Address 0x90900047 out of bounds>
(gdb) next
626             ch_next = ch->next;
1: ch->name = 0x86da10dd "wolf"
(gdb)

The DISPLAY command will cause GDB to display the contents of the variable in question before printing the command prompt every time. To turn it off, UNDISPLAY # (where # is the number to the left of the variable display you want to turn off.


Any help would be helpful.

Hope that helps. I haven't messed with mud code in a couple of years, but still read this list for nostalga.


--
Unsolicited Commercial Email sent to this account will
be reviewed at the rate of $500 US Dollars per item.
Unsolicited Commercial Email requiring HTML conversion
will be subject to an additional $50 charge per item.

Details available at http://users.pokynet.com/~thriell/tos.html

Join The Coalition Against Unsolicited Commercial Email (CAUCE)
at http://www.cauce.org

Visit my web site: http://users.pokynet.com/~thriell



Reply via email to