static int line_vector_length;
-static struct blockvector *
-make_blockvector PARAMS ((struct objfile *));
-
static int
init_dst_sections PARAMS ((int));
static void
dst_symfile_finish PARAMS ((struct objfile *));
-static void
-record_minimal_symbol PARAMS ((char *, CORE_ADDR, enum minimal_symbol_type,
- struct objfile *));
-
static void
dst_end_symtab PARAMS ((struct objfile *));
static void
dst_record_line PARAMS ((int, CORE_ADDR));
-static struct blockvector *
-make_blockvector (objfile)
- struct objfile *objfile;
-{
- register struct pending_block *next, *next1;
- register struct blockvector *blockvector;
- register int i;
-
- /* Count the length of the list of blocks. */
-
- for (next = pending_blocks, i = 0; next; next = next->next, i++);
-
- blockvector = (struct blockvector *)
- obstack_alloc (&objfile->symbol_obstack, sizeof (struct blockvector) + (i - 1) * sizeof (struct block *));
-
- /* Copy the blocks into the blockvector.
- This is done in reverse order, which happens to put
- the blocks into the proper order (ascending starting address).
- */
-
- BLOCKVECTOR_NBLOCKS (blockvector) = i;
- for (next = pending_blocks; next; next = next->next)
- BLOCKVECTOR_BLOCK (blockvector, --i) = next->block;
-
- /* Now free the links of the list, and empty the list. */
-
- for (next = pending_blocks; next; next = next1)
- {
- next1 = next->next;
- free ((PTR)next);
- }
- pending_blocks = 0;
-
- return blockvector;
-}
-
/* Manage the vector of line numbers. */
/* FIXME: Use record_line instead. */
last_source_file = NULL;
}
\f
-static void
-record_minimal_symbol (name, address, type, objfile)
- char *name;
- CORE_ADDR address;
- enum minimal_symbol_type type;
- struct objfile *objfile;
-{
- prim_record_minimal_symbol (savestring (name, strlen (name)),
- address,
- type,
- objfile);
-}
-\f
/* dst_symfile_init ()
is the dst-specific initialization routine for reading symbols.
struct symbol *sym = (struct symbol *)
obstack_alloc (&objfile->symbol_obstack, sizeof (struct symbol));
memset (sym, 0, sizeof (struct symbol));
- SYMBOL_NAME (sym) = obstack_copy0 (&objfile->symbol_obstack,
- name, strlen (name));
+ SYMBOL_NAME (sym) = obsavestring (name, strlen (name),
+ &objfile->symbol_obstack);
SYMBOL_VALUE (sym) = 0;
SYMBOL_NAMESPACE (sym) = VAR_NAMESPACE;
dst_rec_ptr_t child_entry, symbol_entry;
struct block *child_block;
int total_symbols = 0;
- struct pending_block *pblock;
char fake_name[20];
static long fake_seq = 0;
struct symbol_list *symlist, *nextsym;
case dst_block_function:
case dst_block_subroutine:
case dst_block_program:
- record_minimal_symbol(name, address, mst_text, objfile);
+ prim_record_minimal_symbol(name, address, mst_text, objfile);
function = process_dst_function(
objfile,
symbol_entry,
else
BLOCK_FUNCTION (block) = 0;
- pblock = (struct pending_block *)
- xmalloc (sizeof (struct pending_block));
- pblock->block = block;
- pblock->next = pending_blocks;
- pending_blocks = pblock;
if (DST_block(entry).child_block_off)
{
child_entry = (dst_rec_ptr_t) DST_OFFSET(entry,
child_entry = NULL;
}
}
+ record_pending_block (objfile, block, NULL);
return block;
}
dst_rec_ptr_t entry, file_table, root_block;
char *source_file;
struct block *block, *global_block;
- struct pending_block *pblock;
int symnum;
struct symbol_list *nextsym;
int module_num = 0;
DST_comp_unit(entry).data_size);
dst_start_symtab();
- pblock = (struct pending_block *)
- xmalloc (sizeof (struct pending_block));
- pblock->next = NULL;
- pending_blocks = pblock;
-
block = process_dst_block(objfile, root_block);
global_block = (struct block *)
BLOCK_END(global_block) = BLOCK_END(block);
BLOCK_SUPERBLOCK(global_block) = 0;
BLOCK_SUPERBLOCK(block) = global_block;
- pblock->block = global_block;
+ record_pending_block (objfile, global_block, NULL);
complete_symtab(source_file,
BLOCK_START(block),
}
}
if (module_num)
- record_minimal_symbol("<end_of_program>",
+ prim_record_minimal_symbol("<end_of_program>",
BLOCK_END(block), mst_text, objfile);
/* One more faked symbol to make sure nothing can ever run off the
* end of the symbol table. This one represents the end of the
* but no functions are ever mapped to an address higher than
* 40000000
*/
- record_minimal_symbol("<end_of_text>",
+ prim_record_minimal_symbol("<end_of_text>",
(CORE_ADDR) 0x40000000,
mst_text, objfile);
while (struct_list)