summaryrefslogtreecommitdiff
path: root/devel/psptoolchain-gdb/files/patch-gdb-remote.c
diff options
context:
space:
mode:
Diffstat (limited to 'devel/psptoolchain-gdb/files/patch-gdb-remote.c')
-rw-r--r--devel/psptoolchain-gdb/files/patch-gdb-remote.c32
1 files changed, 32 insertions, 0 deletions
diff --git a/devel/psptoolchain-gdb/files/patch-gdb-remote.c b/devel/psptoolchain-gdb/files/patch-gdb-remote.c
new file mode 100644
index 000000000000..5864447b0420
--- /dev/null
+++ b/devel/psptoolchain-gdb/files/patch-gdb-remote.c
@@ -0,0 +1,32 @@
+--- gdb/remote.c.orig 2005-07-20 03:56:43.000000000 +0100
++++ gdb/remote.c 2007-02-08 20:06:12.000000000 +0000
+@@ -1953,6 +1953,7 @@
+ int lose;
+ CORE_ADDR text_addr, data_addr, bss_addr;
+ struct section_offsets *offs;
++ int i;
+
+ putpkt ("qOffsets");
+
+@@ -2014,6 +2015,13 @@
+ memcpy (offs, symfile_objfile->section_offsets,
+ SIZEOF_N_SECTION_OFFSETS (symfile_objfile->num_sections));
+
++ /* GDB is stupid, lets fix up all sections to the same address not just a few :P */
++
++ for(i = 0; i < symfile_objfile->num_sections; i++)
++ {
++ offs->offsets[i] = text_addr;
++ }
++#if 0
+ offs->offsets[SECT_OFF_TEXT (symfile_objfile)] = text_addr;
+
+ /* This is a temporary kludge to force data and bss to use the same offsets
+@@ -2022,6 +2030,7 @@
+
+ offs->offsets[SECT_OFF_DATA (symfile_objfile)] = data_addr;
+ offs->offsets[SECT_OFF_BSS (symfile_objfile)] = data_addr;
++#endif
+
+ objfile_relocate (symfile_objfile, offs);
+ }