FIXME: Figure out how to get the frame pointer register number in the
execution environment of the target. Remove R_FP kludge
-FIXME: Add generation of dependencies list to partial symtab code.
+FIXME: Do we need to generate dependencies in partial symtabs?
+(Perhaps we don't need to).
FIXME: Resolve minor differences between what information we put in the
partial symbol table and what dbxread puts in. For example, we don't yet
static void
psymtab_to_symtab_1 PARAMS ((struct partial_symtab *));
-static struct symtab *
+static void
read_ofile_symtab PARAMS ((struct partial_symtab *));
static void
static int
locval PARAMS ((char *));
-static void
-record_minimal_symbol PARAMS ((char *, CORE_ADDR, enum minimal_symbol_type,
- struct objfile *));
-
static void
set_cu_language PARAMS ((struct dieinfo *));
current_objfile = NULL;
}
-
-/*
-
-LOCAL FUNCTION
-
- record_minimal_symbol -- add entry to gdb's minimal symbol table
-
-SYNOPSIS
-
- static void record_minimal_symbol (char *name, CORE_ADDR address,
- enum minimal_symbol_type ms_type,
- struct objfile *objfile)
-
-DESCRIPTION
-
- Given a pointer to the name of a symbol that should be added to the
- minimal symbol table, and the address associated with that
- symbol, records this information for later use in building the
- minimal symbol table.
-
- */
-
-static void
-record_minimal_symbol (name, address, ms_type, objfile)
- char *name;
- CORE_ADDR address;
- enum minimal_symbol_type ms_type;
- struct objfile *objfile;
-{
- name = obsavestring (name, strlen (name), &objfile -> symbol_obstack);
- prim_record_minimal_symbol (name, address, ms_type);
-}
-
/*
LOCAL FUNCTION
struct nextfield *new;
int nfields = 0;
int n;
- char *tpart1;
struct dieinfo mbr;
char *nextdie;
#if !BITS_BIG_ENDIAN
{
case TAG_class_type:
TYPE_CODE (type) = TYPE_CODE_CLASS;
- tpart1 = "class";
break;
case TAG_structure_type:
TYPE_CODE (type) = TYPE_CODE_STRUCT;
- tpart1 = "struct";
break;
case TAG_union_type:
TYPE_CODE (type) = TYPE_CODE_UNION;
- tpart1 = "union";
break;
default:
/* Should never happen */
TYPE_CODE (type) = TYPE_CODE_UNDEF;
- tpart1 = "???";
complain (&missing_tag, DIE_ID, DIE_NAME);
break;
}
&& *dip -> at_name != '~'
&& *dip -> at_name != '.')
{
- TYPE_NAME (type) = obconcat (&objfile -> type_obstack,
- tpart1, " ", dip -> at_name);
+ TYPE_TAG_NAME (type) = obconcat (&objfile -> type_obstack,
+ "", "", dip -> at_name);
}
/* Use whatever size is known. Zero is a valid size. We might however
wish to check has_at_byte_size to make sure that some byte size was
&& *dip -> at_name != '~'
&& *dip -> at_name != '.')
{
- TYPE_NAME (type) = obconcat (&objfile -> type_obstack, "enum",
- " ", dip -> at_name);
+ TYPE_TAG_NAME (type) = obconcat (&objfile -> type_obstack,
+ "", "", dip -> at_name);
}
if (dip -> at_byte_size != 0)
{
SYNOPSIS
- static struct symtab *read_ofile_symtab (struct partial_symtab *pst)
+ static void read_ofile_symtab (struct partial_symtab *pst)
DESCRIPTION
When expanding a partial symbol table entry to a full symbol table
entry, this is the function that gets called to read in the symbols
- for the compilation unit.
-
- Returns a pointer to the newly constructed symtab (which is now
- the new first one on the objfile's symtab list).
+ for the compilation unit. A pointer to the newly constructed symtab,
+ which is now the new first one on the objfile's symtab list, is
+ stashed in the partial symbol table entry.
*/
-static struct symtab *
+static void
read_ofile_symtab (pst)
struct partial_symtab *pst;
{
process_dies (dbbase, dbbase + dbsize, pst -> objfile);
do_cleanups (back_to);
current_objfile = NULL;
- return (pst -> objfile -> symtabs);
+ pst -> symtab = pst -> objfile -> symtabs;
}
/*
{
buildsym_init ();
old_chain = make_cleanup (really_free_pendings, 0);
- pst -> symtab = read_ofile_symtab (pst);
+ read_ofile_symtab (pst);
if (info_verbose)
{
printf_filtered ("%d DIE's, sorting...", diecount);
switch (dip -> die_tag)
{
case TAG_global_subroutine:
- record_minimal_symbol (dip -> at_name, dip -> at_low_pc, mst_text,
- objfile);
ADD_PSYMBOL_TO_LIST (dip -> at_name, strlen (dip -> at_name),
VAR_NAMESPACE, LOC_BLOCK,
objfile -> global_psymbols,
dip -> at_low_pc, cu_language, objfile);
break;
case TAG_global_variable:
- record_minimal_symbol (dip -> at_name, locval (dip -> at_location),
- mst_data, objfile);
ADD_PSYMBOL_TO_LIST (dip -> at_name, strlen (dip -> at_name),
VAR_NAMESPACE, LOC_STATIC,
objfile -> global_psymbols,