]> Git Repo - binutils.git/blobdiff - gdb/values.c
Fixes related to handling of C++ methods (handle destructors
[binutils.git] / gdb / values.c
index eac4d59096eb0b6ab4579777f841af85dad4edaf..810e00b41a867c7421f7d4c469dc18648d4e2fdd 100644 (file)
@@ -1284,27 +1284,22 @@ check_stub_method (type, i, j)
 
   if (*p != ')')                       /* () means no args, skip while */
     {
+      depth = 0;
       while (*p)
        {
-         if (*p == '(')
-           depth += 1;
-         else if (*p == ')')
-           depth -= 1;
-
          if (depth <= 0 && (*p == ',' || *p == ')'))
            {
-             char *tmp = (char *)alloca (p - argtypetext + 4);
-             value val;
-             tmp[0] = '(';
-             bcopy (argtypetext, tmp+1, p - argtypetext);
-             tmp[p-argtypetext+1] = ')';
-             tmp[p-argtypetext+2] = '0';
-             tmp[p-argtypetext+3] = '\0';
-             val = parse_and_eval (tmp);
-             argtypes[argcount] = VALUE_TYPE (val);
+             argtypes[argcount] =
+                 parse_and_eval_type (argtypetext, p - argtypetext);
              argcount += 1;
              argtypetext = p + 1;
            }
+
+         if (*p == '(')
+           depth += 1;
+         else if (*p == ')')
+           depth -= 1;
+
          p += 1;
        }
     }
This page took 0.024245 seconds and 4 git commands to generate.