Re: Is it possible to support gdb command hbreak with target sim ?
Mike Frysinger via Gdb <[email protected]>
| Newsgroups | gmane.comp.gdb.devel |
|---|---|
| Message-ID | <20210113110858.GD6938@vapier> |
On 13 Jan 2021 00:46, Mike Frysinger via Gdb wrote: > On 29 Sep 2020 09:46, Andrew Burgess wrote: > > * William Tambe via Gdb <[email protected]> [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
signature.asc
(application/pgp-signature, 833 B)
-----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEuQK1JxMl+JKsJRrUQWM7n+g39YEFAl/+1MoACgkQQWM7n+g3 9YFIaQ//ekgL7YQ8cN2bidhTU9Wh4NGJ4OQBP1YQCQqfaJJDbrXnK6+NvSzTsndk E4oFmD9okpn20gxyqZYvzMV7YeUMVqSV5TNpQKFaoYFT8fddDklsJOSbqsftXvhk O1oYcqxkYDQ0Q6+fUe1zvjfzabdAUTxWsrEL1XQBzzE7sTpuO69CFZ3cQKvjBmFb rmnszu6jBkJQyur26Hyo9ESyCFksnZ6V1JgMcapqUA6/kJclMXWqXJnZ+OY+JUE3 YSfqzl3iNv4PVQLOjitQ2IwRub5P4W1JhM5kscqnYhibJ20XixqFV3pghou8RXig cuMkOCPfBaduS1zkK4CXzPM9sayQa7HTIl6dllKFLIBjKEMOPS9XDnqV42tqmtXy FaWQZP8UtRWBWvoSWNzWsHv7KtUu8pKdGkPa0R22X6wFyyO6fTrA3emNrtEQOqS5 XW6jfGEzdLqJgAIBC4FS9jdTX9Fs89WXwWLqxOOg750YHt0tGbZhhVdc/Bk5Sk6C pfDiLROAmRzMDLKBIl7BpQJ9d4LVkgAm2Edpde+OzWum4TOZysrD9jaZY9Cl/2O4 3KSeQeFPPqyCzsjA4iRieiYFjKJtaWSkIA/Vvv17FjP4+Giag9D3xaAJUtImfJWe /0uXTV+L0DLMASc40AykoZVltlcUWq8iE2lb4QUb0onMjIu3BrM= =Jqqs -----END PGP SIGNATURE-----