From: Ramana Radhakrishnan <ramana.radhakrishnan@codito.com>
To: Roopesh Kohad <roopesh.kohad@gmail.com>
Cc: gdb@sources.redhat.com
Subject: Re: function address from object file?
Date: Tue, 01 Mar 2005 10:21:00 -0000 [thread overview]
Message-ID: <4224420F.5030906@codito.com> (raw)
In-Reply-To: <1a223dc60503010114bbb95fd@mail.gmail.com>
Hi,
> Hi,
> I am trying to print function address by reading an object file.
> But the function address are all shown to be zero. How serious is this
> bug? Here is the repro:-
>
> $ cat a.c
> #include <stdio.h>
>
> void t(void)
> {
> int i=0;
> printf("%d\n",i);
> }
>
> void u(void)
> {
> int i=0;
> printf("%d\n",i);
> }
>
> int main()
> {
> t();
> return 0;
> }
>
>
> $ gcc -c -g -o a.o a.c
This is not a bug . Go look at the doco for gcc -c . It only
creates object files and not executables. So these are not
complete executables in the first place.So gdb is ok in what it
is doing in this case.
cheers
Ramana
--
Ramana Radhakrishnan
GNU Tools
codito ergo sum (www.codito.com)
next prev parent reply other threads:[~2005-03-01 10:21 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-03-01 9:14 Roopesh Kohad
2005-03-01 10:21 ` Ramana Radhakrishnan [this message]
2005-03-01 14:26 ` Daniel Jacobowitz
2005-03-01 11:20 Atul Talesara
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=4224420F.5030906@codito.com \
--to=ramana.radhakrishnan@codito.com \
--cc=gdb@sources.redhat.com \
--cc=roopesh.kohad@gmail.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