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 gdb/14959] Software watchpoint deleted when we have a call to@plt function


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]