gdb behaviour change under software watchpoints?

K cq.personal@gmail.com
Fri Apr 25 14:15:40 GMT 2025


To be clear, I'm not reporting my own bug!
I'm pointing out some inconsistent behaviour of gdb and asking whether
it is a feature of software watchpoints or indeed watchpoint use in general.

On Thu, 24 Apr 2025 at 18:54, K <cq.personal@gmail.com> wrote:

> A bug in my software is revealed by a debug build which eventually calls
> abort(). gdb sees and reports this and I can do a backtrace and find a
> memory location I need to investigate.
> then I make a run with a watchpoint on said memory location which has to
> be software since it's a non-host binary running under qemu.
> not only does the watchpoint not get triggered despite ensuring binary is
> being loaded to the same address, but gdb only reports that the process has
> exitted with an error code - no memory to examine, no backtrace.
>
> the former is mysterious but the latter is annoying - is this behaviour
> necessitated by setting watchpoints?
> I have remote access to a machine of the target variety but I would ask
> first whether I can expect the behaviour to return to normal when using a
> hardware watchpoint. No point is going down a dead end...
> Thanks.
>
>
>


More information about the Gdb mailing list