/* Support routines for building symbol tables in GDB's internal format.
Copyright 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995,
- 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
+ 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004
Free Software Foundation, Inc.
This file is part of GDB.
void
add_free_pendings (struct pending *list)
{
- register struct pending *link = list;
+ struct pending *link = list;
if (list)
{
void
add_symbol_to_list (struct symbol *symbol, struct pending **listhead)
{
- register struct pending *link;
+ struct pending *link;
/* If this is an alias for another symbol, don't add it. */
if (symbol->ginfo.name && symbol->ginfo.name[0] == '#')
/* At end of reading syms, or in case of quit, really free as many
`struct pending's as we can easily find. */
-/* ARGSUSED */
void
really_free_pendings (void *dummy)
{
free_pending_blocks (void)
{
#if 0 /* Now we make the links in the
- symbol_obstack, so don't free
+ objfile_obstack, so don't free
them. */
struct pending_block *bnext, *bnext1;
CORE_ADDR start, CORE_ADDR end,
struct objfile *objfile)
{
- register struct pending *next, *next1;
- register struct block *block;
- register struct pending_block *pblock;
+ struct pending *next, *next1;
+ struct block *block;
+ struct pending_block *pblock;
struct pending_block *opblock;
- block = allocate_block (&objfile->symbol_obstack);
+ block = allocate_block (&objfile->objfile_obstack);
if (symbol)
{
- BLOCK_DICT (block) = dict_create_linear (&objfile->symbol_obstack,
+ BLOCK_DICT (block) = dict_create_linear (&objfile->objfile_obstack,
*listhead);
}
else
{
- BLOCK_DICT (block) = dict_create_hashed (&objfile->symbol_obstack,
+ BLOCK_DICT (block) = dict_create_hashed (&objfile->objfile_obstack,
*listhead);
}
/* If we're in the C++ case, set the block's scope. */
if (SYMBOL_LANGUAGE (symbol) == language_cplus)
{
- cp_set_block_scope (symbol, block, &objfile->symbol_obstack);
+ cp_set_block_scope (symbol, block, &objfile->objfile_obstack);
}
}
else
OPBLOCK, or at the beginning if opblock is NULL. This puts the
block in the list after all its subblocks.
- Allocate the pending block struct in the symbol_obstack to save
+ Allocate the pending block struct in the objfile_obstack to save
time. This wastes a little space. FIXME: Is it worth it? */
void
record_pending_block (struct objfile *objfile, struct block *block,
struct pending_block *opblock)
{
- register struct pending_block *pblock;
+ struct pending_block *pblock;
pblock = (struct pending_block *)
- obstack_alloc (&objfile->symbol_obstack, sizeof (struct pending_block));
+ obstack_alloc (&objfile->objfile_obstack, sizeof (struct pending_block));
pblock->block = block;
if (opblock)
{
static struct blockvector *
make_blockvector (struct objfile *objfile)
{
- register struct pending_block *next;
- register struct blockvector *blockvector;
- register int i;
+ struct pending_block *next;
+ struct blockvector *blockvector;
+ int i;
/* Count the length of the list of blocks. */
}
blockvector = (struct blockvector *)
- obstack_alloc (&objfile->symbol_obstack,
+ obstack_alloc (&objfile->objfile_obstack,
(sizeof (struct blockvector)
+ (i - 1) * sizeof (struct block *)));
void
start_subfile (char *name, char *dirname)
{
- register struct subfile *subfile;
+ struct subfile *subfile;
/* See if this subfile is already known as a subfile of the current
main source file. */
later via a call to record_debugformat. */
subfile->debugformat = NULL;
-#if 0 /* OBSOLETE CFront */
-// OBSOLETE /* cfront output is a C program, so in most ways it looks like a C
-// OBSOLETE program. But to demangle we need to set the language to C++. We
-// OBSOLETE can distinguish cfront code by the fact that it has #line
-// OBSOLETE directives which specify a file name ending in .C. */
-#endif /* OBSOLETE CFront */
-
/* If the filename of this subfile ends in .C, then change the
language of any pending subfiles from C to C++. We also accept
any other C++ suffixes accepted by deduce_language_from_filename. */
- /* OBSOLETE (in particular, some people use .cxx with cfront). */
/* Likewise for f2c. */
if (subfile->name)
void
push_subfile (void)
{
- register struct subfile_stack *tem
+ struct subfile_stack *tem
= (struct subfile_stack *) xmalloc (sizeof (struct subfile_stack));
tem->next = subfile_stack;
char *
pop_subfile (void)
{
- register char *name;
- register struct subfile_stack *link = subfile_stack;
+ char *name;
+ struct subfile_stack *link = subfile_stack;
if (link == NULL)
{
line vector for SUBFILE. */
void
-record_line (register struct subfile *subfile, int line, CORE_ADDR pc)
+record_line (struct subfile *subfile, int line, CORE_ADDR pc)
{
struct linetable_entry *e;
/* Ignore the dummy line number in libg.o */
struct symtab *
end_symtab (CORE_ADDR end_addr, struct objfile *objfile, int section)
{
- register struct symtab *symtab = NULL;
- register struct blockvector *blockvector;
- register struct subfile *subfile;
- register struct context_stack *cstk;
+ struct symtab *symtab = NULL;
+ struct blockvector *blockvector;
+ struct subfile *subfile;
+ struct context_stack *cstk;
struct subfile *nextsub;
/* Finish the lexical context of the last function in the file; pop
objfile);
blockvector = make_blockvector (objfile);
cp_finalize_namespace (BLOCKVECTOR_BLOCK (blockvector, STATIC_BLOCK),
- &objfile->symbol_obstack);
+ &objfile->objfile_obstack);
}
#ifndef PROCESS_LINENUMBER_HOOK
{
/* Reallocate the line table on the symbol obstack */
symtab->linetable = (struct linetable *)
- obstack_alloc (&objfile->symbol_obstack, linetablesize);
+ obstack_alloc (&objfile->objfile_obstack, linetablesize);
memcpy (symtab->linetable, subfile->line_vector, linetablesize);
}
else
{
/* Reallocate the dirname on the symbol obstack */
symtab->dirname = (char *)
- obstack_alloc (&objfile->symbol_obstack,
+ obstack_alloc (&objfile->objfile_obstack,
strlen (subfile->dirname) + 1);
strcpy (symtab->dirname, subfile->dirname);
}
{
symtab->debugformat = obsavestring (subfile->debugformat,
strlen (subfile->debugformat),
- &objfile->symbol_obstack);
+ &objfile->objfile_obstack);
}
/* All symtabs for the main file and the subfiles share a
struct context_stack *
push_context (int desc, CORE_ADDR valu)
{
- register struct context_stack *new;
+ struct context_stack *new;
if (context_stack_depth == context_stack_size)
{
void
merge_symbol_lists (struct pending **srclist, struct pending **targetlist)
{
- register int i;
+ int i;
if (!srclist || !*srclist)
return;