diff options
author | Michael Chastain <mec@google.com> | 2003-11-11 20:04:52 +0000 |
---|---|---|
committer | Michael Chastain <mec@google.com> | 2003-11-11 20:04:52 +0000 |
commit | f594e5e9c9b41dbe1223b25be5ddeacc5cd72e2e (patch) | |
tree | 728d69ebc663806ac63a66f257dc4085c4e27a4c /gdb/elfread.c | |
parent | d9407aaa549c6270b7d99443835d287bce6b50a7 (diff) | |
download | gdb-f594e5e9c9b41dbe1223b25be5ddeacc5cd72e2e.zip gdb-f594e5e9c9b41dbe1223b25be5ddeacc5cd72e2e.tar.gz gdb-f594e5e9c9b41dbe1223b25be5ddeacc5cd72e2e.tar.bz2 |
2003-11-07 Michael Chastain <mec@shout.net>
* symtab.h (struct minimal_symbol): Add size.
* dbxread.c: Use it.
* elfread.c: (record_minimal_symbol_and_info): Do not use info.
Rename to record_minimal_symbol.
(elf_symtab_read): Set MSYMBOL_SIZE explicitly.
* minsyms.c (prim_record_minimal_symbol_and_info): Initialize MSYMBOL_SIZE.
(install_minimal_symbols): Ditto.
* objfiles.c (terminate_minimal_symbol_table): Ditto.
* arm-tdep.c: Delete unused MSYMBOL_SIZE.
* m68hc11-tdep.c: Ditto.
* mips-tdep.c: Ditto.
* sh64-tdep.c: Ditto.
Diffstat (limited to 'gdb/elfread.c')
-rw-r--r-- | gdb/elfread.c | 25 |
1 files changed, 14 insertions, 11 deletions
diff --git a/gdb/elfread.c b/gdb/elfread.c index 8814f89..d899c09 100644 --- a/gdb/elfread.c +++ b/gdb/elfread.c @@ -105,15 +105,15 @@ elf_locate_sections (bfd *ignore_abfd, asection *sectp, void *eip) } static struct minimal_symbol * -record_minimal_symbol_and_info (char *name, CORE_ADDR address, - enum minimal_symbol_type ms_type, char *info, /* FIXME, is this really char *? */ - asection *bfd_section, struct objfile *objfile) +record_minimal_symbol (char *name, CORE_ADDR address, + enum minimal_symbol_type ms_type, + asection *bfd_section, struct objfile *objfile) { if (ms_type == mst_text || ms_type == mst_file_text) address = SMASH_TEXT_ADDRESS (address); return prim_record_minimal_symbol_and_info - (name, address, ms_type, info, bfd_section->index, bfd_section, objfile); + (name, address, ms_type, NULL, bfd_section->index, bfd_section, objfile); } /* @@ -163,7 +163,6 @@ elf_symtab_read (struct objfile *objfile, int dynamic) char *filesymname = obsavestring ("", 0, &objfile->symbol_obstack); #endif struct dbx_symfile_info *dbx = objfile->sym_stab_info; - unsigned long size; int stripped = (bfd_get_symcount (objfile->obfd) == 0); if (dynamic) @@ -223,9 +222,9 @@ elf_symtab_read (struct objfile *objfile, int dynamic) if (symaddr == 0) continue; symaddr += offset; - msym = record_minimal_symbol_and_info + msym = record_minimal_symbol ((char *) sym->name, symaddr, - mst_solib_trampoline, NULL, sym->section, objfile); + mst_solib_trampoline, sym->section, objfile); #ifdef SOFUN_ADDRESS_MAYBE_MISSING if (msym != NULL) msym->filename = filesymname; @@ -436,11 +435,15 @@ elf_symtab_read (struct objfile *objfile, int dynamic) /* ms_type = mst_unknown; */ continue; /* Skip this symbol. */ } - /* Pass symbol size field in via BFD. FIXME!!! */ - size = ((elf_symbol_type *) sym)->internal_elf_sym.st_size; - msym = record_minimal_symbol_and_info + msym = record_minimal_symbol ((char *) sym->name, symaddr, - ms_type, (void *) size, sym->section, objfile); + ms_type, sym->section, objfile); + if (msym) + { + /* Pass symbol size field in via BFD. FIXME!!! */ + unsigned long size = ((elf_symbol_type *) sym)->internal_elf_sym.st_size; + MSYMBOL_SIZE(msym) = size; + } #ifdef SOFUN_ADDRESS_MAYBE_MISSING if (msym != NULL) msym->filename = filesymname; |