Re: libunwind question

From: David Mosberger <davidm_at_napali.hpl.hp.com>
Date: 2003-10-14 05:01:38
>>>>> 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.
-
To unsubscribe from this list: send the line "unsubscribe linux-ia64" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Received on Mon Oct 13 15:01:57 2003

This archive was generated by hypermail 2.1.8 : 2005-08-02 09:20:19 EST