svn commit: r214212 - projects/binutils-2.17/contrib/gdb/gdb
Dimitry Andric
dim at FreeBSD.org
Fri Oct 22 18:08:38 UTC 2010
Author: dim
Date: Fri Oct 22 18:08:37 2010
New Revision: 214212
URL: http://svn.freebsd.org/changeset/base/214212
Log:
Fix gdb compilation with new binutils:
bfd_get_section_size_before_reloc() has been renamed to
bfd_get_section_size().
Modified:
projects/binutils-2.17/contrib/gdb/gdb/dsrec.c
projects/binutils-2.17/contrib/gdb/gdb/dwarf2-frame.c
projects/binutils-2.17/contrib/gdb/gdb/dwarf2read.c
projects/binutils-2.17/contrib/gdb/gdb/elfread.c
projects/binutils-2.17/contrib/gdb/gdb/gcore.c
projects/binutils-2.17/contrib/gdb/gdb/mipsread.c
projects/binutils-2.17/contrib/gdb/gdb/remote-e7000.c
projects/binutils-2.17/contrib/gdb/gdb/remote.c
projects/binutils-2.17/contrib/gdb/gdb/symfile.c
projects/binutils-2.17/contrib/gdb/gdb/tracepoint.c
Modified: projects/binutils-2.17/contrib/gdb/gdb/dsrec.c
==============================================================================
--- projects/binutils-2.17/contrib/gdb/gdb/dsrec.c Fri Oct 22 18:07:29 2010 (r214211)
+++ projects/binutils-2.17/contrib/gdb/gdb/dsrec.c Fri Oct 22 18:08:37 2010 (r214212)
@@ -93,7 +93,7 @@ load_srec (struct serial *desc, const ch
{
int numbytes;
bfd_vma addr = bfd_get_section_vma (abfd, s) + load_offset;
- bfd_size_type size = bfd_get_section_size_before_reloc (s);
+ bfd_size_type size = bfd_get_section_size (s);
char *section_name = (char *) bfd_get_section_name (abfd, s);
/* Both GDB and BFD have mechanisms for printing addresses.
In the below, GDB's is used so that the address is
Modified: projects/binutils-2.17/contrib/gdb/gdb/dwarf2-frame.c
==============================================================================
--- projects/binutils-2.17/contrib/gdb/gdb/dwarf2-frame.c Fri Oct 22 18:07:29 2010 (r214211)
+++ projects/binutils-2.17/contrib/gdb/gdb/dwarf2-frame.c Fri Oct 22 18:08:37 2010 (r214212)
@@ -1573,7 +1573,7 @@ dwarf2_build_frame_info (struct objfile
dwarf_eh_frame_section);
unit.dwarf_frame_size
- = bfd_get_section_size_before_reloc (dwarf_eh_frame_section);
+ = bfd_get_section_size (dwarf_eh_frame_section);
unit.dwarf_frame_section = dwarf_eh_frame_section;
/* FIXME: kettenis/20030602: This is the DW_EH_PE_datarel base
@@ -1601,7 +1601,7 @@ dwarf2_build_frame_info (struct objfile
unit.dwarf_frame_buffer = dwarf2_read_section (objfile,
dwarf_frame_section);
unit.dwarf_frame_size
- = bfd_get_section_size_before_reloc (dwarf_frame_section);
+ = bfd_get_section_size (dwarf_frame_section);
unit.dwarf_frame_section = dwarf_frame_section;
frame_ptr = unit.dwarf_frame_buffer;
Modified: projects/binutils-2.17/contrib/gdb/gdb/dwarf2read.c
==============================================================================
--- projects/binutils-2.17/contrib/gdb/gdb/dwarf2read.c Fri Oct 22 18:07:29 2010 (r214211)
+++ projects/binutils-2.17/contrib/gdb/gdb/dwarf2read.c Fri Oct 22 18:08:37 2010 (r214212)
@@ -954,47 +954,47 @@ dwarf2_locate_sections (bfd *ignore_abfd
{
if (strcmp (sectp->name, INFO_SECTION) == 0)
{
- dwarf_info_size = bfd_get_section_size_before_reloc (sectp);
+ dwarf_info_size = bfd_get_section_size (sectp);
dwarf_info_section = sectp;
}
else if (strcmp (sectp->name, ABBREV_SECTION) == 0)
{
- dwarf_abbrev_size = bfd_get_section_size_before_reloc (sectp);
+ dwarf_abbrev_size = bfd_get_section_size (sectp);
dwarf_abbrev_section = sectp;
}
else if (strcmp (sectp->name, LINE_SECTION) == 0)
{
- dwarf_line_size = bfd_get_section_size_before_reloc (sectp);
+ dwarf_line_size = bfd_get_section_size (sectp);
dwarf_line_section = sectp;
}
else if (strcmp (sectp->name, PUBNAMES_SECTION) == 0)
{
- dwarf_pubnames_size = bfd_get_section_size_before_reloc (sectp);
+ dwarf_pubnames_size = bfd_get_section_size (sectp);
dwarf_pubnames_section = sectp;
}
else if (strcmp (sectp->name, ARANGES_SECTION) == 0)
{
- dwarf_aranges_size = bfd_get_section_size_before_reloc (sectp);
+ dwarf_aranges_size = bfd_get_section_size (sectp);
dwarf_aranges_section = sectp;
}
else if (strcmp (sectp->name, LOC_SECTION) == 0)
{
- dwarf_loc_size = bfd_get_section_size_before_reloc (sectp);
+ dwarf_loc_size = bfd_get_section_size (sectp);
dwarf_loc_section = sectp;
}
else if (strcmp (sectp->name, MACINFO_SECTION) == 0)
{
- dwarf_macinfo_size = bfd_get_section_size_before_reloc (sectp);
+ dwarf_macinfo_size = bfd_get_section_size (sectp);
dwarf_macinfo_section = sectp;
}
else if (strcmp (sectp->name, STR_SECTION) == 0)
{
- dwarf_str_size = bfd_get_section_size_before_reloc (sectp);
+ dwarf_str_size = bfd_get_section_size (sectp);
dwarf_str_section = sectp;
}
else if (strcmp (sectp->name, FRAME_SECTION) == 0)
{
- dwarf_frame_size = bfd_get_section_size_before_reloc (sectp);
+ dwarf_frame_size = bfd_get_section_size (sectp);
dwarf_frame_section = sectp;
}
else if (strcmp (sectp->name, EH_FRAME_SECTION) == 0)
@@ -1002,13 +1002,13 @@ dwarf2_locate_sections (bfd *ignore_abfd
flagword aflag = bfd_get_section_flags (ignore_abfd, sectp);
if (aflag & SEC_HAS_CONTENTS)
{
- dwarf_eh_frame_size = bfd_get_section_size_before_reloc (sectp);
+ dwarf_eh_frame_size = bfd_get_section_size (sectp);
dwarf_eh_frame_section = sectp;
}
}
else if (strcmp (sectp->name, RANGES_SECTION) == 0)
{
- dwarf_ranges_size = bfd_get_section_size_before_reloc (sectp);
+ dwarf_ranges_size = bfd_get_section_size (sectp);
dwarf_ranges_section = sectp;
}
}
@@ -4185,7 +4185,7 @@ dwarf2_read_section (struct objfile *obj
{
bfd *abfd = objfile->obfd;
char *buf, *retbuf;
- bfd_size_type size = bfd_get_section_size_before_reloc (sectp);
+ bfd_size_type size = bfd_get_section_size (sectp);
if (size == 0)
return NULL;
Modified: projects/binutils-2.17/contrib/gdb/gdb/elfread.c
==============================================================================
--- projects/binutils-2.17/contrib/gdb/gdb/elfread.c Fri Oct 22 18:07:29 2010 (r214211)
+++ projects/binutils-2.17/contrib/gdb/gdb/elfread.c Fri Oct 22 18:08:37 2010 (r214212)
@@ -83,12 +83,12 @@ elf_locate_sections (bfd *ignore_abfd, a
if (strcmp (sectp->name, ".debug") == 0)
{
ei->dboffset = sectp->filepos;
- ei->dbsize = bfd_get_section_size_before_reloc (sectp);
+ ei->dbsize = bfd_get_section_size (sectp);
}
else if (strcmp (sectp->name, ".line") == 0)
{
ei->lnoffset = sectp->filepos;
- ei->lnsize = bfd_get_section_size_before_reloc (sectp);
+ ei->lnsize = bfd_get_section_size (sectp);
}
else if (strcmp (sectp->name, ".stab") == 0)
{
Modified: projects/binutils-2.17/contrib/gdb/gdb/gcore.c
==============================================================================
--- projects/binutils-2.17/contrib/gdb/gdb/gcore.c Fri Oct 22 18:07:29 2010 (r214211)
+++ projects/binutils-2.17/contrib/gdb/gdb/gcore.c Fri Oct 22 18:08:37 2010 (r214212)
@@ -244,7 +244,7 @@ derive_heap_segment (bfd *abfd, bfd_vma
|| strcmp (".bss", bfd_section_name (abfd, sec)) == 0)
{
sec_vaddr = bfd_get_section_vma (abfd, sec);
- sec_size = bfd_get_section_size_before_reloc (sec);
+ sec_size = bfd_get_section_size (sec);
if (sec_vaddr + sec_size > top_of_data_memory)
top_of_data_memory = sec_vaddr + sec_size;
}
Modified: projects/binutils-2.17/contrib/gdb/gdb/mipsread.c
==============================================================================
--- projects/binutils-2.17/contrib/gdb/gdb/mipsread.c Fri Oct 22 18:07:29 2010 (r214211)
+++ projects/binutils-2.17/contrib/gdb/gdb/mipsread.c Fri Oct 22 18:08:37 2010 (r214212)
@@ -256,10 +256,10 @@ read_alphacoff_dynamic_symtab (struct se
|| si.got_sect == NULL)
return;
- sym_secsize = bfd_get_section_size_before_reloc (si.sym_sect);
- str_secsize = bfd_get_section_size_before_reloc (si.str_sect);
- dyninfo_secsize = bfd_get_section_size_before_reloc (si.dyninfo_sect);
- got_secsize = bfd_get_section_size_before_reloc (si.got_sect);
+ sym_secsize = bfd_get_section_size (si.sym_sect);
+ str_secsize = bfd_get_section_size (si.str_sect);
+ dyninfo_secsize = bfd_get_section_size (si.dyninfo_sect);
+ got_secsize = bfd_get_section_size (si.got_sect);
sym_secptr = xmalloc (sym_secsize);
cleanups = make_cleanup (free, sym_secptr);
str_secptr = xmalloc (str_secsize);
Modified: projects/binutils-2.17/contrib/gdb/gdb/remote-e7000.c
==============================================================================
--- projects/binutils-2.17/contrib/gdb/gdb/remote-e7000.c Fri Oct 22 18:07:29 2010 (r214211)
+++ projects/binutils-2.17/contrib/gdb/gdb/remote-e7000.c Fri Oct 22 18:08:37 2010 (r214212)
@@ -1568,7 +1568,7 @@ e7000_load (char *args, int from_tty)
file_ptr fptr;
section_address = bfd_get_section_vma (pbfd, section);
- section_size = bfd_get_section_size_before_reloc (section);
+ section_size = bfd_get_section_size (section);
if (!quiet)
printf_filtered ("[Loading section %s at 0x%s (%s bytes)]\n",
Modified: projects/binutils-2.17/contrib/gdb/gdb/remote.c
==============================================================================
--- projects/binutils-2.17/contrib/gdb/gdb/remote.c Fri Oct 22 18:07:29 2010 (r214211)
+++ projects/binutils-2.17/contrib/gdb/gdb/remote.c Fri Oct 22 18:08:37 2010 (r214212)
@@ -4834,7 +4834,7 @@ compare_sections_command (char *args, in
if (!(s->flags & SEC_LOAD))
continue; /* skip non-loadable section */
- size = bfd_get_section_size_before_reloc (s);
+ size = bfd_get_section_size (s);
if (size == 0)
continue; /* skip zero-length section */
Modified: projects/binutils-2.17/contrib/gdb/gdb/symfile.c
==============================================================================
--- projects/binutils-2.17/contrib/gdb/gdb/symfile.c Fri Oct 22 18:07:29 2010 (r214211)
+++ projects/binutils-2.17/contrib/gdb/gdb/symfile.c Fri Oct 22 18:08:37 2010 (r214212)
@@ -1353,7 +1353,7 @@ add_section_size_callback (bfd *abfd, as
{
bfd_size_type *sum = data;
- *sum += bfd_get_section_size_before_reloc (asec);
+ *sum += bfd_get_section_size (asec);
}
/* Opaque data for load_section_callback. */
@@ -1373,7 +1373,7 @@ load_section_callback (bfd *abfd, asecti
if (bfd_get_section_flags (abfd, asec) & SEC_LOAD)
{
- bfd_size_type size = bfd_get_section_size_before_reloc (asec);
+ bfd_size_type size = bfd_get_section_size (asec);
if (size > 0)
{
char *buffer;
@@ -2879,7 +2879,7 @@ pc_in_unmapped_range (CORE_ADDR pc, asec
if (overlay_debugging)
if (section && section_is_overlay (section))
{
- size = bfd_get_section_size_before_reloc (section);
+ size = bfd_get_section_size (section);
if (section->lma <= pc && pc < section->lma + size)
return 1;
}
@@ -2899,7 +2899,7 @@ pc_in_mapped_range (CORE_ADDR pc, asecti
if (overlay_debugging)
if (section && section_is_overlay (section))
{
- size = bfd_get_section_size_before_reloc (section);
+ size = bfd_get_section_size (section);
if (section->vma <= pc && pc < section->vma + size)
return 1;
}
@@ -2915,9 +2915,9 @@ sections_overlap (asection *a, asection
/* FIXME: need bfd *, so we can use bfd_section_vma methods. */
CORE_ADDR a_start = a->vma;
- CORE_ADDR a_end = a->vma + bfd_get_section_size_before_reloc (a);
+ CORE_ADDR a_end = a->vma + bfd_get_section_size (a);
CORE_ADDR b_start = b->vma;
- CORE_ADDR b_end = b->vma + bfd_get_section_size_before_reloc (b);
+ CORE_ADDR b_end = b->vma + bfd_get_section_size (b);
return (a_start < b_end && b_start < a_end);
}
@@ -3052,7 +3052,7 @@ list_overlays_command (char *args, int f
vma = bfd_section_vma (objfile->obfd, osect->the_bfd_section);
lma = bfd_section_lma (objfile->obfd, osect->the_bfd_section);
- size = bfd_get_section_size_before_reloc (osect->the_bfd_section);
+ size = bfd_get_section_size (osect->the_bfd_section);
name = bfd_section_name (objfile->obfd, osect->the_bfd_section);
printf_filtered ("Section %s, loaded at ", name);
@@ -3392,7 +3392,7 @@ simple_overlay_update_1 (struct obj_sect
bfd *obfd = osect->objfile->obfd;
asection *bsect = osect->the_bfd_section;
- size = bfd_get_section_size_before_reloc (osect->the_bfd_section);
+ size = bfd_get_section_size (osect->the_bfd_section);
for (i = 0; i < cache_novlys; i++)
if (cache_ovly_table[i][VMA] == bfd_section_vma (obfd, bsect)
&& cache_ovly_table[i][LMA] == bfd_section_lma (obfd, bsect)
@@ -3453,7 +3453,7 @@ simple_overlay_update (struct obj_sectio
bfd *obfd = osect->objfile->obfd;
asection *bsect = osect->the_bfd_section;
- size = bfd_get_section_size_before_reloc (osect->the_bfd_section);
+ size = bfd_get_section_size (osect->the_bfd_section);
for (i = 0; i < cache_novlys; i++)
if (cache_ovly_table[i][VMA] == bfd_section_vma (obfd, bsect)
&& cache_ovly_table[i][LMA] == bfd_section_lma (obfd, bsect)
Modified: projects/binutils-2.17/contrib/gdb/gdb/tracepoint.c
==============================================================================
--- projects/binutils-2.17/contrib/gdb/gdb/tracepoint.c Fri Oct 22 18:07:29 2010 (r214211)
+++ projects/binutils-2.17/contrib/gdb/gdb/tracepoint.c Fri Oct 22 18:08:37 2010 (r214212)
@@ -1693,7 +1693,7 @@ remote_set_transparent_ranges (void)
anysecs = 1;
lma = s->lma;
- size = bfd_get_section_size_before_reloc (s);
+ size = bfd_get_section_size (s);
sprintf_vma (tmp1, lma);
sprintf_vma (tmp2, lma + size);
sprintf (target_buf + strlen (target_buf),
More information about the svn-src-projects
mailing list