🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

1 total messages Started by Marty Leisner Mon, 04 Jan 1993 14:45
setting watchpoints
#573
Author: Marty Leisner
Date: Mon, 04 Jan 1993 14:45
46 lines
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
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads