* gdbtypes.c (create_string_type): Receive character type as argument.
[deliverable/binutils-gdb.git] / gdb / eval.c
index e64d4bf52f9da9e8efad1100f8cb880666a1e8ab..df730057d80edc8b63f7b15366375dc35c83d5ae 100644 (file)
@@ -789,7 +789,8 @@ evaluate_subexp_standard (struct type *expect_type,
       (*pos) += 3 + BYTES_TO_EXP_ELEM (tem + 1);
       if (noside == EVAL_SKIP)
        goto nosideret;
-      return value_string (&exp->elts[pc + 2].string, tem);
+      type = language_string_char_type (exp->language_defn, exp->gdbarch);
+      return value_string (&exp->elts[pc + 2].string, tem, type);
 
     case OP_OBJC_NSSTRING:             /* Objective C Foundation Class NSString constant.  */
       tem = longest_to_int (exp->elts[pc + 1].longconst);
@@ -798,7 +799,7 @@ evaluate_subexp_standard (struct type *expect_type,
        {
          goto nosideret;
        }
-      return (struct value *) value_nsstring (&exp->elts[pc + 2].string, tem + 1);
+      return value_nsstring (exp->gdbarch, &exp->elts[pc + 2].string, tem + 1);
 
     case OP_BITSTRING:
       tem = longest_to_int (exp->elts[pc + 1].longconst);
@@ -1010,7 +1011,8 @@ evaluate_subexp_standard (struct type *expect_type,
          sel[len] = 0;         /* Make sure it's terminated.  */
 
        selector_type = builtin_type (exp->gdbarch)->builtin_data_ptr;
-       return value_from_longest (selector_type, lookup_child_selector (sel));
+       return value_from_longest (selector_type,
+                                  lookup_child_selector (exp->gdbarch, sel));
       }
 
     case OP_OBJC_MSGCALL:
@@ -1098,16 +1100,20 @@ evaluate_subexp_standard (struct type *expect_type,
           the verification method than the non-standard, but more
           often used, 'NSObject' class. Make sure we check for both. */
 
-       responds_selector = lookup_child_selector ("respondsToSelector:");
+       responds_selector
+         = lookup_child_selector (exp->gdbarch, "respondsToSelector:");
        if (responds_selector == 0)
-         responds_selector = lookup_child_selector ("respondsTo:");
+         responds_selector
+           = lookup_child_selector (exp->gdbarch, "respondsTo:");
        
        if (responds_selector == 0)
          error (_("no 'respondsTo:' or 'respondsToSelector:' method"));
        
-       method_selector = lookup_child_selector ("methodForSelector:");
+       method_selector
+         = lookup_child_selector (exp->gdbarch, "methodForSelector:");
        if (method_selector == 0)
-         method_selector = lookup_child_selector ("methodFor:");
+         method_selector
+           = lookup_child_selector (exp->gdbarch, "methodFor:");
        
        if (method_selector == 0)
          error (_("no 'methodFor:' or 'methodForSelector:' method"));
This page took 0.024034 seconds and 4 git commands to generate.