* xcoffread.c (process_xcoff_symbol): Only change 'V' to 'S' if not
authorJim Kingdon <jkingdon@engr.sgi.com>
Sun, 16 Jan 1994 20:09:59 +0000 (20:09 +0000)
committerJim Kingdon <jkingdon@engr.sgi.com>
Sun, 16 Jan 1994 20:09:59 +0000 (20:09 +0000)
within_function.

gdb/ChangeLog
gdb/xcoffread.c

index d9958587d8a5c5c28b59a61636b3df71034d2890..39f97482c974ab8d34a62a4be78b521878299921 100644 (file)
@@ -1,5 +1,8 @@
 Sun Jan 16 12:46:01 1994  Jim Kingdon  (kingdon@lioth.cygnus.com)
 
+       * xcoffread.c (process_xcoff_symbol): Only change 'V' to 'S' if not
+       within_function.
+
        * Makefile.in: Add mostlyclean target.
 
 Sat Jan 15 10:20:13 1994  Jim Kingdon  (kingdon@lioth.cygnus.com)
index 6e61e80df5e6d1bc7f7b056b8210d9fc3511b7c8..8b70625f9b40db7a12113198e907f9eb59571527 100644 (file)
@@ -1629,24 +1629,25 @@ process_xcoff_symbol (cs, objfile)
 
     case C_STSYM:
 
-       /* If we are going to use Sun dbx's define_symbol(), we need to
-          massage our stab string a little. Change 'V' type to 'S' to be
-          comparible with Sun. */
-        /* FIXME: Is this to avoid a Sun-specific hack somewhere?
-          Needs more investigation.  */
-
-       if (*name == ':' || (pp = (char *) strchr(name, ':')) == NULL)
-         return NULL;
-
-       ++pp;
-       if (*pp == 'V') *pp = 'S';
-       sym = define_symbol (cs->c_value, cs->c_name, 0, 0, objfile);
-        if (sym != NULL)
-         {
-           SYMBOL_VALUE (sym) += static_block_base;
-           SYMBOL_SECTION (sym) = static_block_section;
-         }
-       return sym;
+      /* For xlc (not GCC), the 'V' symbol descriptor is used for all
+        statics and we need to distinguish file-scope versus function-scope
+        using within_function.  We do this by changing the string we pass
+        to define_symbol to use 'S' where we need to, which is not necessarily
+        super-clean, but seems workable enough.  */
+
+      if (*name == ':' || (pp = (char *) strchr(name, ':')) == NULL)
+       return NULL;
+
+      ++pp;
+      if (*pp == 'V' && !within_function)
+       *pp = 'S';
+      sym = define_symbol (cs->c_value, cs->c_name, 0, 0, objfile);
+      if (sym != NULL)
+       {
+         SYMBOL_VALUE (sym) += static_block_base;
+         SYMBOL_SECTION (sym) = static_block_section;
+       }
+      return sym;
 
     case C_LSYM:
       sym = define_symbol (cs->c_value, cs->c_name, 0, N_LSYM, objfile);
This page took 0.026731 seconds and 4 git commands to generate.