public inbox for gdb@sourceware.org
 help / color / mirror / Atom feed
From: Tom Tromey <tom@tromey.com>
To: AT&T <iburres@att.net>
Cc: gdb@sourceware.org
Subject: Re: Symbol Tables for new ISA
Date: Thu, 01 Oct 2020 11:20:19 -0600	[thread overview]
Message-ID: <87wo09eucs.fsf@tromey.com> (raw)
In-Reply-To: <226431FA-99E3-4A6E-AEB4-9B121EF02E94@att.net> (AT&T.'s message of "Tue, 29 Sep 2020 10:36:25 -0600")

>>>>> "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

      reply	other threads:[~2020-10-01 17:20 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <226431FA-99E3-4A6E-AEB4-9B121EF02E94.ref@att.net>
2020-09-29 16:36 ` AT&T
2020-10-01 17:20   ` Tom Tromey [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87wo09eucs.fsf@tromey.com \
    --to=tom@tromey.com \
    --cc=gdb@sourceware.org \
    --cc=iburres@att.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).