diff options
author | Tom Tromey <tromey@redhat.com> | 2013-03-14 20:11:12 +0000 |
---|---|---|
committer | Tom Tromey <tromey@redhat.com> | 2013-03-14 20:11:12 +0000 |
commit | cc0ea93c7531fe59c4d7d2b01b01acb9bbe0b7fd (patch) | |
tree | feab4efd29d97f42e35d97c3da955b24421c7471 /gdb | |
parent | 08c23b0d0fc03ae7248e8dc5e525bec29a85d209 (diff) | |
download | gdb-cc0ea93c7531fe59c4d7d2b01b01acb9bbe0b7fd.zip gdb-cc0ea93c7531fe59c4d7d2b01b01acb9bbe0b7fd.tar.gz gdb-cc0ea93c7531fe59c4d7d2b01b01acb9bbe0b7fd.tar.bz2 |
gdb
* symfile.c (get_debug_link_info): Remove.
(find_separate_debug_file_by_debuglink): Use
bfd_get_debug_link_info.
bfd
* opncls.c (bfd_get_debug_link_info): Rename from
get_debug_link_info. Export. Update comment.
(find_separate_debug_file): Update.
* bfd-in2.h: Rebuild.
Diffstat (limited to 'gdb')
-rw-r--r-- | gdb/ChangeLog | 6 | ||||
-rw-r--r-- | gdb/symfile.c | 32 |
2 files changed, 7 insertions, 31 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 3f1ce0e..1404f2557 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,5 +1,11 @@ 2013-03-14 Tom Tromey <tromey@redhat.com> + * symfile.c (get_debug_link_info): Remove. + (find_separate_debug_file_by_debuglink): Use + bfd_get_debug_link_info. + +2013-03-14 Tom Tromey <tromey@redhat.com> + * symtab.c (error_in_psymtab_expansion): New function. (lookup_symbol_aux_quick) (basic_lookup_transparent_type_quick): Remove "last resort" diff --git a/gdb/symfile.c b/gdb/symfile.c index 5ed2591..925ca7b 100644 --- a/gdb/symfile.c +++ b/gdb/symfile.c @@ -1304,36 +1304,6 @@ symbol_file_clear (int from_tty) printf_unfiltered (_("No symbol file now.\n")); } -static char * -get_debug_link_info (struct objfile *objfile, unsigned long *crc32_out) -{ - asection *sect; - bfd_size_type debuglink_size; - unsigned long crc32; - char *contents; - int crc_offset; - - sect = bfd_get_section_by_name (objfile->obfd, ".gnu_debuglink"); - - if (sect == NULL) - return NULL; - - debuglink_size = bfd_section_size (objfile->obfd, sect); - - contents = xmalloc (debuglink_size); - bfd_get_section_contents (objfile->obfd, sect, contents, - (file_ptr)0, (bfd_size_type)debuglink_size); - - /* Crc value is stored after the filename, aligned up to 4 bytes. */ - crc_offset = strlen (contents) + 1; - crc_offset = (crc_offset + 3) & ~3; - - crc32 = bfd_get_32 (objfile->obfd, (bfd_byte *) (contents + crc_offset)); - - *crc32_out = crc32; - return contents; -} - /* Return 32-bit CRC for ABFD. If successful store it to *FILE_CRC_RETURN and return 1. Otherwise print a warning and return 0. ABFD seek position is not preserved. */ @@ -1584,7 +1554,7 @@ find_separate_debug_file_by_debuglink (struct objfile *objfile) unsigned long crc32; struct cleanup *cleanups; - debuglink = get_debug_link_info (objfile, &crc32); + debuglink = bfd_get_debug_link_info (objfile->obfd, &crc32); if (debuglink == NULL) { |