making stabs visible to gdb
Tavis Ormandy
taviso@gmail.com
Sat Aug 20 01:44:00 GMT 2022
On 2022-08-05, Tom Tromey wrote:
>>> Also, is there a better way to accomplish what I'm trying to do?
>
> In the gdb test suite, we have some Tcl code that makes it relatively
> simple to create synthetic DWARF. So, I'd consider extracting that and
> using it to describe your program.
>
Hmm thanks, it kinda works - but it generates tons of warnings like
this:
warning: (Internal error: pc 0x8129250 in read in psymtab, but not in
symtab.)
warning: (Internal error: pc 0x8129250 in read in psymtab, but not in
symtab.)
warning: (Internal error: pc 0x8129250 in read in psymtab, but not in
symtab.)
It's so close to working nicely, but I think these warnings can't be hidden.
What do you think about removing that warning?
> Nick> There may be a gdb command that associates an address
> Nick> with a symbol name, but I do not know what it is. Sorry.
>
> There isn't one that does exactly this, but you can probably use the
> 'compile' command to achieve it.
>
Do you have an example of what you had in mind?
I thought you might mean something like this, but I couldn't figure out
the details:
compile code -raw void (*example)(unsigned *foo, int bar) = (void*)(0x8005bba); void _gdb_expr(){};
Tavis.
--
_o) $ lynx lock.cmpxchg8b.com
/\\ _o) _o) $ finger taviso@sdf.org
_\_V _( ) _( ) @taviso
More information about the Binutils
mailing list