aboutsummaryrefslogtreecommitdiff
path: root/binutils/stabs.c
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2012-03-30 12:51:07 +0000
committerNick Clifton <nickc@redhat.com>2012-03-30 12:51:07 +0000
commitb149968f7a256b7413da56c6cebb78497f4e5654 (patch)
tree517b2468281afbdc69d167f2f3ee98b18617d013 /binutils/stabs.c
parent83deda5d8b904baa80a0d0c18411e363229c5e36 (diff)
downloadgdb-b149968f7a256b7413da56c6cebb78497f4e5654.zip
gdb-b149968f7a256b7413da56c6cebb78497f4e5654.tar.gz
gdb-b149968f7a256b7413da56c6cebb78497f4e5654.tar.bz2
PR binutils/13925
* stabs.c (stab_demangle_v3_arglist): Cope with the demangler returning an empty context for a function with no arguments.
Diffstat (limited to 'binutils/stabs.c')
-rw-r--r--binutils/stabs.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/binutils/stabs.c b/binutils/stabs.c
index 9534d66..04c3452 100644
--- a/binutils/stabs.c
+++ b/binutils/stabs.c
@@ -5169,6 +5169,11 @@ stab_demangle_v3_arglist (void *dhandle, struct stab_handle *info,
return NULL;
}
+ /* PR 13925: Cope if the demangler returns an empty
+ context for a function with no arguments. */
+ if (dc->u.s_binary.left == NULL)
+ break;
+
arg = stab_demangle_v3_arg (dhandle, info, dc->u.s_binary.left,
NULL, &varargs);
if (arg == NULL)