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 breakpoints/21870] aarch64: Leftover uncleared debug registers


https://sourceware.org/bugzilla/show_bug.cgi?id=21870

--- Comment #3 from Yao Qi <qiyao at gcc dot gnu.org> ---
(In reply to Jan Kratochvil from comment #0)
> Created attachment 10295 [details]
> .c standalone testcase
> 
> Testcase verifies if the debug registers are cleared after it is run.
> Standalone execution is OK but being spawned from GDB reports an error:
> 
> # ./gdb ~/aarch64-watchpoint
> GNU gdb (GDB) 8.0.50.20170731-git
> (gdb) run
> Starting program: /root/aarch64-watchpoint 
> aarch64-watchpoint: aarch64-watchpoint.c:91: set_watchpoint: Assertion
> `(((dreg_state.dbg_regs[0].ctrl) >> 5) & 0xff) == 0' failed.

I don't see how does GDB touches hw debug registers, in this case.  I have no
idea that why DR_CONTROL_LENGTH (dreg_state.dbg_regs[0].ctrl) is changed to
non-zero.

-- 
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]