public inbox for gdb-prs@sourceware.org help / color / mirror / Atom feed
From: "qiyao at gcc dot gnu.org" <sourceware-bugzilla@sourceware.org> To: gdb-prs@sourceware.org Subject: [Bug gdb/14959] Software watchpoint deleted when we have a call to @plt function Date: Fri, 14 Dec 2012 09:21:00 -0000 [thread overview] Message-ID: <bug-14959-4717-GtbIk8Qmjj@http.sourceware.org/bugzilla/> (raw) In-Reply-To: <bug-14959-4717@http.sourceware.org/bugzilla/> http://sourceware.org/bugzilla/show_bug.cgi?id=14959 Yao Qi <qiyao at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |qiyao at gcc dot gnu.org --- Comment #2 from Yao Qi <qiyao at gcc dot gnu.org> 2012-12-14 09:21:57 UTC --- Thanks for reporting this issue, and I can reproduce it in my box. As far as I can see, this problem is caused by doing single steps (to emulate the watchpoint without hardware support) to watch a local variable across a complicated functions call (such as plt resolver here). When software watchpoint is use, GDB will execute program one instruction per one time, and check whether the variable is changed. If the watchponit is for a local variable, GDB will also check whether program is running out of the "valid scope" of this local variable. In this case, when program is running through plt resolver, GDB is unable to know whether the current pc is still within the "valid scope" of this local variable, so GDB removes this watchpoint. I run out of ideas on how to fix it. Maybe someone else have. P.S. in other places of GDB, we reply on a 'step resume breakpoint' to step through plt resolver, instead of doing many single-steps in it. However, we can' do this in this case, because GDB has to single step every instruction in order not to miss memory changes. -- Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
next prev parent reply other threads:[~2012-12-14 9:21 UTC|newest] Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top 2012-12-14 8:12 [Bug gdb/14959] New: " karthikthecool at gmail dot com 2012-12-14 8:13 ` [Bug gdb/14959] " karthikthecool at gmail dot com 2012-12-14 9:21 ` qiyao at gcc dot gnu.org [this message] 2013-03-24 15:02 ` SztfG at yandex dot ru 2013-03-24 15:02 ` SztfG at yandex dot ru 2013-03-24 15:04 ` SztfG at yandex dot ru 2013-03-24 15:21 ` jan.kratochvil at redhat dot com 2013-03-25 12:23 ` SztfG at yandex dot ru 2013-03-25 12:30 ` jan.kratochvil at redhat dot com 2023-12-31 15:43 ` ssbssa at sourceware dot org 2024-01-01 5:57 ` jan at jankratochvil dot net
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=bug-14959-4717-GtbIk8Qmjj@http.sourceware.org/bugzilla/ \ --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).