]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
* corefile.c (core_sym_class): Do not discard nested subprograms.
authorNick Clifton <nickc@redhat.com>
Thu, 5 Jul 2007 09:07:30 +0000 (09:07 +0000)
committerNick Clifton <nickc@redhat.com>
Thu, 5 Jul 2007 09:07:30 +0000 (09:07 +0000)
gprof/ChangeLog
gprof/Makefile.am
gprof/Makefile.in
gprof/corefile.c

index a44279da14197c51a6a0d91269e6fb476b15f917..82f801594ed1cdb985c3b0ad71baa89c1f350be1 100644 (file)
@@ -1,3 +1,7 @@
+2007-07-05  Tristan Gingold  <gingold@adacore.com>
+
+       * corefile.c (core_sym_class): Do not discard nested subprograms.
+
 2007-07-02  Alan Modra  <amodra@bigpond.net.au>
 
        * Makefile.am: Run "make dep-am".
index 74039372e058f9112d5bd384cafa5884a2cdc69b..edf4a8ebb603f444d14235c62641f9f37fcda495 100644 (file)
@@ -226,7 +226,7 @@ corefile.o: corefile.c $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h \
   gprof.h $(BFDDIR)/sysdep.h ../bfd/config.h $(INCDIR)/ansidecl.h \
   $(INCDIR)/fopen-same.h $(INCDIR)/filenames.h ../bfd/bfd.h \
   $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h gconfig.h search_list.h \
-  source.h symtab.h hist.h corefile.h
+  source.h symtab.h hist.h corefile.h $(INCDIR)/safe-ctype.h
 gmon_io.o: gmon_io.c gprof.h $(BFDDIR)/sysdep.h ../bfd/config.h \
   $(INCDIR)/ansidecl.h $(INCDIR)/fopen-same.h $(INCDIR)/filenames.h \
   ../bfd/bfd.h $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h \
index d609fe33e1c0aedd34e6eaffe071785c628b247b..d5c69258e8989ccddbac5315391214e850e7bec5 100644 (file)
@@ -293,15 +293,15 @@ $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am  $(am__confi
        @for dep in $?; do \
          case '$(am__configure_deps)' in \
            *$$dep*) \
-             echo ' cd $(srcdir) && $(AUTOMAKE) --cygnus '; \
-             cd $(srcdir) && $(AUTOMAKE) --cygnus  \
+             echo ' cd $(srcdir) && $(AUTOMAKE) --foreign '; \
+             cd $(srcdir) && $(AUTOMAKE) --foreign  \
                && exit 0; \
              exit 1;; \
          esac; \
        done; \
-       echo ' cd $(top_srcdir) && $(AUTOMAKE) --cygnus  Makefile'; \
+       echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign  Makefile'; \
        cd $(top_srcdir) && \
-         $(AUTOMAKE) --cygnus  Makefile
+         $(AUTOMAKE) --foreign  Makefile
 .PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
        @case '$?' in \
@@ -971,7 +971,7 @@ corefile.o: corefile.c $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h \
   gprof.h $(BFDDIR)/sysdep.h ../bfd/config.h $(INCDIR)/ansidecl.h \
   $(INCDIR)/fopen-same.h $(INCDIR)/filenames.h ../bfd/bfd.h \
   $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h gconfig.h search_list.h \
-  source.h symtab.h hist.h corefile.h
+  source.h symtab.h hist.h corefile.h $(INCDIR)/safe-ctype.h
 gmon_io.o: gmon_io.c gprof.h $(BFDDIR)/sysdep.h ../bfd/config.h \
   $(INCDIR)/ansidecl.h $(INCDIR)/fopen-same.h $(INCDIR)/filenames.h \
   ../bfd/bfd.h $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h \
index a078d61c8933fb5c59b3d71b989aed1ed5119939..a9f1f6c93f9029dc6434dcd08a36b76ffaa12cd6 100644 (file)
@@ -1,6 +1,6 @@
 /* corefile.c
 
-   Copyright 1999, 2000, 2001, 2002, 2003, 2004, 2005
+   Copyright 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2007
    Free Software Foundation, Inc.
 
    This file is part of GNU Binutils.
@@ -27,6 +27,7 @@
 #include "symtab.h"
 #include "hist.h"
 #include "corefile.h"
+#include "safe-ctype.h"
 
 bfd *core_bfd;
 static int core_num_syms;
@@ -365,8 +366,15 @@ core_sym_class (asymbol *sym)
 
   for (name = sym->name; *name; ++name)
     {
-      if (*name == '.' || *name == '$')
-       return 0;
+      if (*name == '$')
+        return 0;
+
+      /* Do not discard nested subprograms (those
+        which end with .NNN, where N are digits).  */
+      if (*name == '.')
+       for (name++; *name; name++)
+         if (! ISDIGIT (*name))
+           return 0;
     }
 
   /* On systems where the C compiler adds an underscore to all