aboutsummaryrefslogtreecommitdiff
path: root/gdb/stabsread.c
diff options
context:
space:
mode:
authorDaniel Jacobowitz <drow@false.org>2006-01-15 20:26:02 +0000
committerDaniel Jacobowitz <drow@false.org>2006-01-15 20:26:02 +0000
commit0a029df55b1dcf3878d3680c359d199185ba3a9e (patch)
treeab12b7f1a2e679e9b113966461071174d280f6a1 /gdb/stabsread.c
parent1731e543e0b37977db57a805c349f3c1e15c259f (diff)
downloadgdb-0a029df55b1dcf3878d3680c359d199185ba3a9e.zip
gdb-0a029df55b1dcf3878d3680c359d199185ba3a9e.tar.gz
gdb-0a029df55b1dcf3878d3680c359d199185ba3a9e.tar.bz2
* macroexp.c (expand): Initialize argc.
* stabsread.c (read_type): Handle errors from read_args. (read_args): Return NULL for errors.
Diffstat (limited to 'gdb/stabsread.c')
-rw-r--r--gdb/stabsread.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/gdb/stabsread.c b/gdb/stabsread.c
index bbaa40d..e346ad2 100644
--- a/gdb/stabsread.c
+++ b/gdb/stabsread.c
@@ -1804,6 +1804,8 @@ again:
return_type = read_type (pp, objfile);
args = read_args (pp, ';', objfile, &nargs, &varargs);
+ if (args == NULL)
+ return error_type (pp, objfile);
type = dbx_alloc_type (typenums, objfile);
smash_to_method_type (type, domain, return_type, args,
nargs, varargs);
@@ -3985,8 +3987,8 @@ handle_true_range:
}
/* Read in an argument list. This is a list of types, separated by commas
- and terminated with END. Return the list of types read in, or (struct type
- **)-1 if there is an error. */
+ and terminated with END. Return the list of types read in, or NULL
+ if there is an error. */
static struct field *
read_args (char **pp, int end, struct objfile *objfile, int *nargsp,
@@ -4001,7 +4003,7 @@ read_args (char **pp, int end, struct objfile *objfile, int *nargsp,
{
if (**pp != ',')
/* Invalid argument list: no ','. */
- return (struct field *) -1;
+ return NULL;
(*pp)++;
STABS_CONTINUE (pp, objfile);
types[n++] = read_type (pp, objfile);