GDB front-end for SimH
Paul Koning
paulkoning at comcast.net
Tue Apr 24 20:10:22 CDT 2018
> On Apr 24, 2018, at 8:14 PM, Maciej W. Rozycki <macro at linux-mips.org> wrote:
>
> On Tue, 24 Apr 2018, Paul Koning via cctalk wrote:
>
>> One drawback is that there aren't all that many SIMH architectures that
>> have GDB support. VAX does, and Alpha; that's about it. I don't know
>> how hard it is to do a basic platform in GDB, probably not all that
>> difficult. At least for machines like PDP-11. One's complement might
>> be harder (PDP-1), never mind things like the IBM 1620... :-)
>
> You need target BFD and libopcodes support for a GDB port to be possible.
> There is such support already present for PDP-11, so wiring in GDB parts
> should be straightforward. A remote protocol stub for SimH should also be
> easy to write as you don't need all the fancy stuff and GDB will be happy
> to work with just the `?', `G', `M', `c', `g', `m' request packets and the
> `S' stop reply packet implemented. The rest is optional.
True. But if the SIMH code has breakpoint support, GDB can use that as a "hardware breakpoint". Not all that interesting, perhaps, unless you're putting breakpoints in ROM. More interesting is watchpoint support, which some SIMH targets have, and GDB supports.
I haven't tried to do a minimal BFD/opcodes implementation for a platform that doesn't yet have one. PDP-10 perhaps (unless Lars did one years ago?). One wonders if non-power-of-two wordlengths add complication, as they do in recent GCC.
I don't know if the SIMH execution and control frameworks make it convenient to hook up the GDB remote stub protocol. A stop to the SIMH console would want to be turned into a GDB remote interaction instead, and break signals from GDB would have to be recognized while SIMH is running the emulated machine.
paul
More information about the cctalk
mailing list