diff options
author | Jan Kratochvil <jan.kratochvil@redhat.com> | 2010-01-08 08:55:15 +0000 |
---|---|---|
committer | Jan Kratochvil <jan.kratochvil@redhat.com> | 2010-01-08 08:55:15 +0000 |
commit | 8212bf0441f42f6bf7952d4caa0f2b2ae8b3381e (patch) | |
tree | 997284d99752603e3c472eff62c52193e7edb0a6 /gdb/stabsread.c | |
parent | 915d481cfb685dfe9f4f17f58e6da3b0a87e0d86 (diff) | |
download | gdb-8212bf0441f42f6bf7952d4caa0f2b2ae8b3381e.tar.gz |
gdb/
* stabsread.c (read_args): Handle zero arguments.
gdb/testsuite/
* gdb.stabs/weird.def (args93): New.
Diffstat (limited to 'gdb/stabsread.c')
-rw-r--r-- | gdb/stabsread.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/gdb/stabsread.c b/gdb/stabsread.c index 66b084ffc66..71c168c450a 100644 --- a/gdb/stabsread.c +++ b/gdb/stabsread.c @@ -4111,7 +4111,17 @@ read_args (char **pp, int end, struct objfile *objfile, int *nargsp, } (*pp)++; /* get past `end' (the ':' character) */ - if (TYPE_CODE (types[n - 1]) != TYPE_CODE_VOID) + if (n == 0) + { + /* We should read at least the THIS parameter here. Some broken stabs + output contained `(0,41),(0,42)=@s8;-16;,(0,43),(0,1);' where should + have been present ";-16,(0,43)" reference instead. This way the + excessive ";" marker prematurely stops the parameters parsing. */ + + complaint (&symfile_complaints, _("Invalid (empty) method arguments")); + *varargsp = 0; + } + else if (TYPE_CODE (types[n - 1]) != TYPE_CODE_VOID) *varargsp = 1; else { |