Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: "Nick Kelsey" <nickk@ubicom.com>
To: <gdb@sources.redhat.com>
Subject: getting lookup_symbol to find aliases
Date: Tue, 19 Nov 2002 17:58:00 -0000	[thread overview]
Message-ID: <049f01c29038$5a4cdbf0$f601a8c0@nkelseyxp> (raw)

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



                 reply	other threads:[~2002-11-20  1:58 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='049f01c29038$5a4cdbf0$f601a8c0@nkelseyxp' \
    --to=nickk@ubicom.com \
    --cc=gdb@sources.redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox