aboutsummaryrefslogtreecommitdiff
path: root/gdb/objfiles.c
diff options
context:
space:
mode:
authorJim Kingdon <jkingdon@engr.sgi.com>1994-03-02 03:01:34 +0000
committerJim Kingdon <jkingdon@engr.sgi.com>1994-03-02 03:01:34 +0000
commit25200748a2ad772bb72958902dd18b314ec4e6c9 (patch)
tree01a1e4e75536ec6fc99cca358f17d3224a87f49c /gdb/objfiles.c
parent6e2194f0772c505e0ee872611664188c8513a0b1 (diff)
downloadgdb-25200748a2ad772bb72958902dd18b314ec4e6c9.zip
gdb-25200748a2ad772bb72958902dd18b314ec4e6c9.tar.gz
gdb-25200748a2ad772bb72958902dd18b314ec4e6c9.tar.bz2
* os9kread.c (os9k_process_one_symbol): Rename
VARIABLES_INSIDE_BLOCK to OS9K_VARIABLES_INSIDE_BLOCK. * symfile.c (symbol_file_command): Check for (CORE_ADDR)-1, not (CORE_ADDR)0, from target_link, since that is what it uses. Process name at end, not during parsing (like we did before Kung's change), so that -readnow and -mapped can appear anywhere. Make text_relocation a local variable. * config/i386/i386os9k.mt: Fix comment. * Makefile.in (ALLDEPFILES): Add remote-os9k.c. * os9kread.c: Put "comments" after #endif inside /* */. * stabsread.h: Add os9k_stabs variable. * stabsread.c (start_stabs), os9kread.c (os9k_process_one_symbol): Set it. * stabsread.c (define_symbol): If os9k_stabs, put a 'V' symbol descriptor in global_symbols not local_symbols. (read_type): If os9k_stabs, accept 'c', 'i', and 'b' type descriptors. (read_type): If os9k_stabs, accept function parameters after 'f' type descriptor. (read_array_type): If os9k_stabs, don't expect index type and expect lower and upper to be separated by ',' not ';'. (read_enum_type): If os9k_stabs, read a number before the first enumeration constant. (os9k_init_type_vector): New function. (dbx_lookup_type): Call it when starting new type vector. * config/i386/tm-i386os9k.h: Define BELIEVE_PCC_PROMOTION. * (os9k_process_one_symbol): Call define_symbol not os9k_define_symbol. * os9kstab.c: Removed. * Makefile.in: Update accordingly. * objfiles.c (objfile_relocate_data): Removed. * remote-os9k.c (rombug_wait): Call objfile_relocate not objfile_relocate_data. * objfiles.h, objfiles.c: Remove find_pc_objfile. * remote-os9k.c (rombug_wait): Call find_pc_section not find_pc_objfile. * main.c (quit_command): Check inferior_pid; revert Kung change. * remote-os9k.c (rombug_create_inferior): Set inferior_pid.
Diffstat (limited to 'gdb/objfiles.c')
-rw-r--r--gdb/objfiles.c116
1 files changed, 0 insertions, 116 deletions
diff --git a/gdb/objfiles.c b/gdb/objfiles.c
index 40ab8fb..381a095 100644
--- a/gdb/objfiles.c
+++ b/gdb/objfiles.c
@@ -421,21 +421,6 @@ free_all_objfiles ()
clear_symtab_users ();
}
-struct objfile *
-find_pc_objfile(pc)
- CORE_ADDR pc;
-{
-struct objfile *obj;
-struct obj_section *s;
-
- ALL_OBJFILES (obj)
- for (s = obj->sections; s < obj->sections_end; s++)
- {
- if (s->addr <= pc && s->endaddr > pc) return obj;
- }
- return (struct objfile *)NULL;
-}
-
/* Relocate OBJFILE to NEW_OFFSETS. There should be OBJFILE->NUM_SECTIONS
entries in new_offsets. */
void
@@ -555,107 +540,6 @@ objfile_relocate (objfile, new_offsets)
}
}
-/* Relocate OBJFILE to NEW_OFFSETS. There should be OBJFILE->NUM_SECTIONS
- entries in new_offsets. */
-void
-objfile_relocate_data (objfile, new_offsets)
- struct objfile *objfile;
- struct section_offsets *new_offsets;
-{
- struct section_offsets *delta = (struct section_offsets *) alloca
- (sizeof (struct section_offsets)
- + objfile->num_sections * sizeof (delta->offsets));
-
- {
- int i;
- int something_changed = 0;
- for (i = 0; i < objfile->num_sections; ++i)
- {
- if (i != SECT_OFF_DATA && i != SECT_OFF_BSS)
- ANOFFSET (delta, i) = 0;
- else
- ANOFFSET (delta, i) = ANOFFSET(new_offsets, i)
- - ANOFFSET (objfile->section_offsets, i);
- if (ANOFFSET (delta, i) != 0)
- something_changed = 1;
- }
- if (!something_changed)
- return;
- }
-
- /* OK, get all the symtabs. */
- {
- struct symtab *s;
-
- for (s = objfile->symtabs; s; s = s->next)
- {
- struct linetable *l;
- struct blockvector *bv;
- int i;
-
- /* Don't relocate a shared blockvector more than once. */
- if (!s->primary)
- continue;
-
- bv = BLOCKVECTOR (s);
- for (i = 0; i < BLOCKVECTOR_NBLOCKS (bv); ++i)
- {
- struct block *b;
- int j;
-
- b = BLOCKVECTOR_BLOCK (bv, i);
- BLOCK_START (b) += ANOFFSET (delta, s->block_line_section);
- BLOCK_END (b) += ANOFFSET (delta, s->block_line_section);
-
- for (j = 0; j < BLOCK_NSYMS (b); ++j)
- {
- struct symbol *sym = BLOCK_SYM (b, j);
- /* The RS6000 code from which this was taken skipped
- any symbols in STRUCT_NAMESPACE or UNDEF_NAMESPACE.
- But I'm leaving out that test, on the theory that
- they can't possibly pass the tests below. */
- if ((SYMBOL_CLASS (sym) == LOC_LABEL
- || SYMBOL_CLASS (sym) == LOC_STATIC)
- && SYMBOL_SECTION (sym) >= 0)
- {
- SYMBOL_VALUE_ADDRESS (sym) +=
- ANOFFSET (delta, SYMBOL_SECTION (sym));
- }
- }
- }
- }
- }
-
- {
- struct partial_symbol *psym;
-
- for (psym = objfile->global_psymbols.list;
- psym < objfile->global_psymbols.next;
- psym++)
- if (SYMBOL_SECTION (psym) >= 0)
- SYMBOL_VALUE_ADDRESS (psym) += ANOFFSET (delta, SYMBOL_SECTION (psym));
- for (psym = objfile->static_psymbols.list;
- psym < objfile->static_psymbols.next;
- psym++)
- if (SYMBOL_SECTION (psym) >= 0)
- SYMBOL_VALUE_ADDRESS (psym) += ANOFFSET (delta, SYMBOL_SECTION (psym));
- }
-
- {
- struct minimal_symbol *msym;
- ALL_OBJFILE_MSYMBOLS (objfile, msym)
- if (SYMBOL_SECTION (msym) >= 0)
- SYMBOL_VALUE_ADDRESS (msym) += ANOFFSET (delta, SYMBOL_SECTION (msym));
- }
-
- {
- int i;
- for (i = 0; i < objfile->num_sections; ++i)
- if (i == SECT_OFF_DATA || i == SECT_OFF_BSS)
- ANOFFSET (objfile->section_offsets, i) = ANOFFSET (new_offsets, i);
- }
-}
-
/* Many places in gdb want to test just to see if we have any partial
symbols available. This function returns zero if none are currently
available, nonzero otherwise. */