This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[commit/obvious] Fix broken build by BFD cleanup patch


Hi,

A patch of mine has been committed to binutils tree today, and it broke
the GDB build because it rearranged some BFD functions (declarations).
Here is the obvious patch to fix it in the GDB side.  Sorry about the breakage.

Checked in:

    http://sourceware.org/ml/gdb-cvs/2012-05/msg00119.html

This patch has been tested by building GDB without
`--enable-targets=all', since using this flag is currently breaking GDB
(http://sourceware.org/ml/binutils/2012-05/msg00223.html).

-- 
Sergio

Index: gdb/ChangeLog
===================================================================
RCS file: /cvs/src/src/gdb/ChangeLog,v
retrieving revision 1.14257
diff -u -p -r1.14257 ChangeLog
--- gdb/ChangeLog	16 May 2012 20:31:07 -0000	1.14257
+++ gdb/ChangeLog	16 May 2012 22:06:01 -0000
@@ -1,3 +1,12 @@
+2012-05-16  Sergio Durigan Junior  <sergiodj@redhat.com>
+
+	* coffread.c (cs_section_address): Passing proper argument for
+	`bfd_get_section_vma'.
+	* dwarf2read.c (dwarf2_locate_sections): Likewise, for
+	`bfd_get_section_flags'.
+	* remote.c (remote_trace_set_readonly_regions): Likewise, for
+	`bfd_get_section_vma'.
+
 2012-05-16  Tom Tromey  <tromey@redhat.com>
 
 	PR macros/13205:
Index: gdb/coffread.c
===================================================================
RCS file: /cvs/src/src/gdb/coffread.c,v
retrieving revision 1.129
diff -u -p -r1.129 coffread.c
--- gdb/coffread.c	10 May 2012 19:50:07 -0000	1.129
+++ gdb/coffread.c	16 May 2012 22:06:01 -0000
@@ -311,7 +311,7 @@ cs_section_address (struct coff_symbol *
   args.resultp = &sect;
   bfd_map_over_sections (abfd, find_targ_sec, &args);
   if (sect != NULL)
-    addr = bfd_get_section_vma (objfile->obfd, sect);
+    addr = bfd_get_section_vma (abfd, sect);
   return addr;
 }
 
Index: gdb/dwarf2read.c
===================================================================
RCS file: /cvs/src/src/gdb/dwarf2read.c,v
retrieving revision 1.650
diff -u -p -r1.650 dwarf2read.c
--- gdb/dwarf2read.c	16 May 2012 20:31:09 -0000	1.650
+++ gdb/dwarf2read.c	16 May 2012 22:06:03 -0000
@@ -1582,7 +1582,7 @@ dwarf2_locate_sections (bfd *abfd, asect
     }
   else if (section_is_p (sectp->name, &names->eh_frame))
     {
-      flagword aflag = bfd_get_section_flags (ignore_abfd, sectp);
+      flagword aflag = bfd_get_section_flags (abfd, sectp);
 
       if (aflag & SEC_HAS_CONTENTS)
         {
Index: gdb/remote.c
===================================================================
RCS file: /cvs/src/src/gdb/remote.c,v
retrieving revision 1.496
diff -u -p -r1.496 remote.c
--- gdb/remote.c	12 Apr 2012 00:56:05 -0000	1.496
+++ gdb/remote.c	16 May 2012 22:06:04 -0000
@@ -10399,6 +10399,7 @@ static void
 remote_trace_set_readonly_regions (void)
 {
   asection *s;
+  bfd *abfd = NULL;
   bfd_size_type size;
   bfd_vma vma;
   int anysecs = 0;
@@ -10419,7 +10420,7 @@ remote_trace_set_readonly_regions (void)
 	continue;
 
       anysecs = 1;
-      vma = bfd_get_section_vma (,s);
+      vma = bfd_get_section_vma (abfd, s);
       size = bfd_get_section_size (s);
       sprintf_vma (tmp1, vma);
       sprintf_vma (tmp2, vma + size);


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]