From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8064 invoked by alias); 14 Dec 2012 09:21:59 -0000 Received: (qmail 8043 invoked by uid 48); 14 Dec 2012 09:21:58 -0000 From: "qiyao at gcc dot gnu.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 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gdb X-Bugzilla-Component: gdb X-Bugzilla-Keywords: X-Bugzilla-Severity: critical X-Bugzilla-Who: qiyao at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: CC Message-ID: In-Reply-To: References: X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 Mailing-List: contact gdb-prs-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-prs-owner@sourceware.org X-SW-Source: 2012-q4/txt/msg00395.txt.bz2 http://sourceware.org/bugzilla/show_bug.cgi?id=14959 Yao Qi changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |qiyao at gcc dot gnu.org --- Comment #2 from Yao Qi 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.