From: Luis Machado via Gdb <gdb@sourceware.org>
To: K <cq.personal@gmail.com>, gdb <gdb@sourceware.org>
Subject: Re: gdb behaviour change under software watchpoints?
Date: Fri, 25 Apr 2025 14:09:08 +0100 [thread overview]
Message-ID: <8b81ad7c-0866-40c9-a81a-db9a51326fef@arm.com> (raw)
In-Reply-To: <CACTzTFD4owqF2bvrG+oGiEGT2gM0bkhajR2L4cu1ajty4UU2VA@mail.gmail.com>
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?
next prev parent reply other threads:[~2025-04-25 13:16 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-24 16:54 K via Gdb
2025-04-25 13:09 ` Luis Machado via Gdb [this message]
2025-04-25 16:04 ` K via Gdb
2025-05-30 14:14 ` Luis Machado via Gdb
2025-04-25 14:15 ` K via Gdb
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=8b81ad7c-0866-40c9-a81a-db9a51326fef@arm.com \
--to=gdb@sourceware.org \
--cc=cq.personal@gmail.com \
--cc=luis.machado@arm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox