aboutsummaryrefslogtreecommitdiff
path: root/gdb/minsyms.c
diff options
context:
space:
mode:
authorUlrich Weigand <uweigand@de.ibm.com>2008-05-16 12:51:21 +0000
committerUlrich Weigand <uweigand@de.ibm.com>2008-05-16 12:51:21 +0000
commit42848c965696a7e9cb46d09b6417212b946ab987 (patch)
tree887a9e202ba2e7d14d2379e48a0d3967ba102d92 /gdb/minsyms.c
parent74d1f0631ab3b9a845bc2becb4fd6afa6f691129 (diff)
downloadgdb-42848c965696a7e9cb46d09b6417212b946ab987.zip
gdb-42848c965696a7e9cb46d09b6417212b946ab987.tar.gz
gdb-42848c965696a7e9cb46d09b6417212b946ab987.tar.bz2
* minsyms.c: Include "target.h".
(find_solib_trampoline_target): Handle minimal symbols pointing to function descriptors as well. * Makefile.in (minsyms.o): Update dependencies. * ppc-linux-tdep.c (ppc64_standard_linkage): Rename to ... (ppc64_standard_linkage1): ... this. Fix optional instructions. (PPC64_STANDARD_LINKAGE_LEN): Rename to ... (PPC64_STANDARD_LINKAGE1_LEN): ... this. (ppc64_standard_linkage2, ppc64_standard_linkage3): New. (PPC64_STANDARD_LINKAGE2_LEN, PPC64_STANDARD_LINKAGE3_LEN): New. (ppc64_standard_linkage_target): Rename to ... (ppc64_standard_linkage1_target): ... this. (ppc64_standard_linkage2_target, ppc64_standard_linkage3_target): New. (ppc64_skip_trampoline_code): Support three variants of standard linkage stubs. Call find_solib_trampoline_target to handle glink stubs.
Diffstat (limited to 'gdb/minsyms.c')
-rw-r--r--gdb/minsyms.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/gdb/minsyms.c b/gdb/minsyms.c
index f1a6c48..ca9ba9a 100644
--- a/gdb/minsyms.c
+++ b/gdb/minsyms.c
@@ -47,6 +47,7 @@
#include "demangle.h"
#include "value.h"
#include "cp-abi.h"
+#include "target.h"
/* Accumulate the minimal symbols for each objfile in bunches of BUNCH_SIZE.
At the end, copy them all into one newly allocated location on an objfile's
@@ -1110,6 +1111,22 @@ find_solib_trampoline_target (struct frame_info *frame, CORE_ADDR pc)
&& strcmp (SYMBOL_LINKAGE_NAME (msymbol),
SYMBOL_LINKAGE_NAME (tsymbol)) == 0)
return SYMBOL_VALUE_ADDRESS (msymbol);
+
+ /* Also handle minimal symbols pointing to function descriptors. */
+ if (MSYMBOL_TYPE (msymbol) == mst_data
+ && strcmp (SYMBOL_LINKAGE_NAME (msymbol),
+ SYMBOL_LINKAGE_NAME (tsymbol)) == 0)
+ {
+ CORE_ADDR func;
+ func = gdbarch_convert_from_func_ptr_addr
+ (get_objfile_arch (objfile),
+ SYMBOL_VALUE_ADDRESS (msymbol),
+ &current_target);
+
+ /* Ignore data symbols that are not function descriptors. */
+ if (func != SYMBOL_VALUE_ADDRESS (msymbol))
+ return func;
+ }
}
}
return 0;