* [ob] Delete unused cris:bfd_lookup_symbol
@ 2004-03-15 20:32 Andrew Cagney
2004-03-19 0:09 ` Andrew Cagney
0 siblings, 1 reply; 2+ messages in thread
From: Andrew Cagney @ 2004-03-15 20:32 UTC (permalink / raw)
To: gdb-patches
[-- Attachment #1: Type: text/plain, Size: 91 bytes --]
Just FYI,
Recent cleanups left this unused (and it causes a -Werror). Committed.
Andrew
[-- Attachment #2: diffs --]
[-- Type: text/plain, Size: 1843 bytes --]
2004-03-15 Andrew Cagney <cagney@redhat.com>
* cris-tdep.c (bfd_lookup_symbol): Delete unused function.
Index: cris-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/cris-tdep.c,v
retrieving revision 1.103
diff -u -r1.103 cris-tdep.c
--- cris-tdep.c 4 Mar 2004 09:10:20 -0000 1.103
+++ cris-tdep.c 15 Mar 2004 20:30:32 -0000
@@ -351,8 +351,6 @@
static void cris_mode_update (char *ignore_args, int from_tty,
struct cmd_list_element *c);
-static CORE_ADDR bfd_lookup_symbol (bfd *, const char *);
-
static CORE_ADDR cris_scan_prologue (CORE_ADDR pc,
struct frame_info *next_frame,
struct cris_unwind_cache *info);
@@ -3718,42 +3716,6 @@
if (!gdbarch_update_p (info))
internal_error (__FILE__, __LINE__, "cris_gdbarch_update: failed to update architecture.");
}
-}
-
-/* Copied from pa64solib.c, with a couple of minor changes. */
-
-static CORE_ADDR
-bfd_lookup_symbol (bfd *abfd, const char *symname)
-{
- unsigned int storage_needed;
- asymbol *sym;
- asymbol **symbol_table;
- unsigned int number_of_symbols;
- unsigned int i;
- struct cleanup *back_to;
- CORE_ADDR symaddr = 0;
-
- storage_needed = bfd_get_symtab_upper_bound (abfd);
-
- if (storage_needed > 0)
- {
- symbol_table = (asymbol **) xmalloc (storage_needed);
- back_to = make_cleanup (free, symbol_table);
- number_of_symbols = bfd_canonicalize_symtab (abfd, symbol_table);
-
- for (i = 0; i < number_of_symbols; i++)
- {
- sym = *symbol_table++;
- if (!strcmp (sym->name, symname))
- {
- /* Bfd symbols are section relative. */
- symaddr = sym->value + sym->section->vma;
- break;
- }
- }
- do_cleanups (back_to);
- }
- return (symaddr);
}
static struct gdbarch *
^ permalink raw reply [flat|nested] 2+ messages in thread* [ob] Delete unused cris:bfd_lookup_symbol
2004-03-15 20:32 [ob] Delete unused cris:bfd_lookup_symbol Andrew Cagney
@ 2004-03-19 0:09 ` Andrew Cagney
0 siblings, 0 replies; 2+ messages in thread
From: Andrew Cagney @ 2004-03-19 0:09 UTC (permalink / raw)
To: gdb-patches
[-- Attachment #1: Type: text/plain, Size: 91 bytes --]
Just FYI,
Recent cleanups left this unused (and it causes a -Werror). Committed.
Andrew
[-- Attachment #2: diffs --]
[-- Type: text/plain, Size: 1843 bytes --]
2004-03-15 Andrew Cagney <cagney@redhat.com>
* cris-tdep.c (bfd_lookup_symbol): Delete unused function.
Index: cris-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/cris-tdep.c,v
retrieving revision 1.103
diff -u -r1.103 cris-tdep.c
--- cris-tdep.c 4 Mar 2004 09:10:20 -0000 1.103
+++ cris-tdep.c 15 Mar 2004 20:30:32 -0000
@@ -351,8 +351,6 @@
static void cris_mode_update (char *ignore_args, int from_tty,
struct cmd_list_element *c);
-static CORE_ADDR bfd_lookup_symbol (bfd *, const char *);
-
static CORE_ADDR cris_scan_prologue (CORE_ADDR pc,
struct frame_info *next_frame,
struct cris_unwind_cache *info);
@@ -3718,42 +3716,6 @@
if (!gdbarch_update_p (info))
internal_error (__FILE__, __LINE__, "cris_gdbarch_update: failed to update architecture.");
}
-}
-
-/* Copied from pa64solib.c, with a couple of minor changes. */
-
-static CORE_ADDR
-bfd_lookup_symbol (bfd *abfd, const char *symname)
-{
- unsigned int storage_needed;
- asymbol *sym;
- asymbol **symbol_table;
- unsigned int number_of_symbols;
- unsigned int i;
- struct cleanup *back_to;
- CORE_ADDR symaddr = 0;
-
- storage_needed = bfd_get_symtab_upper_bound (abfd);
-
- if (storage_needed > 0)
- {
- symbol_table = (asymbol **) xmalloc (storage_needed);
- back_to = make_cleanup (free, symbol_table);
- number_of_symbols = bfd_canonicalize_symtab (abfd, symbol_table);
-
- for (i = 0; i < number_of_symbols; i++)
- {
- sym = *symbol_table++;
- if (!strcmp (sym->name, symname))
- {
- /* Bfd symbols are section relative. */
- symaddr = sym->value + sym->section->vma;
- break;
- }
- }
- do_cleanups (back_to);
- }
- return (symaddr);
}
static struct gdbarch *
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2004-03-15 20:32 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-03-15 20:32 [ob] Delete unused cris:bfd_lookup_symbol Andrew Cagney
2004-03-19 0:09 ` Andrew Cagney
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox