Skip to content

Commit

Permalink
Updated gdb patch to fix 32-bit issue.
Browse files Browse the repository at this point in the history
  • Loading branch information
icculus committed Oct 2, 2009
1 parent 3768613 commit c5a4fac
Showing 1 changed file with 8 additions and 9 deletions.
17 changes: 8 additions & 9 deletions patches/gdb.diff
@@ -1,6 +1,6 @@
diff -ru gdb-6.8-orig/bfd/bfd.c gdb-6.8/bfd/bfd.c
--- gdb-6.8-orig/bfd/bfd.c 2008-01-25 11:18:40.000000000 -0500
+++ gdb-6.8/bfd/bfd.c 2009-09-25 14:02:46.000000000 -0400
+++ gdb-6.8/bfd/bfd.c 2009-10-02 16:25:17.000000000 -0400
@@ -199,6 +199,10 @@
. struct objalloc *, but we use void * to avoid requiring the inclusion
. of objalloc.h. *}
Expand All @@ -14,7 +14,7 @@ diff -ru gdb-6.8-orig/bfd/bfd.c gdb-6.8/bfd/bfd.c
*/
diff -ru gdb-6.8-orig/bfd/bfd-in2.h gdb-6.8/bfd/bfd-in2.h
--- gdb-6.8-orig/bfd/bfd-in2.h 2008-02-20 10:17:56.000000000 -0500
+++ gdb-6.8/bfd/bfd-in2.h 2009-09-25 14:02:22.000000000 -0400
+++ gdb-6.8/bfd/bfd-in2.h 2009-10-02 16:25:17.000000000 -0400
@@ -4772,6 +4772,10 @@
struct objalloc *, but we use void * to avoid requiring the inclusion
of objalloc.h. */
Expand All @@ -28,7 +28,7 @@ diff -ru gdb-6.8-orig/bfd/bfd-in2.h gdb-6.8/bfd/bfd-in2.h
typedef enum bfd_error
diff -ru gdb-6.8-orig/bfd/bfdio.c gdb-6.8/bfd/bfdio.c
--- gdb-6.8-orig/bfd/bfdio.c 2008-02-20 12:42:35.000000000 -0500
+++ gdb-6.8/bfd/bfdio.c 2009-09-25 14:01:17.000000000 -0400
+++ gdb-6.8/bfd/bfdio.c 2009-10-02 16:25:17.000000000 -0400
@@ -281,7 +281,7 @@
bim = abfd->iostream;

Expand Down Expand Up @@ -59,7 +59,7 @@ diff -ru gdb-6.8-orig/bfd/bfdio.c gdb-6.8/bfd/bfdio.c
}
diff -ru gdb-6.8-orig/bfd/elfcode.h gdb-6.8/bfd/elfcode.h
--- gdb-6.8-orig/bfd/elfcode.h 2007-12-24 11:55:39.000000000 -0500
+++ gdb-6.8/bfd/elfcode.h 2009-09-25 14:01:27.000000000 -0400
+++ gdb-6.8/bfd/elfcode.h 2009-10-02 16:27:05.000000000 -0400
@@ -496,7 +496,6 @@
target vectors, most of which will not match. We have to avoid leaving
any side effects in ABFD, or any data it points to (like tdata), if the
Expand Down Expand Up @@ -93,14 +93,14 @@ diff -ru gdb-6.8-orig/bfd/elfcode.h gdb-6.8/bfd/elfcode.h
+ {
+ FatElf_External_Record *x_fatrec_ptr;
+ unsigned char fatindex;
+ file_ptr seekpos = -((file_ptr) sizeof (x_ehdr));
+
+ if (bfd_getl16(&x_fathdr->version) != FATELF_FORMAT_VERSION)
+ goto got_wrong_format_error;
+
+ /* reposition at the end of the FatELF header for record reading... */
+ if (bfd_seek (abfd, (file_ptr) -sizeof (x_ehdr), SEEK_CUR) != 0)
+ goto got_no_match;
+ else if (bfd_seek (abfd, (file_ptr) sizeof (x_fathdr), SEEK_CUR) != 0)
+ seekpos += ((file_ptr) sizeof (*x_fathdr));
+ if (bfd_seek (abfd, seekpos, SEEK_CUR) != 0)
+ goto got_no_match;
+
+ amt = sizeof (*x_fatrec_ptr) * x_fathdr->num_records;
Expand Down Expand Up @@ -196,10 +196,9 @@ diff -ru gdb-6.8-orig/bfd/elfcode.h gdb-6.8/bfd/elfcode.h
/* Check that the ELF e_machine field matches what this particular
BFD format expects. */
if (ebd->elf_machine_code != i_ehdrp->e_machine
Only in gdb-6.8/gdb/testsuite: gdb.pie
diff -ru gdb-6.8-orig/include/elf/external.h gdb-6.8/include/elf/external.h
--- gdb-6.8-orig/include/elf/external.h 2006-12-06 09:36:41.000000000 -0500
+++ gdb-6.8/include/elf/external.h 2009-09-25 14:01:17.000000000 -0400
+++ gdb-6.8/include/elf/external.h 2009-10-02 16:25:17.000000000 -0400
@@ -272,4 +272,35 @@

#define GRP_ENTRY_SIZE 4
Expand Down

0 comments on commit c5a4fac

Please sign in to comment.