diff options
author | Andrew Cagney <cagney@redhat.com> | 2002-09-25 20:30:38 +0000 |
---|---|---|
committer | Andrew Cagney <cagney@redhat.com> | 2002-09-25 20:30:38 +0000 |
commit | e36180d7954250489b69c8ad2050bc6b2af27b5c (patch) | |
tree | f1c2bfc966cc91806f99908c05ae5060731f82c2 /gdb/parse.c | |
parent | 58daee9877b50241b1fd49b2ad5d13ca70c0c866 (diff) | |
download | gdb-e36180d7954250489b69c8ad2050bc6b2af27b5c.zip gdb-e36180d7954250489b69c8ad2050bc6b2af27b5c.tar.gz gdb-e36180d7954250489b69c8ad2050bc6b2af27b5c.tar.bz2 |
2002-09-25 Andrew Cagney <cagney@redhat.com>
* frame.c: Include "gdb_string.h" and "builtin-regs.h".
(frame_map_regnum_to_name): New function.
(frame_map_name_to_regnum): New function.
* frame.h (frame_map_name_to_regnum): Declare.
(frame_map_regnum_to_name): Declare.
* builtin-regs.c (builtin_reg_map_regnum_to_name): New function.
* builtin-regs.h (builtin_reg_map_regnum_to_name): Declare.
* parse.c: Do not include "builtin-regs.h".
(target_map_name_to_register): Delete function.
(write_dollar_variable): Use frame_map_name_to_regnum.
* parser-defs.h (target_map_name_to_register): Delete declaration.
* expprint.c: Include "frame.h".
(print_subexp): Use frame_map_regnum_to_name.
* eval.c (evaluate_subexp_standard): Use frame_map_regnum_to_name.
* infcmd.c (registers_info): Use frame_map_name_to_regnum.
2002-09-25 Andrew Cagney <cagney@redhat.com>
* gdb.base/pc-fp.exp, gdb.base/pc-fp.c: New test.
Diffstat (limited to 'gdb/parse.c')
-rw-r--r-- | gdb/parse.c | 39 |
1 files changed, 1 insertions, 38 deletions
diff --git a/gdb/parse.c b/gdb/parse.c index c5de0af..29b8e3c 100644 --- a/gdb/parse.c +++ b/gdb/parse.c @@ -47,7 +47,6 @@ #include "inferior.h" /* for NUM_PSEUDO_REGS. NOTE: replace with "gdbarch.h" when appropriate. */ #include "doublest.h" -#include "builtin-regs.h" #include "gdb_assert.h" @@ -106,42 +105,6 @@ struct funcall static struct funcall *funcall_chain; -/* The generic method for targets to specify how their registers are - named. The mapping can be derived from two sources: REGISTER_NAME; - or builtin regs. */ - -int -target_map_name_to_register (char *str, int len) -{ - int i; - - /* Search register name space. */ - for (i = 0; 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 builtin registers. */ - i = builtin_reg_map_name_to_regnum (str, len); - if (i >= 0) - { - gdb_assert (i >= NUM_REGS + NUM_PSEUDO_REGS); - return i; - } - - /* Try builtin registers. */ - i = builtin_reg_map_name_to_regnum (str, len); - if (i >= 0) - { - gdb_assert (i >= NUM_REGS + NUM_PSEUDO_REGS); - return i; - } - - return -1; -} - /* Begin counting arguments for a function call, saving the data about any containing call. */ @@ -491,7 +454,7 @@ write_dollar_variable (struct stoken str) /* Handle tokens that refer to machine registers: $ followed by a register name. */ - i = target_map_name_to_register (str.ptr + 1, str.length - 1); + i = frame_map_name_to_regnum (str.ptr + 1, str.length - 1); if (i >= 0) goto handle_register; |