OSDN Git Service

* flags.h (g_switch_value): Change to an unsigned
[pf3gnuchains/gcc-fork.git] / gcc / sdbout.c
index 9effe78..9ad9f42 100644 (file)
@@ -43,6 +43,8 @@ AT&T C compiler.  From the example below I would conclude the following:
 
 #include "config.h"
 #include "system.h"
+#include "coretypes.h"
+#include "tm.h"
 #include "debug.h"
 #include "tree.h"
 #include "ggc.h"
@@ -61,6 +63,7 @@ static GTY(()) tree anonymous_types;
 #include "tm_p.h"
 #include "gsyms.h"
 #include "langhooks.h"
+#include "target.h"
 
 /* 1 if PARM is passed to this function in memory.  */
 
@@ -152,9 +155,8 @@ static void sdbout_global_decl              PARAMS ((tree));
 #ifndef PUT_SDB_INT_VAL
 #define PUT_SDB_INT_VAL(a) \
  do {                                                                  \
-   fputs ("\t.val\t", asm_out_file);                                   \
-   fprintf (asm_out_file, HOST_WIDE_INT_PRINT_DEC, (HOST_WIDE_INT) (a)); \
-   fprintf (asm_out_file, "%s", SDB_DELIM);                            \
+   fprintf (asm_out_file, "\t.val\t" HOST_WIDE_INT_PRINT_DEC "%s",     \
+           (HOST_WIDE_INT) (a), SDB_DELIM);                            \
  } while (0)
 
 #endif
@@ -188,9 +190,8 @@ do { fprintf (asm_out_file, "\t.def\t");    \
 #ifndef PUT_SDB_SIZE
 #define PUT_SDB_SIZE(a) \
  do {                                                                  \
-   fputs ("\t.size\t", asm_out_file);                                  \
-   fprintf (asm_out_file, HOST_WIDE_INT_PRINT_DEC, (HOST_WIDE_INT) (a)); \
-   fprintf (asm_out_file, "%s", SDB_DELIM);                            \
+   fprintf (asm_out_file, "\t.size\t" HOST_WIDE_INT_PRINT_DEC "%s",    \
+           (HOST_WIDE_INT) (a), SDB_DELIM);                            \
  } while(0)
 #endif
 
@@ -254,7 +255,7 @@ do { fprintf (asm_out_file, "\t.tag\t");    \
 /* Set the sdb tag identifier string for TYPE to NAME.  */
 
 #define SET_KNOWN_TYPE_TAG(TYPE, NAME) \
-  TYPE_SYMTAB_POINTER (TYPE) = (NAME)
+  TYPE_SYMTAB_POINTER (TYPE) = (char *)(NAME)
 
 /* Return the name (a string) of the struct, union or enum tag
    described by the TREE_LIST node LINK.  This is 0 for an anonymous one.  */
@@ -330,7 +331,8 @@ const struct gcc_debug_hooks sdb_debug_hooks =
   sdbout_global_decl,          /* global_decl */
   debug_nothing_tree,          /* deferred_inline_function */
   debug_nothing_tree,          /* outlining_inline_function */
-  sdbout_label
+  sdbout_label,                        /* label */
+  debug_nothing_int            /* handle_pch */
 };
 \f
 #if 0
@@ -924,23 +926,6 @@ sdbout_symbol (decl, local)
          PUT_SDB_INT_VAL (DEBUGGER_AUTO_OFFSET (XEXP (value, 0)));
          PUT_SDB_SCL (C_AUTO);
        }
-      else if (GET_CODE (value) == MEM && GET_CODE (XEXP (value, 0)) == CONST)
-       {
-         /* Handle an obscure case which can arise when optimizing and
-            when there are few available registers.  (This is *always*
-            the case for i386/i486 targets).  The DECL_RTL looks like
-            (MEM (CONST ...)) even though this variable is a local `auto'
-            or a local `register' variable.  In effect, what has happened
-            is that the reload pass has seen that all assignments and
-            references for one such a local variable can be replaced by
-            equivalent assignments and references to some static storage
-            variable, thereby avoiding the need for a register.  In such
-            cases we're forced to lie to debuggers and tell them that
-            this variable was itself `static'.  */
-         PUT_SDB_DEF (name);
-         PUT_SDB_VAL (XEXP (XEXP (value, 0), 0));
-         PUT_SDB_SCL (C_STAT);
-       }
       else
        {
          /* It is something we don't know how to represent for SDB.  */