All of lore.kernel.org
 help / color / mirror / Atom feed
* libunwind question
@ 2003-10-13 18:01 Umut Aymakoglu
  2003-10-13 19:01 ` David Mosberger
  0 siblings, 1 reply; 2+ messages in thread
From: Umut Aymakoglu @ 2003-10-13 18:01 UTC (permalink / raw)
  To: linux-ia64





Hi -
   During unwinding is there a way to tell  if the ip is from a shared
library or from an executable and get the name of the object it is from?

 I use the unw_get_proc_name() call to get the symbol name but would like
to get the name of the object as well.

thanks,
Umut


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: libunwind question
  2003-10-13 18:01 libunwind question Umut Aymakoglu
@ 2003-10-13 19:01 ` David Mosberger
  0 siblings, 0 replies; 2+ messages in thread
From: David Mosberger @ 2003-10-13 19:01 UTC (permalink / raw)
  To: linux-ia64

>>>>> On Mon, 13 Oct 2003 11:01:47 -0700, Umut Aymakoglu <umuta@us.ibm.com> said:

  Umut> During unwinding is there a way to tell if the ip is from a
  Umut> shared library or from an executable and get the name of the
  Umut> object it is from?

Not with libunwind itself.

  Umut> I use the unw_get_proc_name() call to get the symbol name but
  Umut> would like to get the name of the object as well.

You should be able to get that by walking the list of mapped objects.
You can get that with dl_iterate_phdr().  The callback will be invoked
once for each object and then you can check the ELF PHDR to see if the
IP falls inside the object.

	--david

PS: I'm cc'ing libunwind, since that's probably a more appropriate place
    to discuss such issues.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2003-10-13 19:01 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-10-13 18:01 libunwind question Umut Aymakoglu
2003-10-13 19:01 ` David Mosberger

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.