New objc_specific struct.
authorAdam Fedor <fedor@gnu.org>
Tue, 15 Oct 2002 02:50:56 +0000 (02:50 +0000)
committerAdam Fedor <fedor@gnu.org>
Tue, 15 Oct 2002 02:50:56 +0000 (02:50 +0000)
(SYMBOL_INIT_LANGUAGE_SPECIFIC): Handle ObjC.
(SYMBOL_DEMANGLED_NAME): Likewise.

gdb/ChangeLog
gdb/symtab.h

index e29e038e7df53171b1045f60f7d669d019cb80be..6e25cc3e1b941624a23c9080cb62c1b2901beaee 100644 (file)
@@ -1,3 +1,9 @@
+2002-10-14  Adam Fedor  <fedor@gnu.org>
+
+       * symtab.h: New objc_specific struct.
+       (SYMBOL_INIT_LANGUAGE_SPECIFIC): Handle ObjC.
+       (SYMBOL_DEMANGLED_NAME): Likewise.
+
 2002-10-14  Adam Fedor  <fedor@gnu.org>
 
        * symfile.c (init_filename_language_table): Add ObjC file extension.
index a78607d584e6f866ecb79056e050c462f6d65939..a76a0ebd5b69e7af44acc6dca4e38c80e0f9bd45 100644 (file)
@@ -89,6 +89,11 @@ struct general_symbol_info
       char *demangled_name;
     }
     cplus_specific;
+    struct objc_specific
+    {
+      char *demangled_name;
+    }
+    objc_specific;
 #if 0
 /* OBSOLETE struct chill_specific        *//* For Chill */
     /* OBSOLETE   { */
@@ -146,6 +151,10 @@ extern CORE_ADDR symbol_overlayed_address (CORE_ADDR, asection *);
       {                                                                        \
        SYMBOL_CPLUS_DEMANGLED_NAME (symbol) = NULL;                    \
       }                                                                        \
+    else if (SYMBOL_LANGUAGE (symbol) == language_objc)                        \
+      {                                                                        \
+       SYMBOL_OBJC_DEMANGLED_NAME (symbol) = NULL;                     \
+      }                                                                        \
     /* OBSOLETE else if (SYMBOL_LANGUAGE (symbol) == language_chill) */ \
     /* OBSOLETE   { */                                                 \
     /* OBSOLETE     SYMBOL_CHILL_DEMANGLED_NAME (symbol) = NULL; */    \
@@ -170,13 +179,18 @@ extern void symbol_init_demangled_name (struct general_symbol_info *symbol,
   (SYMBOL_LANGUAGE (symbol) == language_cplus                          \
    || SYMBOL_LANGUAGE (symbol) == language_java                                \
    ? SYMBOL_CPLUS_DEMANGLED_NAME (symbol)                              \
+      : (SYMBOL_LANGUAGE (symbol) == language_objc                     \
+         ? SYMBOL_OBJC_DEMANGLED_NAME (symbol)                         \
    : /* OBSOLETE (SYMBOL_LANGUAGE (symbol) == language_chill */                \
      /* OBSOLETE ? SYMBOL_CHILL_DEMANGLED_NAME (symbol) */             \
-     NULL)
+        NULL))
 
 /* OBSOLETE #define SYMBOL_CHILL_DEMANGLED_NAME(symbol) */
 /* OBSOLETE (symbol)->ginfo.language_specific.chill_specific.demangled_name */
 
+#define SYMBOL_OBJC_DEMANGLED_NAME(symbol)                             \
+   (symbol)->ginfo.language_specific.objc_specific.demangled_name
+
 /* Macro that returns the "natural source name" of a symbol.  In C++ this is
    the "demangled" form of the name if demangle is on and the "mangled" form
    of the name if demangle is off.  In other languages this is just the