Is it possible to support gdb command hbreak with target sim ?
Mike Frysinger
vapier@gentoo.org
Wed Jan 13 11:08:58 GMT 2021
On 13 Jan 2021 00:46, Mike Frysinger via Gdb wrote:
> On 29 Sep 2020 09:46, Andrew Burgess wrote:
> > * William Tambe via Gdb <gdb@sourceware.org> [2020-09-28 21:29:26 -0500]:
> > > Is it possible to support gdb command hbreak with target sim ?
> >
> > There's currently no support for hardware breakpoints in the simulator
> > target, instead only software breakpoints are supported where GDB
> > takes responsibility for reading and backing up the old memory
> > contents before writing in a software breakpoint instruction.
> >
> > This doesn't mean that hardware breakpoint support couldn't be added.
>
> this is a bit inaccurate. i guess "hardware breakpoints" are a bit
> confusing when talking about simulators. and depending on who you
> talk to, they might call them "watchpoints" rather than "breakpoints".
>
> there is a sim-watch module that some sim's support. looks like:
> avr bfin frv iq2000 m32r mips mn10300 moxie v850
>
> so if you're using one of those, it'd be something like:
> $ gdb <prog>
> (gdb) target sim --watch-pc-int 0x1234
> (gdb) load
> (gdb) run
>
> that said, it appears to have a few bugs. i'm not sure how well it's
> tested :). g'luck!
i've posted some fixes so things should work much better for gdb-11.
but to your original question, i don't think the sim target integrates
with gdb's "hbreak" command. i haven't looked at those codepaths in
quite sometime though tbh, and gdb has changed drastically since.
maybe Andrew would know offhand.
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: Digital signature
URL: <https://sourceware.org/pipermail/gdb/attachments/20210113/8e6bbb84/attachment-0001.sig>
More information about the Gdb
mailing list