dump_subexp_body_standard,
evaluate_subexp_standard
};
-\f
-/* Symbols which architectures can redefine. */
-
-/* Some systems have routines whose names start with `$'. Giving this
- macro a non-zero value tells GDB's expression parser to check for
- such routines when parsing tokens that begin with `$'.
-
- On HP-UX, certain system routines (millicode) have names beginning
- with `$' or `$$'. For example, `$$dyncall' is a millicode routine
- that handles inter-space procedure calls on PA-RISC. */
-#ifndef SYMBOLS_CAN_START_WITH_DOLLAR
-#define SYMBOLS_CAN_START_WITH_DOLLAR (0)
-#endif
-
-
\f
/* Global variables declared in parser-defs.h (and commented there). */
struct expression *expout;
void
write_dollar_variable (struct stoken str)
{
+ struct symbol *sym = NULL;
+ struct minimal_symbol *msym = NULL;
+
/* Handle the tokens $digits; also $ (short for $0) and $$ (short for $$1)
and $$digits (equivalent to $<-digits> if you could type that). */
if (i >= 0)
goto handle_register;
- if (SYMBOLS_CAN_START_WITH_DOLLAR)
- {
- struct symbol *sym = NULL;
- struct minimal_symbol *msym = NULL;
-
- /* On HP-UX, certain system routines (millicode) have names beginning
- with $ or $$, e.g. $$dyncall, which handles inter-space procedure
- calls on PA-RISC. Check for those, first. */
+ /* On some systems, such as HP-UX and hppa-linux, certain system routines
+ have names beginning with $ or $$. Check for those, first. */
- /* This code is not enabled on non HP-UX systems, since worst case
- symbol table lookup performance is awful, to put it mildly. */
-
- sym = lookup_symbol (copy_name (str), (struct block *) NULL,
- VAR_DOMAIN, (int *) NULL, (struct symtab **) NULL);
- if (sym)
- {
- write_exp_elt_opcode (OP_VAR_VALUE);
- write_exp_elt_block (block_found); /* set by lookup_symbol */
- write_exp_elt_sym (sym);
- write_exp_elt_opcode (OP_VAR_VALUE);
- return;
- }
- msym = lookup_minimal_symbol (copy_name (str), NULL, NULL);
- if (msym)
- {
- write_exp_msymbol (msym,
- lookup_function_type (builtin_type_int),
- builtin_type_int);
- return;
- }
+ sym = lookup_symbol (copy_name (str), (struct block *) NULL,
+ VAR_DOMAIN, (int *) NULL, (struct symtab **) NULL);
+ if (sym)
+ {
+ write_exp_elt_opcode (OP_VAR_VALUE);
+ write_exp_elt_block (block_found); /* set by lookup_symbol */
+ write_exp_elt_sym (sym);
+ write_exp_elt_opcode (OP_VAR_VALUE);
+ return;
+ }
+ msym = lookup_minimal_symbol (copy_name (str), NULL, NULL);
+ if (msym)
+ {
+ write_exp_msymbol (msym,
+ lookup_function_type (builtin_type_int),
+ builtin_type_int);
+ return;
}
/* Any other names starting in $ are debugger internal variables. */
int i;
if (endpos < 1)
- error ("?error in operator_length_standard");
+ error (_("?error in operator_length_standard"));
i = (int) expr->elts[endpos - 1].opcode;
comma_terminates = comma;
if (lexptr == 0 || *lexptr == 0)
- error_no_arg ("expression to compute");
+ error_no_arg (_("expression to compute"));
old_chain = make_cleanup (free_funcalls, 0 /*ignore*/);
funcall_chain = 0;
struct expression *exp;
exp = parse_exp_1 (&string, 0, 0);
if (*string)
- error ("Junk after end of expression.");
+ error (_("Junk after end of expression."));
return exp;
}
struct expression *exp;
exp = parse_exp_in_context (&string, 0, 0, void_context_p);
if (*string != '\000')
- error ("Junk after end of expression.");
+ error (_("Junk after end of expression."));
return exp;
}
DEPRECATED_REGISTER_GDBARCH_SWAP (msym_unknown_symbol_type);
deprecated_register_gdbarch_swap (NULL, 0, build_parse);
- deprecated_add_show_from_set
- (add_set_cmd ("expression", class_maintenance, var_zinteger,
- (char *) &expressiondebug,
- "Set expression debugging.\n\
-When non-zero, the internal representation of expressions will be printed.",
- &setdebuglist),
- &showdebuglist);
+ add_setshow_zinteger_cmd ("expression", class_maintenance,
+ &expressiondebug, _("\
+Set expression debugging."), _("\
+Show expression debugging."), _("\
+When non-zero, the internal representation of expressions will be printed."),
+ NULL,
+ NULL, /* FIXME: i18n: */
+ &setdebuglist, &showdebuglist);
}