summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Purdie <rpurdie@rpsys.net>2005-11-14 15:30:54 +0000
committerOpenEmbedded Project <openembedded-devel@lists.openembedded.org>2005-11-14 15:30:54 +0000
commit824295f3609d4c5e76ca153756e41406d81f0534 (patch)
tree5c5bcf5cfd304e267ddf0a1d481f4681fe56ef14
parent1e74465eb77afd6b731ed51cb3c9cd44682aa507 (diff)
gdb 6.3: Add hack to remove references to arm mapping symbols. These are used to mark boundaries between arm and thumb code but gdb 6.3 doesn't understand them so having it ignore them is preferable to corrupting the output.
-rw-r--r--packages/gdb/files/kill_arm_map_symbols.patch24
-rw-r--r--packages/gdb/gdb_6.3.bb1
2 files changed, 25 insertions, 0 deletions
diff --git a/packages/gdb/files/kill_arm_map_symbols.patch b/packages/gdb/files/kill_arm_map_symbols.patch
new file mode 100644
index 0000000000..177142192d
--- /dev/null
+++ b/packages/gdb/files/kill_arm_map_symbols.patch
@@ -0,0 +1,24 @@
+Index: gdb-6.3/gdb/arm-tdep.c
+===================================================================
+--- gdb-6.3.orig/gdb/arm-tdep.c 2004-08-03 02:02:20.000000000 +0000
++++ gdb-6.3/gdb/arm-tdep.c 2005-11-09 15:13:29.000000000 +0000
+@@ -2491,6 +2491,19 @@
+ static void
+ arm_elf_make_msymbol_special(asymbol *sym, struct minimal_symbol *msym)
+ {
++
++ /* FIXME: We want gdb to ignore the ARM ELF mapping symbols when
++ displaying disassembly so we use this horrible hack here to
++ artifically set their address to the highest possible value.
++ This is wrong of course, and it prevents the symbols from being
++ used for their intended purpose - to distinguish between ARM
++ and THUMB code. So we ought to find a better way to do this. */
++ if (bfd_asymbol_name (sym)
++ && bfd_asymbol_name (sym)[0] == '$'
++ && bfd_asymbol_name (sym)[1] != 0
++ && bfd_asymbol_name (sym)[2] == 0)
++ SYMBOL_VALUE_ADDRESS(msym) = (CORE_ADDR) 0x7ffffffc;
++
+ /* Thumb symbols are of type STT_LOPROC, (synonymous with
+ STT_ARM_TFUNC). */
+ if (ELF_ST_TYPE (((elf_symbol_type *)sym)->internal_elf_sym.st_info)
diff --git a/packages/gdb/gdb_6.3.bb b/packages/gdb/gdb_6.3.bb
index 98825500f6..3e755cee67 100644
--- a/packages/gdb/gdb_6.3.bb
+++ b/packages/gdb/gdb_6.3.bb
@@ -15,6 +15,7 @@ inherit autotools gettext
SRC_URI = "${GNU_MIRROR}/gdb/gdb-${PV}.tar.gz \
file://uclibc.patch;patch=1 \
+ file://kill_arm_map_symbols.patch;patch=1 \
file://gdbserver-cflags-last.diff;patch=1;pnum=0"
LDFLAGS_append = " -s"