This is the mail archive of the gdb-prs@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug breakpoints/10645] Watchpoints on unreadable memory need no singlestepping


------- Additional Comments From dragos dot tatulea at gmail dot com  2010-07-26 21:03 -------
This patch: http://sourceware.org/ml/gdb-patches/2009-11/msg00429.html seems to 
change the behavior of watching an invalid area. Here's what happens now: 

GNU gdb (GDB) 7.0.50.20100131-cvs
Copyright (C) 2010 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-unknown-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /media/a/gdb/bugzilla/10645/simple...done.
(gdb) start
Temporary breakpoint 1 at 0x400478: file simple.c, line 4.
Starting program: /media/a/gdb/bugzilla/10645/simple 

Temporary breakpoint 1, main () at simple.c:4
4         i = 1;
(gdb) set debug infrun 1
(gdb) watch *p
Hardware watchpoint 2: *p
(gdb) c
Continuing.
infrun: clear_proceed_status_thread (process 13517)
infrun: proceed (addr=0xffffffffffffffff, signal=144, step=0)
infrun: resume (step=0, signal=0), trap_expected=0
infrun: wait_for_inferior (treat_exec_as_sigtrap=0)
infrun: target_wait (-1, status) =
infrun:   13517 [process 13517],
infrun:   status->kind = stopped, signal = SIGTRAP
infrun: infwait_normal_state
infrun: TARGET_WAITKIND_STOPPED
infrun: stop_pc = 0x400498
infrun: stopped by watchpoint
infrun: stopped data address = 0x600840
infrun: BPSTAT_WHAT_STOP_NOISY
infrun: stop_stepping
Hardware watchpoint 2: *p

Old value = <unreadable>
New value = -443987883
main () at simple.c:7
7         return 0;

There's no single stepping anymore (at least for this particular case). Need to 
investigate why.

-- 


http://sourceware.org/bugzilla/show_bug.cgi?id=10645

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]