summaryrefslogtreecommitdiff
path: root/gdb/symfile.c
diff options
context:
space:
mode:
authorJoel Brobecker <brobecker@gnat.com>2010-11-23 00:59:58 +0000
committerJoel Brobecker <brobecker@gnat.com>2010-11-23 00:59:58 +0000
commitd8d0d782ba2ecf92f27a8998d1e420598d42b22f (patch)
tree9160491df837e2e1c1ac12686837b1de1a30badc /gdb/symfile.c
parent23f09e1ff96133c8b9816cf74bca30c443b48275 (diff)
downloadgdb-d8d0d782ba2ecf92f27a8998d1e420598d42b22f.tar.gz
Remove commented-out code in symfile.c
This patch removes some code that has been `#if 0'-ed since at least 1999 or 2000... gdb/ChangeLog: * symfile.c: Remove all "#if 0"/"#endif" blocks.
Diffstat (limited to 'gdb/symfile.c')
-rw-r--r--gdb/symfile.c71
1 files changed, 0 insertions, 71 deletions
diff --git a/gdb/symfile.c b/gdb/symfile.c
index 42e1c64d2e8..30fd1256a97 100644
--- a/gdb/symfile.c
+++ b/gdb/symfile.c
@@ -87,11 +87,6 @@ extern void report_transfer_performance (unsigned long, time_t, time_t);
/* Functions this file defines */
-#if 0
-static int simple_read_overlay_region_table (void);
-static void simple_free_overlay_region_table (void);
-#endif
-
static void load_command (char *, int);
static void symbol_file_add_main_1 (char *args, int from_tty, int flags);
@@ -3302,17 +3297,8 @@ overlay_command (char *args, int from_tty)
/* Cached, dynamically allocated copies of the target data structures: */
static unsigned (*cache_ovly_table)[4] = 0;
-#if 0
-static unsigned (*cache_ovly_region_table)[3] = 0;
-#endif
static unsigned cache_novlys = 0;
-#if 0
-static unsigned cache_novly_regions = 0;
-#endif
static CORE_ADDR cache_ovly_table_base = 0;
-#if 0
-static CORE_ADDR cache_ovly_region_table_base = 0;
-#endif
enum ovly_index
{
VMA, SIZE, LMA, MAPPED
@@ -3329,19 +3315,6 @@ simple_free_overlay_table (void)
cache_ovly_table_base = 0;
}
-#if 0
-/* Throw away the cached copy of _ovly_region_table */
-static void
-simple_free_overlay_region_table (void)
-{
- if (cache_ovly_region_table)
- xfree (cache_ovly_region_table);
- cache_novly_regions = 0;
- cache_ovly_region_table = NULL;
- cache_ovly_region_table_base = 0;
-}
-#endif
-
/* Read an array of ints of size SIZE from the target into a local buffer.
Convert to host order. int LEN is number of ints */
static void
@@ -3402,50 +3375,6 @@ simple_read_overlay_table (void)
return 1; /* SUCCESS */
}
-#if 0
-/* Find and grab a copy of the target _ovly_region_table
- (and _novly_regions, which is needed for the table's size) */
-static int
-simple_read_overlay_region_table (void)
-{
- struct minimal_symbol *msym;
- struct gdbarch *gdbarch;
- int word_size;
- enum bfd_endian byte_order;
-
- simple_free_overlay_region_table ();
- msym = lookup_minimal_symbol ("_novly_regions", NULL, NULL);
- if (msym == NULL)
- return 0; /* failure */
-
- gdbarch = get_objfile_arch (msymbol_objfile (msym));
- word_size = gdbarch_long_bit (gdbarch) / TARGET_CHAR_BIT;
- byte_order = gdbarch_byte_order (gdbarch);
-
- cache_novly_regions = read_memory_integer (SYMBOL_VALUE_ADDRESS (msym),
- 4, byte_order);
-
- cache_ovly_region_table = (void *) xmalloc (cache_novly_regions * 12);
- if (cache_ovly_region_table != NULL)
- {
- msym = lookup_minimal_symbol ("_ovly_region_table", NULL, NULL);
- if (msym != NULL)
- {
- cache_ovly_region_table_base = SYMBOL_VALUE_ADDRESS (msym);
- read_target_long_array (cache_ovly_region_table_base,
- (unsigned int *) cache_ovly_region_table,
- cache_novly_regions * 3,
- word_size, byte_order);
- }
- else
- return 0; /* failure */
- }
- else
- return 0; /* failure */
- return 1; /* SUCCESS */
-}
-#endif
-
/* Function: simple_overlay_update_1
A helper function for simple_overlay_update. Assuming a cached copy
of _ovly_table exists, look through it to find an entry whose vma,