2007-06-19 Markus Deuling <deuling@de.ibm.com>
[deliverable/binutils-gdb.git] / gdb / parse.c
index a2f8c026aa22bce4a44199056f9f49b2a4c4cf34..0c7dfd852ee59c66490b762c31b3a0e094d6e23a 100644 (file)
@@ -548,7 +548,9 @@ handle_last:
   return;
 handle_register:
   write_exp_elt_opcode (OP_REGISTER);
-  write_exp_elt_longcst (i);
+  str.length--;
+  str.ptr++;
+  write_exp_string (str);
   write_exp_elt_opcode (OP_REGISTER);
   return;
 }
@@ -717,7 +719,6 @@ operator_length_standard (struct expression *expr, int endpos,
     case OP_TYPE:
     case OP_BOOL:
     case OP_LAST:
-    case OP_REGISTER:
     case OP_INTERNALVAR:
       oplen = 3;
       break;
@@ -772,6 +773,7 @@ operator_length_standard (struct expression *expr, int endpos,
     case STRUCTOP_PTR:
       args = 1;
       /* fall through */
+    case OP_REGISTER:
     case OP_M2_STRING:
     case OP_STRING:
     case OP_OBJC_NSSTRING:     /* Objective C Foundation Class NSString constant */
@@ -1185,7 +1187,8 @@ build_parse (void)
     init_type (TYPE_CODE_FUNC, 1, 0, "<text variable, no debug info>", NULL);
   TYPE_TARGET_TYPE (msym_text_symbol_type) = builtin_type_int;
   msym_data_symbol_type =
-    init_type (TYPE_CODE_INT, TARGET_INT_BIT / HOST_CHAR_BIT, 0,
+    init_type (TYPE_CODE_INT, 
+              gdbarch_int_bit (current_gdbarch) / HOST_CHAR_BIT, 0,
               "<data variable, no debug info>", NULL);
   msym_unknown_symbol_type =
     init_type (TYPE_CODE_INT, 1, 0,
@@ -1193,7 +1196,8 @@ build_parse (void)
               NULL);
 
   msym_tls_symbol_type =
-    init_type (TYPE_CODE_INT, TARGET_INT_BIT / HOST_CHAR_BIT, 0,
+    init_type (TYPE_CODE_INT, 
+              gdbarch_int_bit (current_gdbarch) / HOST_CHAR_BIT, 0,
               "<thread local variable, no debug info>", NULL);
 }
 
This page took 0.023657 seconds and 4 git commands to generate.