public inbox for gdb@sourceware.org
 help / color / mirror / Atom feed
* Symbol Tables for new ISA
       [not found] <226431FA-99E3-4A6E-AEB4-9B121EF02E94.ref@att.net>
@ 2020-09-29 16:36 ` AT&T
  2020-10-01 17:20   ` Tom Tromey
  0 siblings, 1 reply; 2+ messages in thread
From: AT&T @ 2020-09-29 16:36 UTC (permalink / raw)
  To: gdb

I recently ported gdb for an obscure ISA on the target-side, and I am now looking to implement full symbol table support.  The ISA uses the Tektronix tekhex BFD, and I have a .hex reference_binary that I’m emulating in QEMU.  I can’t seem to find much literature on the topic, so I was wondering if anyone on the forums would have an idea as to how one can “scrape” or generate full symbol tables for a newly ported ISA.  

Ian 



^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Symbol Tables for new ISA
  2020-09-29 16:36 ` Symbol Tables for new ISA AT&T
@ 2020-10-01 17:20   ` Tom Tromey
  0 siblings, 0 replies; 2+ messages in thread
From: Tom Tromey @ 2020-10-01 17:20 UTC (permalink / raw)
  To: AT&T; +Cc: gdb

>>>>> "Ian" == AT&T  <iburres@att.net> writes:

Ian> I recently ported gdb for an obscure ISA on the target-side, and I am
Ian> now looking to implement full symbol table support.  The ISA uses the
Ian> Tektronix tekhex BFD, and I have a .hex reference_binary that I’m
Ian> emulating in QEMU.  I can’t seem to find much literature on the topic,
Ian> so I was wondering if anyone on the forums would have an idea as to
Ian> how one can “scrape” or generate full symbol tables for a newly ported
Ian> ISA.

Disclaimer: I don't know anything about this format.

I think first make, it work in BFD.  You can test that it works by using
objdump on the file.

If objdump can satisfactorily print symbols, then gdb needs to
understand the file format as well.  Mostly this is done via BFD APIs,
but there are sometimes some format-specific tweaks that are needed.
Here you can use examples like machoread.c and elfread.c.  You make a
new "struct sym_fns" instance and fill it in with pointers to your new
functions.

Assuming this format has just "linker" symbols and not debuginfo (like
DWARF or stabs), you want to focus on creating "minimal symbols".  You
can skip all the partial/full symbol business, those are only for full
debug symbols.

Tom

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-10-01 17:20 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <226431FA-99E3-4A6E-AEB4-9B121EF02E94.ref@att.net>
2020-09-29 16:36 ` Symbol Tables for new ISA AT&T
2020-10-01 17:20   ` Tom Tromey

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).