Is it possible to support gdb command hbreak with target sim ?
Mike Frysinger
vapier@gentoo.org
Wed Jan 13 05:46:49 GMT 2021
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!
-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/8e396b9f/attachment.sig>
More information about the Gdb
mailing list