projects
/
deliverable
/
binutils-gdb.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix gdb build with --enable-build-with-cxx --disable-nls
[deliverable/binutils-gdb.git]
/
gdb
/
mipsread.c
diff --git
a/gdb/mipsread.c
b/gdb/mipsread.c
index e9f04024587211e943773e8fe458ee3d5f4fe654..27a59d23299dc42f6ed338c0950dcba6c5679fe0 100644
(file)
--- a/
gdb/mipsread.c
+++ b/
gdb/mipsread.c
@@
-1,6
+1,6
@@
/* Read a symbol table in MIPS' format (Third-Eye).
/* Read a symbol table in MIPS' format (Third-Eye).
- Copyright (C) 1986-201
3
Free Software Foundation, Inc.
+ Copyright (C) 1986-201
6
Free Software Foundation, Inc.
Contributed by Alessandro Forin (af@cs.cmu.edu) at CMU. Major work
by Per Bothner, John Gilmore and Ian Lance Taylor at Cygnus Support.
Contributed by Alessandro Forin (af@cs.cmu.edu) at CMU. Major work
by Per Bothner, John Gilmore and Ian Lance Taylor at Cygnus Support.
@@
-24,7
+24,6
@@
mdebugread.c. */
#include "defs.h"
mdebugread.c. */
#include "defs.h"
-#include "gdb_string.h"
#include "bfd.h"
#include "symtab.h"
#include "objfiles.h"
#include "bfd.h"
#include "symtab.h"
#include "objfiles.h"
@@
-216,27
+215,39
@@
read_alphacoff_dynamic_symtab (struct section_offsets *section_offsets,
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);
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);
+ sym_secptr =
(char *)
xmalloc (sym_secsize);
cleanups = make_cleanup (xfree, sym_secptr);
cleanups = make_cleanup (xfree, sym_secptr);
- str_secptr = xmalloc (str_secsize);
+ str_secptr =
(char *)
xmalloc (str_secsize);
make_cleanup (xfree, str_secptr);
make_cleanup (xfree, str_secptr);
- dyninfo_secptr = xmalloc (dyninfo_secsize);
+ dyninfo_secptr =
(char *)
xmalloc (dyninfo_secsize);
make_cleanup (xfree, dyninfo_secptr);
make_cleanup (xfree, dyninfo_secptr);
- got_secptr = xmalloc (got_secsize);
+ got_secptr =
(char *)
xmalloc (got_secsize);
make_cleanup (xfree, got_secptr);
if (!bfd_get_section_contents (abfd, si.sym_sect, sym_secptr,
(file_ptr) 0, sym_secsize))
make_cleanup (xfree, got_secptr);
if (!bfd_get_section_contents (abfd, si.sym_sect, sym_secptr,
(file_ptr) 0, sym_secsize))
- return;
+ {
+ do_cleanups (cleanups);
+ return;
+ }
if (!bfd_get_section_contents (abfd, si.str_sect, str_secptr,
(file_ptr) 0, str_secsize))
if (!bfd_get_section_contents (abfd, si.str_sect, str_secptr,
(file_ptr) 0, str_secsize))
- return;
+ {
+ do_cleanups (cleanups);
+ return;
+ }
if (!bfd_get_section_contents (abfd, si.dyninfo_sect, dyninfo_secptr,
(file_ptr) 0, dyninfo_secsize))
if (!bfd_get_section_contents (abfd, si.dyninfo_sect, dyninfo_secptr,
(file_ptr) 0, dyninfo_secsize))
- return;
+ {
+ do_cleanups (cleanups);
+ return;
+ }
if (!bfd_get_section_contents (abfd, si.got_sect, got_secptr,
(file_ptr) 0, got_secsize))
if (!bfd_get_section_contents (abfd, si.got_sect, got_secptr,
(file_ptr) 0, got_secsize))
- return;
+ {
+ do_cleanups (cleanups);
+ return;
+ }
/* Find the number of local GOT entries and the index for the
first dynamic symbol in the GOT. */
/* Find the number of local GOT entries and the index for the
first dynamic symbol in the GOT. */
@@
-264,7
+275,10
@@
read_alphacoff_dynamic_symtab (struct section_offsets *section_offsets,
}
}
if (dt_mips_local_gotno < 0 || dt_mips_gotsym < 0)
}
}
if (dt_mips_local_gotno < 0 || dt_mips_gotsym < 0)
- return;
+ {
+ do_cleanups (cleanups);
+ return;
+ }
/* Scan all dynamic symbols and enter them into the minimal symbol
table if appropriate. */
/* Scan all dynamic symbols and enter them into the minimal symbol
table if appropriate. */
@@
-352,7
+366,6
@@
read_alphacoff_dynamic_symtab (struct section_offsets *section_offsets,
ms_type = mst_text;
else
ms_type = mst_file_text;
ms_type = mst_text;
else
ms_type = mst_file_text;
- sym_value += ANOFFSET (section_offsets, SECT_OFF_TEXT (objfile));
}
else if (sym_shndx == SHN_MIPS_DATA)
{
}
else if (sym_shndx == SHN_MIPS_DATA)
{
@@
-360,7
+373,6
@@
read_alphacoff_dynamic_symtab (struct section_offsets *section_offsets,
ms_type = mst_data;
else
ms_type = mst_file_data;
ms_type = mst_data;
else
ms_type = mst_file_data;
- sym_value += ANOFFSET (section_offsets, SECT_OFF_DATA (objfile));
}
else if (sym_shndx == SHN_MIPS_ACOMMON)
{
}
else if (sym_shndx == SHN_MIPS_ACOMMON)
{
@@
-368,7
+380,6
@@
read_alphacoff_dynamic_symtab (struct section_offsets *section_offsets,
ms_type = mst_bss;
else
ms_type = mst_file_bss;
ms_type = mst_bss;
else
ms_type = mst_file_bss;
- sym_value += ANOFFSET (section_offsets, SECT_OFF_BSS (objfile));
}
else if (sym_shndx == SHN_ABS)
{
}
else if (sym_shndx == SHN_ABS)
{
@@
-390,7
+401,6
@@
read_alphacoff_dynamic_symtab (struct section_offsets *section_offsets,
static const struct sym_fns ecoff_sym_fns =
{
static const struct sym_fns ecoff_sym_fns =
{
- bfd_target_ecoff_flavour,
mipscoff_new_init, /* init anything gbl to entire symtab */
mipscoff_symfile_init, /* read initial info, setup for sym_read() */
mipscoff_symfile_read, /* read a symbol file into symtab */
mipscoff_new_init, /* init anything gbl to entire symtab */
mipscoff_symfile_init, /* read initial info, setup for sym_read() */
mipscoff_symfile_read, /* read a symbol file into symtab */
@@
-410,5
+420,5
@@
void _initialize_mipsread (void);
void
_initialize_mipsread (void)
{
void
_initialize_mipsread (void)
{
- add_symtab_fns (&ecoff_sym_fns);
+ add_symtab_fns (
bfd_target_ecoff_flavour,
&ecoff_sym_fns);
}
}
This page took
0.02691 seconds
and
4
git commands to generate.