Re: fake symbols to aid debugging

Daniel Jacobowitz
2003-07-29T12:48:44Z

On Tue, Jul 29, 2003 at 01:04:51PM +0930, Alan Modra wrote:
> On Mon, Jul 28, 2003 at 11:11:07PM -0400, Daniel Jacobowitz wrote:
> > Would it be feasible for the linker to
> > generate a DWARF compilation unit for these stubs, and fill it with
> > DW_AT_trampoline markers?
>
> Yes, I could do that. Doesn't solve my disassembly problem though,
> does it? Even if gdb is clever enough to rummage through dwarf info
> for calls via stubs, I'd like to have objdump -d print useful symbols.

Well, yes and no.

Right now GDB only uses the minimal (ELF) symbol table when printing
symbols in disassembly. We'd need to make it use the debug info. I
think that's reasonable. Making objdump do the same thing would
probably not be hard. It wouldn't need a full reader, just one which
scanned top-level entities looking for subprograms and could parse
DW_AT_ranges or DW_AT_high/low_pc

--
Daniel Jacobowitz
MontaVista Software Debian GNU/Linux Developer