diff options
author | Andrew Cagney <cagney@redhat.com> | 2004-05-25 21:55:43 +0000 |
---|---|---|
committer | Andrew Cagney <cagney@redhat.com> | 2004-05-25 21:55:43 +0000 |
commit | 97c34f656c6045d6daf0b2a20f0e9de6da5a955a (patch) | |
tree | a7b5770167ce1e68beb8c57145835b157abedba9 /gdb/symfile-mem.c | |
parent | 378fce5bd73ca6ce9195cc2a7679a9eebb33b722 (diff) | |
download | gdb-97c34f656c6045d6daf0b2a20f0e9de6da5a955a.zip gdb-97c34f656c6045d6daf0b2a20f0e9de6da5a955a.tar.gz gdb-97c34f656c6045d6daf0b2a20f0e9de6da5a955a.tar.bz2 |
2004-05-25 Andrew Cagney <cagney@gnu.org>
* symfile.h (symbol_file_add_from_memory): Delete declaration.
* symfile-mem.h: Delete file.
* symfile-mem.c: Do not include "symfile-mem.h".
(symbol_file_add_from_memory): Make static. Use "struct bfd" and
"struct bfd_section". When an error do not bother returning NULL.
(add_symbol_file_from_memory_command): Use "struct bfd" and
"struct bfd_section".
* Makefile.in (symfile_mem_h): Delete.
(symfile-mem.o): Update dependencies.
Diffstat (limited to 'gdb/symfile-mem.c')
-rw-r--r-- | gdb/symfile-mem.c | 17 |
1 files changed, 6 insertions, 11 deletions
diff --git a/gdb/symfile-mem.c b/gdb/symfile-mem.c index d914ac7..00bce17 100644 --- a/gdb/symfile-mem.c +++ b/gdb/symfile-mem.c @@ -52,18 +52,17 @@ #include "target.h" #include "value.h" #include "symfile.h" -#include "symfile-mem.h" /* Read inferior memory at ADDR to find the header of a loaded object file and read its in-core symbols out of inferior memory. TEMPL is a bfd representing the target's format. */ -struct objfile * -symbol_file_add_from_memory (bfd *templ, CORE_ADDR addr, int from_tty) +static struct objfile * +symbol_file_add_from_memory (struct bfd *templ, CORE_ADDR addr, int from_tty) { struct objfile *objf; - bfd *nbfd; - asection *sec; + struct bfd *nbfd; + struct bfd_section *sec; bfd_vma loadbase; struct section_addr_info *sai; unsigned int i; @@ -74,10 +73,7 @@ symbol_file_add_from_memory (bfd *templ, CORE_ADDR addr, int from_tty) nbfd = bfd_elf_bfd_from_remote_memory (templ, addr, &loadbase, target_read_memory); if (nbfd == NULL) - { - error ("Failed to read a valid object file image from memory."); - return NULL; - } + error ("Failed to read a valid object file image from memory."); nbfd->filename = xstrdup ("shared object read from target memory"); @@ -89,7 +85,6 @@ symbol_file_add_from_memory (bfd *templ, CORE_ADDR addr, int from_tty) bfd_close (nbfd); error ("Got object file from memory but can't read symbols: %s.", bfd_errmsg (bfd_get_error ())); - return NULL; } sai = alloc_section_addr_info (bfd_count_sections (nbfd)); @@ -118,7 +113,7 @@ static void add_symbol_file_from_memory_command (char *args, int from_tty) { CORE_ADDR addr; - bfd *templ; + struct bfd *templ; if (args == NULL) error ("add-symbol-file-from-memory requires an expression argument"); |