]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
re PR debug/7078 (stabs are not generated correctly with c++ namespaces are used)
authorDevang Patel <dpatel@apple.com>
Tue, 13 Jan 2004 20:12:35 +0000 (12:12 -0800)
committerDevang Patel <dpatel@gcc.gnu.org>
Tue, 13 Jan 2004 20:12:35 +0000 (12:12 -0800)
        PR debug/7078
        * dbxout.c (dbxout_symbol_name): Emit mangled names for
        NAMESPACE_DECL memebers.

From-SVN: r75815

gcc/ChangeLog
gcc/dbxout.c

index aafb532d3ac8ee2af24a2b79a17622e8e6edec1d..4a6758b6aae091c836cedf8f47638db563315b3b 100644 (file)
@@ -1,3 +1,9 @@
+2004-01-13  Devang Patel <dpatel@apple.com
+
+       PR debug/7078
+       * dbxout.c (dbxout_symbol_name): Emit mangled names for 
+       NAMESPACE_DECL memebers.
+       
 2004-01-13  Andrew Pinski  <pinskia@physics.uc.edu>
 
        PR c++/12709
index 4971be819d1fcb243d9af33160fda2a2c3daed24..2c6ff7b56e21f2d243f3e128e31864d4092fbc28 100644 (file)
@@ -1,6 +1,6 @@
 /* Output dbx-format symbol table information from GNU compiler.
    Copyright (C) 1987, 1988, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
-   1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
+   1999, 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
 
 This file is part of GCC.
 
@@ -2614,9 +2614,11 @@ dbxout_symbol_name (tree decl, const char *suffix, int letter)
 {
   const char *name;
 
-  if (DECL_CONTEXT (decl) && TYPE_P (DECL_CONTEXT (decl)))
-    /* One slight hitch: if this is a VAR_DECL which is a static
-       class member, we must put out the mangled name instead of the
+  if (DECL_CONTEXT (decl) 
+      && (TYPE_P (DECL_CONTEXT (decl))
+         || TREE_CODE (DECL_CONTEXT (decl)) == NAMESPACE_DECL))
+    /* One slight hitch: if this is a VAR_DECL which is a class member
+       or a namespace member, we must put out the mangled name instead of the
        DECL_NAME.  Note also that static member (variable) names DO NOT begin
        with underscores in .stabs directives.  */
     name = IDENTIFIER_POINTER (DECL_ASSEMBLER_NAME (decl));