public inbox for gdb@sourceware.org
 help / color / mirror / Atom feed
* Create symbols Dynamically
@ 2015-06-20 23:19 duane
  2015-06-23  3:15 ` Doug Evans
  0 siblings, 1 reply; 2+ messages in thread
From: duane @ 2015-06-20 23:19 UTC (permalink / raw)
  To: gdb

Hi, 

Is there a way to load a symbol table from a text file? A number of jtag
type debuggers have this feature.

Specifically - I have a symbol table that a simple 2 column white space
separated text file (the output of "NM" is 3 column ascii text, you get
the idea) a simple one line awk script will covert the format if needed.


I want to load this into GDB as an extra symbol file.

These are various hardware defined peripheral addresses. Things like
uart base address, data registers, control registers - it would be very
helpful to be able to refer to them as needed in scripts. There are
thousands of them.

Effectively, if they all became the equivalent of "extern uint32_t
SYMBOLNAME[1];" that would be great

My last restore (YUCK!) is to create an ELF file, and use
'symbol-add-file'  yuck!

I also need to - within a gdb script - define my own symbols dynamically
at run time in the same way.

Thanks




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

* Re: Create symbols Dynamically
  2015-06-20 23:19 Create symbols Dynamically duane
@ 2015-06-23  3:15 ` Doug Evans
  0 siblings, 0 replies; 2+ messages in thread
From: Doug Evans @ 2015-06-23  3:15 UTC (permalink / raw)
  To: duane; +Cc: gdb

On Sat, Jun 20, 2015 at 6:19 PM,  <duane@duaneellis.com> wrote:
> Hi,
>
> Is there a way to load a symbol table from a text file? A number of jtag
> type debuggers have this feature.
>
> Specifically - I have a symbol table that a simple 2 column white space
> separated text file (the output of "NM" is 3 column ascii text, you get
> the idea) a simple one line awk script will covert the format if needed.
>
>
> I want to load this into GDB as an extra symbol file.
>
> These are various hardware defined peripheral addresses. Things like
> uart base address, data registers, control registers - it would be very
> helpful to be able to refer to them as needed in scripts. There are
> thousands of them.
>
> Effectively, if they all became the equivalent of "extern uint32_t
> SYMBOLNAME[1];" that would be great
>
> My last restore (YUCK!) is to create an ELF file, and use
> 'symbol-add-file'  yuck!
>
> I also need to - within a gdb script - define my own symbols dynamically
> at run time in the same way.

Hi.

Easier addition of symbols is a desired feature (and relatively easy
to implement, setting aside  supporting types more complex than just
ints), but no one has done it yet.  At the moment the only way is
symbol-file-add.

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

end of thread, other threads:[~2015-06-23  3:15 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-06-20 23:19 Create symbols Dynamically duane
2015-06-23  3:15 ` Doug Evans

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).