public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
From: "ppluzhnikov at google dot com" <sourceware-bugzilla@sourceware.org>
To: gdb-prs@sourceware.org
Subject: [Bug breakpoints/10557] HW watchpoints silently degrade into SW ones
Date: Wed, 25 Aug 2010 21:33:00 -0000	[thread overview]
Message-ID: <20100825213322.15265.qmail@sourceware.org> (raw)
In-Reply-To: <20090824231914.10557.ppluzhnikov@google.com>


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


  parent reply	other threads:[~2010-08-25 21:33 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-08-24 23:19 [Bug breakpoints/10557] New: " ppluzhnikov at google dot com
2010-08-14  2:47 ` [Bug breakpoints/10557] " pedro at codesourcery dot com
2010-08-25 20:17 ` ppluzhnikov at google dot com
2010-08-25 20:50 ` pedro at codesourcery dot com
2010-08-25 21:33 ` ppluzhnikov at google dot com [this message]
2010-08-25 22:37 ` pedro at codesourcery dot com
2010-08-25 23:02 ` ppluzhnikov at google dot com
2010-08-26  9:40 ` pedro at codesourcery dot com
2010-08-26 14:11 ` ppluzhnikov at google dot com
     [not found] <bug-10557-4717@http.sourceware.org/bugzilla/>
2014-09-12 22:14 ` sergiodj at redhat dot com
2024-01-07 13:33 ` ssbssa at sourceware dot org

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20100825213322.15265.qmail@sourceware.org \
    --to=sourceware-bugzilla@sourceware.org \
    --cc=gdb-prs@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).