diff options
author | Per Bothner <per@bothner.com> | 1991-11-12 22:20:02 +0000 |
---|---|---|
committer | Per Bothner <per@bothner.com> | 1991-11-12 22:20:02 +0000 |
commit | 0e2a896cf5a7231fe300fe0918a38f87bc9ee0ec (patch) | |
tree | 3ba6589b103df25eeaab1de54754fbe0f5cbea36 /gdb/values.c | |
parent | 5f12485297f7f829c0c035657197ce1de09a10cd (diff) | |
download | gdb-0e2a896cf5a7231fe300fe0918a38f87bc9ee0ec.zip gdb-0e2a896cf5a7231fe300fe0918a38f87bc9ee0ec.tar.gz gdb-0e2a896cf5a7231fe300fe0918a38f87bc9ee0ec.tar.bz2 |
Fixes related to handling of C++ methods (handle destructors
and parameters that are functions).
Diffstat (limited to 'gdb/values.c')
-rw-r--r-- | gdb/values.c | 23 |
1 files changed, 9 insertions, 14 deletions
diff --git a/gdb/values.c b/gdb/values.c index eac4d59..810e00b 100644 --- a/gdb/values.c +++ b/gdb/values.c @@ -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; } } |