#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"
+#include "block.h"
\f
/* Symbols which architectures can redefine. */
static void prefixify_expression (struct expression *);
-static void
-prefixify_subexp (struct expression *, struct expression *, int, int);
+static void prefixify_subexp (struct expression *, struct expression *, int,
+ int);
void _initialize_parse (void);
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. */
/* 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;
args = 1 + longest_to_int (expr->elts[endpos - 2].longconst);
break;
- case OP_MSGCALL: /* Objective C message (method) call */
+ case OP_OBJC_MSGCALL: /* Objective C message (method) call */
oplen = 4;
args = 1 + longest_to_int (expr->elts[endpos - 2].longconst);
break;
/* fall through */
case OP_M2_STRING:
case OP_STRING:
- case OP_NSSTRING: /* Objective C Foundation Class NSString constant */
- case OP_SELECTOR: /* Objective C "@selector" pseudo-op */
+ case OP_OBJC_NSSTRING: /* Objective C Foundation Class NSString constant */
+ case OP_OBJC_SELECTOR: /* Objective C "@selector" pseudo-op */
case OP_NAME:
case OP_EXPRSTRING:
oplen = longest_to_int (expr->elts[endpos - 2].longconst);
/* C++ */
case OP_THIS:
- case OP_SELF:
+ case OP_OBJC_SELF:
oplen = 2;
break;
args = 1 + longest_to_int (inexpr->elts[inend - 2].longconst);
break;
- case OP_MSGCALL: /* Objective C message (method) call */
+ case OP_OBJC_MSGCALL: /* Objective C message (method) call */
oplen = 4;
args = 1 + longest_to_int (inexpr->elts[inend - 2].longconst);
break;
/* fall through */
case OP_M2_STRING:
case OP_STRING:
- case OP_NSSTRING: /* Objective C Foundation Class NSString constant */
- case OP_SELECTOR: /* Objective C "@selector" pseudo-op */
+ case OP_OBJC_NSSTRING: /* Objective C Foundation Class NSString constant */
+ case OP_OBJC_SELECTOR: /* Objective C "@selector" pseudo-op */
case OP_NAME:
case OP_EXPRSTRING:
oplen = longest_to_int (inexpr->elts[inend - 2].longconst);
/* C++ */
case OP_THIS:
- case OP_SELF:
+ case OP_OBJC_SELF:
oplen = 2;
break;
if (block)
{
expression_context_block = block;
- expression_context_pc = block->startaddr;
+ expression_context_pc = BLOCK_START (block);
}
else
expression_context_block = get_selected_block (&expression_context_pc);