From: cgd@broadcom.com
To: ac131313@redhat.com
Cc: "Elena Zannoni" <ezannoni@redhat.com>,
gdb-patches@sources.redhat.com,
"Michael Elizabeth Chastain" <mec@shout.net>
Subject: Re: [rfa:threads] Report when using libthread_db
Date: Thu, 07 Aug 2003 20:31:00 -0000 [thread overview]
Message-ID: <yov5y8y58b27.fsf@ldt-sj3-010.sj.broadcom.com> (raw)
In-Reply-To: <mailpost.1060286286.1556@news-sj1-1>
At Thu, 7 Aug 2003 19:58:06 +0000 (UTC), "Andrew Cagney" wrote:
> Anyone know how to get a version number from libthread_db, or it's
> absolute path?
looks like there are two ways one can do this:
dlinfo() on Solaris (and other systems that have it -- but it doesn't
appear common).
dladdr() on systems that have it and this one is more widespread (incl
solaris, linux at least with -D_GNU_SOURCE, and it looks like NetBSD
has it as well).
Use dladdr like:
{
int rv;
Dl_info dli;
rv = dladdr(cosine, &dli);
printf ("rv = %d\n", rv);
printf ("name = %s\n", dli.dli_fname);
}
(that example should drop into example provided in the RH 7.3 x86
'dlopen' manual page. I'm not sure the original source of that manual
page, though... 8-)
(works for dlsym'd addresses, but doesn't necessarily work as one
would naively expect for symbols needed directly by the main program,
of course...)
cgd
next prev parent reply other threads:[~2003-08-07 20:31 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-08-05 19:26 Andrew Cagney
2003-08-07 19:57 ` Andrew Cagney
[not found] ` <mailpost.1060286286.1556@news-sj1-1>
2003-08-07 20:31 ` cgd [this message]
2003-08-08 14:51 ` Andrew Cagney
2003-08-21 22:10 ` Andrew Cagney
2003-08-21 22:47 ` Mark Kettenis
2003-08-05 19:51 Michael Elizabeth Chastain
2003-08-05 20:10 ` Elena Zannoni
2003-08-08 15:51 Michael Elizabeth Chastain
2003-08-22 19:40 Michael Elizabeth Chastain
2003-08-23 1:49 Michael Elizabeth Chastain
2003-09-04 17:24 ` Andrew Cagney
2003-09-05 15:42 ` Elena Zannoni
2003-09-08 2:28 Michael Elizabeth Chastain
2003-09-08 3:01 ` Daniel Jacobowitz
2003-09-09 14:29 ` Elena Zannoni
2003-09-08 3:05 Michael Elizabeth Chastain
2003-09-08 13:21 ` Andrew Cagney
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=yov5y8y58b27.fsf@ldt-sj3-010.sj.broadcom.com \
--to=cgd@broadcom.com \
--cc=ac131313@redhat.com \
--cc=ezannoni@redhat.com \
--cc=gdb-patches@sources.redhat.com \
--cc=mec@shout.net \
/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