public inbox for gdb-prs@sourceware.org help / color / mirror / Atom feed
From: "pedro at codesourcery 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 22:37:00 -0000 [thread overview] Message-ID: <20100825223713.19652.qmail@sourceware.org> (raw) In-Reply-To: <20090824231914.10557.ppluzhnikov@google.com> ------- Additional Comments From pedro at codesourcery dot com 2010-08-25 22:37 ------- On Wednesday 25 August 2010 22:33:22, ppluzhnikov at google dot com wrote: > 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 actually does not. :-) See below. > It I set 'awatch', here is what I observe: Thanks. > 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> > 0x0000000000400562 in __libc_csu_init () > > > Looks like something is single-stepping :-( I don't think it is. Go back to using "watch", reenable "set debug infrun 1", and confirm whether see a stream of things like these: > infrun: TARGET_WAITKIND_STOPPED > infrun: stop_pc = 0x400507 > infrun: stopped by watchpoint > infrun: stopped data address = 0x7fffffffd9f0 > infrun: no stepping, continue > infrun: resume (step=0, signal=0), trap_expected=0 If you don't see "resume (step=1,...", then there's no single-stepping. "stopped by watchpoint" means that the target thinks the thread hit a watchpoint (because the debug registers claim so). But I now notice something: "0x7fffffffd9f0" is a suspicious address, and it does not look like 'i'. Is that a stack address? That might explain why does the access watchpoint cause a stop, only to then not be able to evaluate the expression (<unreadable>). I sounds like gdb thought it needed to set a watchpoint on &i to be able to watch your expression? -- 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.
next prev parent reply other threads:[~2010-08-25 22:37 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 2010-08-25 22:37 ` pedro at codesourcery dot com [this message] 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=20100825223713.19652.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: linkBe 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).