/* 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);
/* 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
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
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,