/* Type could be missing if file is compiled without debugging info. */
if (SC_IS_UNDEF (sh->sc)
|| sh->sc == scNil || sh->index == indexNil)
- SYMBOL_TYPE (s) = builtin_type (gdbarch)->nodebug_data_symbol;
+ SYMBOL_TYPE (s) = objfile_type (objfile)->nodebug_data_symbol;
else
SYMBOL_TYPE (s) = parse_type (cur_fd, ax, sh->index, 0, bigend, name);
/* Value of a data symbol is its memory address */
SYMBOL_DOMAIN (s) = VAR_DOMAIN; /* so that it can be used */
SYMBOL_CLASS (s) = LOC_LABEL; /* but not misused */
SYMBOL_VALUE_ADDRESS (s) = (CORE_ADDR) sh->value;
- SYMBOL_TYPE (s) = builtin_type (gdbarch)->builtin_int;
+ SYMBOL_TYPE (s) = objfile_type (objfile)->builtin_int;
add_symbol (s, top_stack->cur_st, top_stack->cur_block);
break;
SYMBOL_CLASS (s) = LOC_BLOCK;
/* Type of the return value */
if (SC_IS_UNDEF (sh->sc) || sh->sc == scNil)
- t = builtin_type (gdbarch)->builtin_int;
+ t = objfile_type (objfile)->builtin_int;
else
{
t = parse_type (cur_fd, ax, sh->index + 1, 0, bigend, name);
s = new_symbol (MDEBUG_EFI_SYMBOL_NAME);
SYMBOL_DOMAIN (s) = LABEL_DOMAIN;
SYMBOL_CLASS (s) = LOC_CONST;
- SYMBOL_TYPE (s) = builtin_type_void;
+ SYMBOL_TYPE (s) = objfile_type (current_objfile)->builtin_void;
e = ((struct mdebug_extra_func_info *)
obstack_alloc (¤t_objfile->objfile_obstack,
sizeof (struct mdebug_extra_func_info)));
switch (bt)
{
case btNil:
- tp = builtin_type_void;
+ tp = objfile_type (objfile)->builtin_void;
break;
case btAdr:
tp = init_type (TYPE_CODE_PTR, 4, TYPE_FLAG_UNSIGNED,
"adr_32", objfile);
- TYPE_TARGET_TYPE (tp) = builtin_type_void;
+ TYPE_TARGET_TYPE (tp) = objfile_type (objfile)->builtin_void;
break;
case btChar:
break;
case btVoid:
- tp = builtin_type_void;
+ tp = objfile_type (objfile)->builtin_void;
break;
case btLong64:
case btAdr64:
tp = init_type (TYPE_CODE_PTR, 8, TYPE_FLAG_UNSIGNED,
"adr_64", objfile);
- TYPE_TARGET_TYPE (tp) = builtin_type_void;
+ TYPE_TARGET_TYPE (tp) = objfile_type (objfile)->builtin_void;
break;
case btInt64:
{
complaint (&symfile_complaints,
_("illegal array index type for %s, assuming int"), sym_name);
- indx = builtin_type_int32;
+ indx = objfile_type (current_objfile)->builtin_int;
}
/* Get the bounds, and create the array type. */
parse_procedure (PDR *pr, struct symtab *search_symtab,
struct partial_symtab *pst)
{
- struct gdbarch *gdbarch = get_objfile_arch (pst->objfile);
struct symbol *s, *i;
struct block *b;
char *sh_name;
SYMBOL_CLASS (s) = LOC_BLOCK;
/* Donno its type, hope int is ok */
SYMBOL_TYPE (s)
- = lookup_function_type (builtin_type (gdbarch)->builtin_int);
+ = lookup_function_type (objfile_type (pst->objfile)->builtin_int);
add_symbol (s, top_stack->cur_st, top_stack->cur_block);
/* Wont have symbols for this one */
b = new_block (2);
if (processing_gcc_compilation == 0
&& found_ecoff_debugging_info == 0
&& TYPE_CODE (TYPE_TARGET_TYPE (SYMBOL_TYPE (s))) == TYPE_CODE_VOID)
- SYMBOL_TYPE (s) = builtin_type (gdbarch)->nodebug_text_symbol;
+ SYMBOL_TYPE (s) = objfile_type (pst->objfile)->nodebug_text_symbol;
}
/* Parse the external symbol ES. Just call parse_symbol() after
if (processing_gcc_compilation != 0)
{
+ struct gdbarch *gdbarch = get_objfile_arch (pst->objfile);
/* This symbol table contains stabs-in-ecoff entries. */
memset (e, 0, sizeof (struct mdebug_extra_func_info));
SYMBOL_DOMAIN (s) = LABEL_DOMAIN;
SYMBOL_CLASS (s) = LOC_CONST;
- SYMBOL_TYPE (s) = builtin_type_void;
+ SYMBOL_TYPE (s) = objfile_type (pst->objfile)->builtin_void;
SYMBOL_VALUE_BYTES (s) = (gdb_byte *) e;
e->pdr.framereg = -1;
add_symbol_to_list (s, &local_symbols);
{
/* Handle encoded stab line number. */
valu += ANOFFSET (pst->section_offsets, SECT_OFF_TEXT (pst->objfile));
- record_line (current_subfile, sh.index, valu);
+ record_line (current_subfile, sh.index,
+ gdbarch_addr_bits_remove (gdbarch, valu));
}
}
else if (sh.st == stProc || sh.st == stStaticProc