aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorJim Kingdon <jkingdon@engr.sgi.com>1993-12-29 20:52:06 +0000
committerJim Kingdon <jkingdon@engr.sgi.com>1993-12-29 20:52:06 +0000
commit393e55bac4eb94d68b08c6847eae9e40905d2e3e (patch)
treeddacc864dc47833284adfe0f94e4c0b9c3850bf4 /gdb
parent88b245830aa4d4872ed49bf7768e90f06f9a2c68 (diff)
downloadgdb-393e55bac4eb94d68b08c6847eae9e40905d2e3e.zip
gdb-393e55bac4eb94d68b08c6847eae9e40905d2e3e.tar.gz
gdb-393e55bac4eb94d68b08c6847eae9e40905d2e3e.tar.bz2
* c-exp.y: Revert Kung's change. "..." is not a type, and the
change caused "p (...)0" to dump core. * gdbtypes.c (check_stub_method): Don't pass "..." to parse_and_eval_type. This should fix the bug which Kung was trying to fix.
Diffstat (limited to 'gdb')
-rw-r--r--gdb/ChangeLog6
-rw-r--r--gdb/c-exp.y1
-rw-r--r--gdb/gdbtypes.c10
3 files changed, 13 insertions, 4 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 54cb0d1..d846ad0 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,11 @@
Wed Dec 29 12:32:08 1993 Jim Kingdon (kingdon@lioth.cygnus.com)
+ * c-exp.y: Revert Kung's change. "..." is not a type, and the
+ change caused "p (...)0" to dump core.
+ * gdbtypes.c (check_stub_method): Don't pass "..." to
+ parse_and_eval_type. This should fix the bug which Kung was
+ trying to fix.
+
* stabsread.c (define_symbol): If we choose not to combine
two symbols, don't just ignore the second (LOC_REGISTER) one.
* printcmd.c (print_frame_args): If we have a LOC_ARG and a
diff --git a/gdb/c-exp.y b/gdb/c-exp.y
index f58424f..ebc1ca6 100644
--- a/gdb/c-exp.y
+++ b/gdb/c-exp.y
@@ -831,7 +831,6 @@ typebase /* Implements (approximately): (type-qualifier)* type-specifier */
be too. */
| CONST_KEYWORD typebase { $$ = $2; }
| VOLATILE_KEYWORD typebase { $$ = $2; }
- | '.' '.' '.' { $$ = NULL; }
;
typename: TYPENAME
diff --git a/gdb/gdbtypes.c b/gdb/gdbtypes.c
index e361796..d1a7da9 100644
--- a/gdb/gdbtypes.c
+++ b/gdb/gdbtypes.c
@@ -989,9 +989,13 @@ check_stub_method (type, i, j)
{
if (depth <= 0 && (*p == ',' || *p == ')'))
{
- argtypes[argcount] =
- parse_and_eval_type (argtypetext, p - argtypetext);
- argcount += 1;
+ /* Avoid parsing of ellipsis, they will be handled below. */
+ if (strncmp (argtypetext, "...", p - argtypetext) != 0)
+ {
+ argtypes[argcount] =
+ parse_and_eval_type (argtypetext, p - argtypetext);
+ argcount += 1;
+ }
argtypetext = p + 1;
}