Bug ID 1181478
Summary ptrace_singlestep breaks hardware breakpoints
Classification openSUSE
Product openSUSE Tumbleweed
Version Current
Hardware x86-64
OS Other
Status NEW
Severity Normal
Priority P5 - None
Component Development
Assignee screening-team-bugs@suse.de
Reporter tdevries@suse.com
QA Contact qa-bugs@suse.de
Found By ---
Blocker ---

[ Filed here upstream: https://sourceware.org/bugzilla/show_bug.cgi?id=27188 ]

Compile this (
https://sourceware.org/git?p=binutils-gdb.git;a=blob_plain;f=gdb/testsuite/gdb.base/gdb11531.c;hb=HEAD
)
...
$ gcc src/gdb/testsuite/gdb.base/gdb11531.c -g
...

And run this debug session:
...
$ gdb -batch a.out \
  -ex start \
  -ex "watch myrec.x" \
  -ex step
Temporary breakpoint 1 at 0x4010fa: file gdb11531.c, line 34.

Temporary breakpoint 1, main () at gdb11531.c:34
34        myrec.x = 5;
Hardware watchpoint 2: myrec.x
35        myrec.y = 3.4;
...

The hardware watchpoint doesn't trigger.  This problem occurs on factory, not
on leap 15.2.  

This is not related to debug info.  When replacing next with continue (such
that we use ptrace_cont instead of ptrace_singlestep), the hardware watchpoint
triggers. Also, when we disable hardware watchpoints using "set
can-use-hw-watchpoints 0" the watchpoint triggers.

So, the problem seems to be related to hardware watchpoints and
ptrace_singlestep.


You are receiving this mail because: