Tue Aug 18 15:42:40 1998 Martin M. Hunt <hunt@cygnus.com>
authorMartin Hunt <hunt@redhat.com>
Tue, 18 Aug 1998 22:43:18 +0000 (22:43 +0000)
committerMartin Hunt <hunt@redhat.com>
Tue, 18 Aug 1998 22:43:18 +0000 (22:43 +0000)
* gdbtk-cmds.c (gdb_listfuncs): Strip out global constructors
and destructors from the function list.

gdb/ChangeLog-gdbtk
gdb/gdbtk-cmds.c

index 27051026b36c26036036fc6eb61484abd2fd952b..d7be994c2e5afdc2010824aa77fddfb50c0c34dd 100644 (file)
@@ -1,3 +1,8 @@
+Tue Aug 18 15:42:40 1998  Martin M. Hunt  <hunt@cygnus.com>
+
+       * gdbtk-cmds.c (gdb_listfuncs): Strip out global constructors
+       and destructors from the function list.
+
 start-sanitize-ide
 Thu Aug 13 15:15:59 1998  Drew Moseley  <dmoseley@cygnus.com>
 
index de44004cf8212a0d51d7d1332a33cab6811c39d4..9cefd82ad9aebd78b98c7c980e91778379c20878 100644 (file)
@@ -1444,8 +1444,13 @@ gdb_listfuncs (clientData, interp, objc, objv)
              char *name = cplus_demangle (SYMBOL_NAME(sym), 0);
              if (name)
                {
-                 funcVals[0] = Tcl_NewStringObj(name, -1);
-                 funcVals[1] = mangled;          
+                 /* strip out "global constructors" and "global destructors" */
+                 /* because we aren't interested in them. */
+                 if (strncmp (name, "global ", 7))
+                   {
+                     funcVals[0] = Tcl_NewStringObj(name, -1);
+                     funcVals[1] = mangled;      
+                   }
                }
              else
                {