home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #1 / NN_1993_1.iso / spool / gnu / gdb / bug / 1344 next >
Encoding:
Text File  |  1993-01-05  |  1.5 KB  |  61 lines

  1. Newsgroups: gnu.gdb.bug
  2. Path: sparky!uunet!zaphod.mps.ohio-state.edu!cis.ohio-state.edu!wrc.xerox.COM!leisner
  3. From: leisner@wrc.xerox.COM ( Marty Leisner)
  4. Subject: setting watchpoints
  5. Message-ID: <1993Jan4.144553.9104@spectrum.xerox.com>
  6. Sender: gnulists@ai.mit.edu
  7. Reply-To: leisner@eso.mc.xerox.com
  8. Organization: Xerox
  9. Distribution: gnu
  10. Date: Mon, 4 Jan 1993 14:45:53 GMT
  11. Approved: bug-gdb@prep.ai.mit.edu
  12. Lines: 47
  13.  
  14. I have a simple program:
  15. int i;
  16.  
  17. main()
  18. {
  19.         for(i = 0; i < 100; i++)
  20.                 ;
  21. }
  22.  
  23. It seems I can't set access I until after the program runs (its using dynamic
  24. libraries) ??
  25.  
  26. Also, it doesn't seem to stop at my watchpoint...accept when I give it an
  27. interrupt signal (then the program is at the watchpoint):
  28.  
  29. (gdb) watch i=50
  30. Cannot access memory at address 0x40b8.
  31. (gdb) break main
  32. Breakpoint 1 at 0x229c: file main.c, line 6.
  33. (gdb) run
  34. Starting program: /files1/accounts/leisner/tmp/main 
  35.  
  36. Breakpoint 1, main () at main.c:6
  37. 6               for(i = 0; i < 100; i++)
  38. (gdb) watch i=50
  39. Watchpoint 2: i = 50
  40. (gdb) info watchpoints
  41. Num Type           Disp Enb Address    What
  42. 1   breakpoint     keep y   0x0000229c in main at main.c:6
  43. 2   watchpoint     keep y   i = 50
  44. (gdb) cont
  45. Continuing.
  46. ^C
  47. Program received signal 2, Interrupt
  48. 0x22a8 in main () at main.c:6
  49. 6               for(i = 0; i < 100; i++)
  50. (gdb) p i
  51. $1 = 50
  52.  
  53. I only entered a signal after a significant amount of time (maybe 30 seconds?)
  54.  
  55.  
  56. --
  57. marty
  58. leisner.henr801c@xerox.com  leisner@eso.mc.xerox.com
  59. Member of the League for Programming Freedom
  60.  
  61.