This is the mail archive of the
gdb@sources.redhat.com
mailing list for the GDB project.
getting lookup_symbol to find aliases
- From: "Nick Kelsey" <nickk at ubicom dot com>
- To: <gdb at sources dot redhat dot com>
- Date: Tue, 19 Nov 2002 17:58:42 -0800
- Subject: getting lookup_symbol to find aliases
- Reply-to: "Nick Kelsey" <nickk at ubicom dot com>
Hi all,
I am working on the ip2k gdb port (should be released before the end of the
year) and I have come across a problem....
When printing the stack call chain gdb normally stops at main() (which is
desirable).
The main symbol is looked up in blockframe.c:
mainsym = lookup_symbol (main_name (), NULL, VAR_NAMESPACE, NULL, NULL);
This works fine when main is a real function but it fails when main is an
alias (returns NULL).
Upon further investigation, lookup symbol doesn't seam to understand aliases
which explains quite a few problems as we tend to use aliases extensivly.
A nm dump of the elf file returns:
0201699a W _main
0201699a T _system_main
Also as an aside, if gdb can't find main() then it will try to do the
symbolic lookup multiple times every time you dump the stack chain. I can do
a patch for that as well if it could be conceivable that people have
projects that don't have a function called main().
I would like to do a sanity check before I start hacking systab too much.
Nick