/* 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.
#include "complaints.h"
#include "gdb_string.h"
#include "expression.h" /* For "enum exp_opcode" used by... */
-#include "language.h" /* For "local_hex_string" */
#include "bcache.h"
#include "filenames.h" /* For DOSish file names */
#include "macrotab.h"
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;
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
if (symbol)
{
complaint (&symfile_complaints,
- "block end address less than block start address in %s (patched it)",
+ _("block end address less than block start address in %s (patched it)"),
SYMBOL_PRINT_NAME (symbol));
}
else
{
complaint (&symfile_complaints,
- "block end address 0x%s less than block start address 0x%s (patched it)",
+ _("block end address 0x%s less than block start address 0x%s (patched it)"),
paddr_nz (BLOCK_END (block)), paddr_nz (BLOCK_START (block)));
}
/* Better than nothing */
if (symbol)
{
complaint (&symfile_complaints,
- "inner block not inside outer block in %s",
+ _("inner block not inside outer block in %s"),
SYMBOL_PRINT_NAME (symbol));
}
else
{
complaint (&symfile_complaints,
- "inner block (0x%s-0x%s) not inside outer block (0x%s-0x%s)",
+ _("inner block (0x%s-0x%s) not inside outer block (0x%s-0x%s)"),
paddr_nz (BLOCK_START (pblock->block)),
paddr_nz (BLOCK_END (pblock->block)),
paddr_nz (BLOCK_START (block)),
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
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)
{
}
blockvector = (struct blockvector *)
- obstack_alloc (&objfile->symbol_obstack,
+ obstack_alloc (&objfile->objfile_obstack,
(sizeof (struct blockvector)
+ (i - 1) * sizeof (struct block *)));
CORE_ADDR start
= BLOCK_START (BLOCKVECTOR_BLOCK (blockvector, i));
- complaint (&symfile_complaints, "block at %s out of order",
- local_hex_string ((LONGEST) start));
+ complaint (&symfile_complaints, _("block at %s out of order"),
+ hex_string ((LONGEST) start));
}
}
}
subfile_stack = tem;
if (current_subfile == NULL || current_subfile->name == NULL)
{
- internal_error (__FILE__, __LINE__, "failed internal consistency check");
+ internal_error (__FILE__, __LINE__, _("failed internal consistency check"));
}
tem->name = current_subfile->name;
}
if (link == NULL)
{
- internal_error (__FILE__, __LINE__, "failed internal consistency check");
+ internal_error (__FILE__, __LINE__, _("failed internal consistency check"));
}
name = link->name;
subfile_stack = link->next;
believed to happen in most cases (even for coffread.c);
it used to be an abort(). */
complaint (&symfile_complaints,
- "Context stack not empty in end_symtab");
+ _("Context stack not empty in end_symtab"));
context_stack_depth = 0;
}
}
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