This is the mail archive of the
gdb@sources.redhat.com
mailing list for the GDB project.
Re: fake symbols to aid debugging
- From: Nick Clifton <nickc at redhat dot com>
- To: binutils at sources dot redhat dot com
- Cc: gdb at sources dot redhat dot com
- Date: Tue, 29 Jul 2003 07:45:30 +0100
- Subject: Re: fake symbols to aid debugging
- References: <20030729023258.GH27145@bubble.sa.bigpond.net.au>
Hi Alan,
> I waste enough time doing this that I figure it's worth doing something
> about it. My first idea, already implemented, was to have the linker
> emit extra symbols to identify the stubs. This works well but bloats
> the symbol table and isn't on by default. A better idea would be to
> create the stub symbols on the fly. With that in mind, I propose to
> add two new bfd functions
>
> long bfd_get_fake_symtab_upper_bound (bfd *abfd);
> long bfd_canonicalize_fake_symtab (bfd *abfd, asymbol **buf);
>
> analogous to bfd_get_symtab_upper_bound and bfd_canonicalize_symtab.
>
> Comments?
Well a few questions actually:
Where would these fake symbols be held ? In a new .fakesymtab
section? Or are they entirely ephemeral and never stored in the
executable ?
Can the fake symbols be generated after the stubs are created ? ie
can they be created for already existing libraries/executables ?
Would gdb users be able to set breakpoints on these fake symbols ?
Cheers
Nick