2004-05-25 Andrew Cagney <cagney@gnu.org>
authorAndrew Cagney <cagney@redhat.com>
Tue, 25 May 2004 21:55:43 +0000 (21:55 +0000)
committerAndrew Cagney <cagney@redhat.com>
Tue, 25 May 2004 21:55:43 +0000 (21:55 +0000)
* 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.

gdb/ChangeLog
gdb/Makefile.in
gdb/symfile-mem.c
gdb/symfile-mem.h [deleted file]
gdb/symfile.h

index 99aea54256315157151a4d4dff19b280df028c36..dd24fe530a046a9fb4c2cd3802adb44845984039 100644 (file)
@@ -1,3 +1,15 @@
+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.
+
 2004-05-25  Nick Roberts  <nickrob@gnu.org>
 
        * gdb-mi.el: New file.
index 42a6ffd10291a6d8c1a3f0254c7810565a505049..d90ea94c38d2bb84630384e2be80c4396ed39649 100644 (file)
@@ -757,7 +757,6 @@ srec_h = srec.h
 stabsread_h = stabsread.h
 stack_h = stack.h
 symfile_h = symfile.h
-symfile_mem_h = symfile-mem.h
 symtab_h = symtab.h
 target_h = target.h $(bfd_h) $(symtab_h) $(dcache_h) $(memattr_h)
 terminal_h = terminal.h
@@ -2446,8 +2445,7 @@ symfile.o: symfile.c $(defs_h) $(bfdlink_h) $(symtab_h) $(gdbtypes_h) \
        $(hashtab_h) $(readline_h) $(gdb_assert_h) $(block_h) \
        $(gdb_string_h) $(gdb_stat_h)
 symfile-mem.o: symfile-mem.c $(defs_h) $(symtab_h) $(gdbcore_h) \
-       $(objfiles_h) $(gdbcmd_h) $(target_h) $(value_h) $(symfile_h) \
-       $(symfile_mem_h)
+       $(objfiles_h) $(gdbcmd_h) $(target_h) $(value_h) $(symfile_h)
 symmisc.o: symmisc.c $(defs_h) $(symtab_h) $(gdbtypes_h) $(bfd_h) \
        $(symfile_h) $(objfiles_h) $(breakpoint_h) $(command_h) \
        $(gdb_obstack_h) $(language_h) $(bcache_h) $(block_h) $(gdb_regex_h) \
index d914ac733d9042c145e2045870208e68a59bd8df..00bce17a3fc475c2cf84784223ce4989d291538f 100644 (file)
 #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");
diff --git a/gdb/symfile-mem.h b/gdb/symfile-mem.h
deleted file mode 100644 (file)
index b89d589..0000000
+++ /dev/null
@@ -1,33 +0,0 @@
-/* Declarations for reading symbol files from memory into GDB.
-
-   Copyright 2004 Free Software Foundation, Inc.
-
-   This file is part of GDB.
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 2 of the License, or
-   (at your option) any later version.
-
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-
-   You should have received a copy of the GNU General Public License
-   along with this program; if not, write to the Free Software
-   Foundation, Inc., 59 Temple Place - Suite 330,
-   Boston, MA 02111-1307, USA.  */
-
-#if !defined (SYMFILE_MEM_H)
-#define SYMFILE_MEM_H
-
-/* You must #include "bfd.h" and "defs.h" before #including this file.  */
-
-/* Forward declarations.  */
-struct objfile;
-
-struct objfile *(symbol_file_add_from_memory
-                 (bfd *templ, CORE_ADDR addr, int from_tty));
-
-#endif /* SYMFILE_MEM_H */
index 4c085969c4c28f1745dfc30a4f3c47fadae29e20..b76d3baddc86ebf4fa9625d5df064e9796723143 100644 (file)
@@ -306,12 +306,6 @@ extern CORE_ADDR symbol_overlayed_address (CORE_ADDR, asection *);
 /* Load symbols from a file.  */
 extern void symbol_file_add_main (char *args, int from_tty);
 
-/* 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.  */
-extern struct objfile *symbol_file_add_from_memory (bfd *templ, CORE_ADDR addr,
-                                                   int from_tty);
-
 /* Clear GDB symbol tables.  */
 extern void symbol_file_clear (int from_tty);
 
This page took 0.036997 seconds and 4 git commands to generate.