Re: gdb behaviour change under software watchpoints?

Luis Machado via Gdb <[email protected]>
Newsgroups gmane.comp.gdb.devel
Message-ID <[email protected]>
On 4/24/25 17:54, K via Gdb 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.

qemu should know how do do hardware breakpoints. Do you have some logging output
from when the watchpoint gets set until gdb runs until the program exits?
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.