and DATA_SYMBOL_TYPE arguments.
* parse.c (write_exp_msymbol): Remove TEXT_SYMBOL_TYPE and
DATA_SYMBOL_TYPE arguments. Replace use of builtin_type_CORE_ADDR.
(write_dollar_variable): Update call.
* ada-exp.y (write_var_or_type): Update call.
* c-exp.y: Likewise.
* f-exp.y: Likewise.
* jv-exp.y: Likewise.
* m2-exp.y: Likewise.
* objc-exp.y: Likewise.
* p-exp.y: Likewise.
+2008-09-11 Ulrich Weigand <uweigand@de.ibm.com>
+
+ * parser-defs.h (write_exp_msymbol): Remove TEXT_SYMBOL_TYPE
+ and DATA_SYMBOL_TYPE arguments.
+ * parse.c (write_exp_msymbol): Remove TEXT_SYMBOL_TYPE and
+ DATA_SYMBOL_TYPE arguments. Replace use of builtin_type_CORE_ADDR.
+ (write_dollar_variable): Update call.
+
+ * ada-exp.y (write_var_or_type): Update call.
+ * c-exp.y: Likewise.
+ * f-exp.y: Likewise.
+ * jv-exp.y: Likewise.
+ * m2-exp.y: Likewise.
+ * objc-exp.y: Likewise.
+ * p-exp.y: Likewise.
+
2008-09-10 Joel Brobecker <brobecker@adacore.com>
* ada-lang.c (ada_parent_type): Add handling of the case where
= ada_lookup_simple_minsym (encoded_name);
if (msym != NULL)
{
- write_exp_msymbol (msym, lookup_function_type (type_int ()),
- type_int ());
+ write_exp_msymbol (msym);
/* Maybe cause error here rather than later? FIXME? */
write_selectors (encoded_name + tail_index);
return NULL;
msymbol = lookup_minimal_symbol (name, NULL, NULL);
if (msymbol != NULL)
- {
- write_exp_msymbol (msymbol,
- lookup_function_type (builtin_type (current_gdbarch)->builtin_int),
- builtin_type (current_gdbarch)->builtin_int);
- }
+ write_exp_msymbol (msymbol);
+ else if (!have_full_symbols () && !have_partial_symbols ())
+ error ("No symbol table is loaded. Use the \"file\" command.");
else
- if (!have_full_symbols () && !have_partial_symbols ())
- error ("No symbol table is loaded. Use the \"file\" command.");
- else
- error ("No symbol \"%s\" in current context.", name);
+ error ("No symbol \"%s\" in current context.", name);
}
;
msymbol =
lookup_minimal_symbol (arg, NULL, NULL);
if (msymbol != NULL)
- {
- write_exp_msymbol (msymbol,
- lookup_function_type (builtin_type (current_gdbarch)->builtin_int),
- builtin_type (current_gdbarch)->builtin_int);
- }
+ write_exp_msymbol (msymbol);
else if (!have_full_symbols () && !have_partial_symbols ())
error ("No symbol table is loaded. Use the \"file\" command.");
else
msymbol =
lookup_minimal_symbol (arg, NULL, NULL);
if (msymbol != NULL)
- {
- write_exp_msymbol (msymbol,
- lookup_function_type (builtin_type_int),
- builtin_type_int);
- }
+ write_exp_msymbol (msymbol);
else if (!have_full_symbols () && !have_partial_symbols ())
error ("No symbol table is loaded. Use the \"file\" command.");
else
msymbol = lookup_minimal_symbol (tmp, NULL, NULL);
if (msymbol != NULL)
- {
- write_exp_msymbol (msymbol,
- lookup_function_type (builtin_type_int),
- builtin_type_int);
- }
+ write_exp_msymbol (msymbol);
else if (!have_full_symbols () && !have_partial_symbols ())
error (_("No symbol table is loaded. Use the \"file\" command"));
else
msymbol =
lookup_minimal_symbol (arg, NULL, NULL);
if (msymbol != NULL)
- {
- write_exp_msymbol
- (msymbol,
- lookup_function_type (builtin_type_int),
- builtin_type_int);
- }
+ write_exp_msymbol (msymbol);
else if (!have_full_symbols () && !have_partial_symbols ())
error ("No symbol table is loaded. Use the \"symbol-file\" command.");
else
msymbol = lookup_minimal_symbol (name, NULL, NULL);
if (msymbol != NULL)
- {
- write_exp_msymbol (msymbol,
- lookup_function_type (builtin_type_int),
- builtin_type_int);
- }
+ write_exp_msymbol (msymbol);
+ else if (!have_full_symbols () && !have_partial_symbols ())
+ error ("No symbol table is loaded. Use the \"file\" command.");
else
- if (!have_full_symbols () && !have_partial_symbols ())
- error ("No symbol table is loaded. Use the \"file\" command.");
- else
- error ("No symbol \"%s\" in current context.", name);
+ error ("No symbol \"%s\" in current context.", name);
}
;
msymbol =
lookup_minimal_symbol (arg, NULL, NULL);
if (msymbol != NULL)
- {
- write_exp_msymbol (msymbol,
- lookup_function_type (builtin_type_int),
- builtin_type_int);
- }
+ write_exp_msymbol (msymbol);
else if (!have_full_symbols () &&
!have_partial_symbols ())
error ("No symbol table is loaded. Use the \"file\" command.");
msymbol = lookup_minimal_symbol (name, NULL, NULL);
if (msymbol != NULL)
- {
- write_exp_msymbol (msymbol,
- lookup_function_type (builtin_type_int),
- builtin_type_int);
- }
+ write_exp_msymbol (msymbol);
+ else if (!have_full_symbols () && !have_partial_symbols ())
+ error ("No symbol table is loaded. Use the \"file\" command.");
else
- if (!have_full_symbols () && !have_partial_symbols ())
- error ("No symbol table is loaded. Use the \"file\" command.");
- else
- error ("No symbol \"%s\" in current context.", name);
+ error ("No symbol \"%s\" in current context.", name);
}
;
msymbol =
lookup_minimal_symbol (arg, NULL, NULL);
if (msymbol != NULL)
- {
- write_exp_msymbol (msymbol,
- lookup_function_type (builtin_type_int),
- builtin_type_int);
- }
+ write_exp_msymbol (msymbol);
else if (!have_full_symbols () && !have_partial_symbols ())
error ("No symbol table is loaded. Use the \"file\" command.");
else
}
/* Add the appropriate elements for a minimal symbol to the end of
- 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. */
+ the expression. */
void
-write_exp_msymbol (struct minimal_symbol *msymbol,
- struct type *text_symbol_type,
- struct type *data_symbol_type)
+write_exp_msymbol (struct minimal_symbol *msymbol)
{
struct objfile *objfile = msymbol_objfile (msymbol);
struct gdbarch *gdbarch = get_objfile_arch (objfile);
write_exp_elt_opcode (OP_LONG);
/* Let's make the type big enough to hold a 64-bit address. */
- write_exp_elt_type (builtin_type_CORE_ADDR);
+ write_exp_elt_type (builtin_type (gdbarch)->builtin_core_addr);
write_exp_elt_longcst ((LONGEST) addr);
write_exp_elt_opcode (OP_LONG);
msym = lookup_minimal_symbol (copy_name (str), NULL, NULL);
if (msym)
{
- write_exp_msymbol (msym,
- lookup_function_type (builtin_type_int),
- builtin_type_int);
+ write_exp_msymbol (msym);
return;
}
extern void write_exp_elt_objfile (struct objfile *objfile);
-extern void write_exp_msymbol (struct minimal_symbol *,
- struct type *, struct type *);
+extern void write_exp_msymbol (struct minimal_symbol *);
extern void write_dollar_variable (struct stoken str);