#include "parser-defs.h"
#include "gdbcmd.h"
#include "symfile.h" /* for overlay functions */
+#include "inferior.h" /* for NUM_PSEUDO_REGS. NOTE: replace
+ with "gdbarch.h" when appropriate. */
+
\f
/* Symbols which architectures can redefine. */
extern int hp_som_som_object_present;
-static void
-free_funcalls PARAMS ((void));
+static void free_funcalls (void *ignore);
-static void
-prefixify_expression PARAMS ((struct expression *));
+static void prefixify_expression (struct expression *);
static void
-prefixify_subexp PARAMS ((struct expression *, struct expression *, int, int));
+prefixify_subexp (struct expression *, struct expression *, int, int);
-void _initialize_parse PARAMS ((void));
+void _initialize_parse (void);
/* Data structure for saving values of arglist_len for function calls whose
arguments contain other function calls. */
return i;
}
- /* Try standard aliases */
+ /* Try pseudo-registers, if any. */
+ for (i = NUM_REGS; i < NUM_REGS + NUM_PSEUDO_REGS; i++)
+ if (REGISTER_NAME (i) && len == strlen (REGISTER_NAME (i))
+ && STREQN (str, REGISTER_NAME (i), len))
+ {
+ return i;
+ }
+
+ /* Try standard aliases. */
for (i = 0; i < num_std_regs; i++)
if (std_regs[i].name && len == strlen (std_regs[i].name)
&& STREQN (str, std_regs[i].name, len))
Used when there is an error inside parsing. */
static void
-free_funcalls ()
+free_funcalls (void *ignore)
{
register struct funcall *call, *next;
if (lexptr == 0 || *lexptr == 0)
error_no_arg ("expression to compute");
- old_chain = make_cleanup ((make_cleanup_func) free_funcalls, 0);
+ old_chain = make_cleanup (free_funcalls, 0 /*ignore*/);
funcall_chain = 0;
expression_context_block = block ? block : get_selected_block ();
expout = (struct expression *)
xmalloc (sizeof (struct expression) + EXP_ELEM_TO_BYTES (expout_size));
expout->language_defn = current_language;
- make_cleanup ((make_cleanup_func) free_current_contents, &expout);
+ make_cleanup (free_current_contents, &expout);
if (current_language->la_parser ())
current_language->la_error (NULL);
return follow_type;
}
\f
-static void build_parse PARAMS ((void));
+static void build_parse (void);
static void
build_parse ()
{
register_gdbarch_swap (NULL, 0, build_parse);
add_show_from_set (
- add_set_cmd ("expressiondebug", class_maintenance, var_zinteger,
+ 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.",
- &setlist),
- &showlist);
+ &setdebuglist),
+ &showdebuglist);
}