PR binutils/13925
authorNick Clifton <nickc@redhat.com>
Fri, 30 Mar 2012 12:51:07 +0000 (12:51 +0000)
committerNick Clifton <nickc@redhat.com>
Fri, 30 Mar 2012 12:51:07 +0000 (12:51 +0000)
* stabs.c (stab_demangle_v3_arglist): Cope with the demangler
returning an empty context for a function with no arguments.

binutils/ChangeLog
binutils/stabs.c

index d229810f5ea8fce4e21173c51d534d114eb2e51d..749378f6437fc4d8de8ffcc05d102fd50b14603a 100644 (file)
@@ -1,3 +1,9 @@
+2012-03-30  Nick Clifton  <nickc@redhat.com>
+
+       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  <tromey@redhat.com>
 
        * dwarf.c (display_gdb_index): Handle index version 6.
index 9534d6616acac2e8be7ab78fb2e2faa42bccfecd..04c345252db63583691fc89d155c1bfda7f1c765 100644 (file)
@@ -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)