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/10557] HW watchpoints silently degrade into SW ones


------- Additional Comments From ppluzhnikov at google dot com  2010-08-25 21:33 -------
(In reply to comment #3)
> I don't see evidence of degeneration into single-stepping:

Except the time it takes for the watchpoint to fire is unreasonable.

> It appears to me the target is continuously reporting that something
> is writing to the address you are watching,

Except when the WP fires, I get this:

Old value = <unreadable>
New value = 0
main () at t.c:13
13              *ip = i;
(gdb) p ip
$2 = (int *) 0x8f7ff0

(gdb) p $1
$3 = (int *) 0x90e3f0

So the memory was inaccessible, and just became accessible, but hasn't been
written to in a loop. I believe this proves your theory incorrect.

It I set 'awatch', here is what I observe:


gcc -g t.c -DLIMIT=100000 && /usr/bin/time gdb64-cvs -q -ex run -ex 'up 2' -ex
'print ip' -ex 'awatch *$1' -ex 'run'  ./a.out
Reading symbols from /tmp/pr10557/a.out...done.

Program received signal SIGABRT, Aborted.
0x00007ffff7ab0095 in raise () from /lib/libc.so.6
#2  0x000000000040051e in main () at t.c:15
15                abort();
$1 = (int *) 0x90e3f0
Hardware access (read/write) watchpoint 1: *$1
Hardware access (read/write) watchpoint 1: *$1

Value = <unreadable>
Hardware access (read/write) watchpoint 1: *$1

Value = <unreadable>
0x00007ffff7a9bf3d in ?? () from /lib/libc.so.6
(gdb) c
Hardware access (read/write) watchpoint 1: *$1

Value = <unreadable>
Hardware access (read/write) watchpoint 1: *$1

Value = <unreadable>
0x00007ffff7de9628 in ?? () from /lib64/ld-linux-x86-64.so.2
(gdb) c
Hardware access (read/write) watchpoint 1: *$1

Value = <unreadable>
Hardware access (read/write) watchpoint 1: *$1

Value = <unreadable>
0x00007ffff7de9628 in ?? () from /lib64/ld-linux-x86-64.so.2
(gdb) c
Hardware access (read/write) watchpoint 1: *$1

Value = <unreadable>
Hardware access (read/write) watchpoint 1: *$1

Value = <unreadable>
0x00007ffff7ab3325 in __cxa_atexit () from /lib/libc.so.6
(gdb) c
Hardware access (read/write) watchpoint 1: *$1

Value = <unreadable>
Hardware access (read/write) watchpoint 1: *$1

Value = <unreadable>
0x00007ffff7ab3371 in __cxa_atexit () from /lib/libc.so.6
(gdb) c
Hardware access (read/write) watchpoint 1: *$1

Value = <unreadable>
Hardware access (read/write) watchpoint 1: *$1

Value = <unreadable>
0x0000000000400562 in __libc_csu_init ()


Looks like *something* is single-stepping :-(


-- 


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

------- 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]