Article View: gnu.gdb.bug
Article #573setting watchpoints
From: Marty Leisner
Date: Mon, 04 Jan 1993 14:45
Date: Mon, 04 Jan 1993 14:45
46 lines
1598 bytes
1598 bytes
I have a simple program:
int i;
main()
{
for(i = 0; i < 100; i++)
;
}
It seems I can't set access I until after the program runs (its using dynamic
libraries) ??
Also, it doesn't seem to stop at my watchpoint...accept when I give it an
interrupt signal (then the program is at the watchpoint):
(gdb) watch i=50
Cannot access memory at address 0x40b8.
(gdb) break main
Breakpoint 1 at 0x229c: file main.c, line 6.
(gdb) run
Starting program: /files1/accounts/leisner/tmp/main
Breakpoint 1, main () at main.c:6
6 for(i = 0; i < 100; i++)
(gdb) watch i=50
Watchpoint 2: i = 50
(gdb) info watchpoints
Num Type Disp Enb Address What
1 breakpoint keep y 0x0000229c in main at main.c:6
2 watchpoint keep y i = 50
(gdb) cont
Continuing.
^C
Program received signal 2, Interrupt
0x22a8 in main () at main.c:6
6 for(i = 0; i < 100; i++)
(gdb) p i
$1 = 50
I only entered a signal after a significant amount of time (maybe 30 seconds?)
--
marty
leisner.henr801c@xerox.com leisner@eso.mc.xerox.com
Member of the League for Programming Freedom
Technical Details
Message-ID:
<1993Jan4.144553.9104@spectrum.xerox.com>Path:
arc1-ca.pugleaf.net!sparky!uunet!zaphod.mps.ohio-state.edu!cis.ohio-state.edu!wrc.xerox.COM!leisnerShow Full Headers
Complete Article Headers
Newsgroups: gnu.gdb.bug Path: arc1-ca.pugleaf.net!sparky!uunet!zaphod.mps.ohio-state.edu!cis.ohio-state.edu!wrc.xerox.COM!leisner From: leisner@wrc.xerox.COM ( Marty Leisner) Subject: setting watchpoints Message-ID: <1993Jan4.144553.9104@spectrum.xerox.com> Sender: gnulists@ai.mit.edu Reply-To: leisner@eso.mc.xerox.com Organization: Xerox Distribution: gnu Date: Mon, 4 Jan 1993 14:45:53 GMT Approved: bug-gdb@prep.ai.mit.edu Lines: 47