From b149968f7a256b7413da56c6cebb78497f4e5654 Mon Sep 17 00:00:00 2001 From: Nick Clifton Date: Fri, 30 Mar 2012 12:51:07 +0000 Subject: [PATCH] PR binutils/13925 * stabs.c (stab_demangle_v3_arglist): Cope with the demangler returning an empty context for a function with no arguments. --- binutils/ChangeLog | 6 ++++++ binutils/stabs.c | 5 +++++ 2 files changed, 11 insertions(+) diff --git a/binutils/ChangeLog b/binutils/ChangeLog index d229810f5e..749378f643 100644 --- a/binutils/ChangeLog +++ b/binutils/ChangeLog @@ -1,3 +1,9 @@ +2012-03-30 Nick Clifton + + PR binutils/13925 + * stabs.c (stab_demangle_v3_arglist): Cope with the demangler + returning an empty context for a function with no arguments. + 2012-03-28 Tom Tromey * dwarf.c (display_gdb_index): Handle index version 6. diff --git a/binutils/stabs.c b/binutils/stabs.c index 9534d6616a..04c345252d 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)