* parse.c (write_exp_msymbol): Use new variables

msym_*_symbol_type as type of msymbol expression.
	(_initialize_parse): Initialize them.
This commit is contained in:
Jim Kingdon 1995-01-17 16:16:20 +00:00
parent 23f61eaae8
commit 3fb93d868b
2 changed files with 28 additions and 4 deletions

View File

@ -1,3 +1,9 @@
Tue Jan 17 09:48:38 1995 Jim Kingdon <kingdon@lioth.cygnus.com>
* parse.c (write_exp_msymbol): Use new variables
msym_*_symbol_type as type of msymbol expression.
(_initialize_parse): Initialize them.
Mon Jan 16 18:11:03 1995 Stan Shebs <shebs@andros.cygnus.com>
General cleanup and simplication of disassembler interface.

View File

@ -355,7 +355,15 @@ write_exp_bitstring (str)
}
/* Add the appropriate elements for a minimal symbol to the end of
the expression. */
the expression. The rationale behind passing in text_symbol_type and
data_symbol_type was so that Modula-2 could pass in WORD for
data_symbol_type. Perhaps it still is useful to have those types vary
based on the language, but they no longer have names like "int", so
the initial rationale is gone. */
static struct type *msym_text_symbol_type;
static struct type *msym_data_symbol_type;
static struct type *msym_unknown_symbol_type;
void
write_exp_msymbol (msymbol, text_symbol_type, data_symbol_type)
@ -374,18 +382,18 @@ write_exp_msymbol (msymbol, text_symbol_type, data_symbol_type)
case mst_text:
case mst_file_text:
case mst_solib_trampoline:
write_exp_elt_type (text_symbol_type);
write_exp_elt_type (msym_text_symbol_type);
break;
case mst_data:
case mst_file_data:
case mst_bss:
case mst_file_bss:
write_exp_elt_type (data_symbol_type);
write_exp_elt_type (msym_data_symbol_type);
break;
default:
write_exp_elt_type (builtin_type_char);
write_exp_elt_type (msym_unknown_symbol_type);
break;
}
write_exp_elt_opcode (UNOP_MEMVAL);
@ -902,4 +910,14 @@ _initialize_parse ()
type_stack_depth = 0;
type_stack = (union type_stack_elt *)
xmalloc (type_stack_size * sizeof (*type_stack));
msym_text_symbol_type =
init_type (TYPE_CODE_FUNC, 1, 0, "<text variable without -g>", NULL);
TYPE_TARGET_TYPE (msym_text_symbol_type) = builtin_type_int;
msym_data_symbol_type =
init_type (TYPE_CODE_INT, TARGET_INT_BIT / HOST_CHAR_BIT, 0,
"<data variable without -g>", NULL);
msym_unknown_symbol_type =
init_type (TYPE_CODE_INT, 1, 0, "<unknown segment variable without -g>",
NULL);
}