summaryrefslogtreecommitdiff
path: root/src/x86/Ginit.c
diff options
context:
space:
mode:
authorDavid Mosberger-Tang <davidm@panda.mostang.com>2007-08-22 13:02:09 -0600
committerDavid Mosberger-Tang <davidm@panda.mostang.com>2007-08-22 13:02:09 -0600
commite6b9f350f78ecd9ef3b8a3e721f9435c94fc2562 (patch)
tree1e90fcdf7c0049f85d26f91f0d714e38c77b5bfc /src/x86/Ginit.c
parent03e05b41386fd5797cb8cd62eff7f0ba77c4e07e (diff)
downloadlibunwind-e6b9f350f78ecd9ef3b8a3e721f9435c94fc2562.tar.gz
Introduce a tdep_get_func_addr_hook() in the ELF lookup_symbol()
routine and add address-space argument. This is needed because on PPC64, a the function-name symbol refers to a function descriptor (unlike, for example, on ia64, where the @fptr() operator is needed to refer to a function descriptor). Thus, in order to look up the name of a function, we need to dereference the function descriptor. To make matters more "interesting", the function descriptors are normally resolved by the dynamic linker, so we can't get their values from the ELF file. Instead, we have to read them from the running image, hence the need for the address-space argument.
Diffstat (limited to 'src/x86/Ginit.c')
-rw-r--r--src/x86/Ginit.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/x86/Ginit.c b/src/x86/Ginit.c
index 3b206a3e..abc9e613 100644
--- a/src/x86/Ginit.c
+++ b/src/x86/Ginit.c
@@ -1,6 +1,7 @@
/* libunwind - a platform-independent unwind library
Copyright (C) 2002 Hewlett-Packard Co
- Contributed by David Mosberger-Tang <davidm@hpl.hp.com>
+ Copyright (C) 2007 David Mosberger-Tang
+ Contributed by David Mosberger-Tang <dmosberger@gmail.com>
This file is part of libunwind.
@@ -186,7 +187,7 @@ get_static_proc_name (unw_addr_space_t as, unw_word_t ip,
char *buf, size_t buf_len, unw_word_t *offp,
void *arg)
{
- return _Uelf32_get_proc_name (getpid (), ip, buf, buf_len, offp);
+ return _Uelf32_get_proc_name (as, getpid (), ip, buf, buf_len, offp);
}
HIDDEN void