diff options
author | Joel Brobecker <brobecker@gnat.com> | 2010-11-23 00:59:58 +0000 |
---|---|---|
committer | Joel Brobecker <brobecker@gnat.com> | 2010-11-23 00:59:58 +0000 |
commit | 4889bbbc1d2574889f4dfad9999c1ffb1620772f (patch) | |
tree | fdbdeaa30d4ec77b1fdc0861eee807c5727074d4 | |
parent | 0d14a781860505c36ed7185b4a977e1e564ff742 (diff) | |
download | gdb-4889bbbc1d2574889f4dfad9999c1ffb1620772f.zip gdb-4889bbbc1d2574889f4dfad9999c1ffb1620772f.tar.gz gdb-4889bbbc1d2574889f4dfad9999c1ffb1620772f.tar.bz2 |
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.
-rw-r--r-- | gdb/ChangeLog | 4 | ||||
-rw-r--r-- | gdb/symfile.c | 71 |
2 files changed, 4 insertions, 71 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index dc34d82..3fb418c 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,5 +1,9 @@ 2010-11-22 Joel Brobecker <brobecker@adacore.com> + * symfile.c: Remove all "#if 0"/"#endif" blocks. + +2010-11-22 Joel Brobecker <brobecker@adacore.com> + * symfile.c: Add missing second space after period in various comments. 2010-11-22 Joel Brobecker <brobecker@adacore.com> diff --git a/gdb/symfile.c b/gdb/symfile.c index 42e1c64..30fd125 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, |