]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
* block.h (struct block): Remove "gcc_compile_flag" member.
authorUlrich Weigand <uweigand@de.ibm.com>
Fri, 12 Oct 2007 15:34:45 +0000 (15:34 +0000)
committerUlrich Weigand <uweigand@de.ibm.com>
Fri, 12 Oct 2007 15:34:45 +0000 (15:34 +0000)
(BLOCK_GCC_COMPILED): Remove.
* block.c (allocate_block): Do not clear BLOCK_GCC_COMPILED.
* buildsym.c (finish_block): Do not set it.
* symmisc.c (dump_symtab_1): Do not dump it.

* value.h (using_struct_return): Remove "gcc_p" argument.
* value.c (using_struct_return): Likewise.
* eval.c (evaluate_subexp_standard): Adapt callers.
* infcall.c (call_function_by_hand): Likewise.
* stack.c (return_command): Likewise.
* sparc-tdep.c (sparc32_push_dummy_code): Likewise.

* gdbarch.sh (push_dummy_code): Remove "using_gcc" parameter.
* gdbarch.c, gdbarch.h: Regenerate.
* cris-tdep.c (cris_push_dummy_code): Adapt prototype.
* hppa-hpux-tdep.c (hppa_hpux_push_dummy_code): Likewise.
* sparc-tdep.c (sparc32_push_dummy_code): Likewise.
* infcall.c (generic_push_dummy_code, push_dummy_code): Likewise.
(push_dummy_code, call_function_by_hand): Adapt callers.

16 files changed:
gdb/ChangeLog
gdb/block.c
gdb/block.h
gdb/buildsym.c
gdb/cris-tdep.c
gdb/eval.c
gdb/gdbarch.c
gdb/gdbarch.h
gdb/gdbarch.sh
gdb/hppa-hpux-tdep.c
gdb/infcall.c
gdb/sparc-tdep.c
gdb/stack.c
gdb/symmisc.c
gdb/value.c
gdb/value.h

index f809c7ec3d68f4f276088d916e77fea3701877ce..b9818afa5ae2996782cacf0b58f2c0a2da942a41 100644 (file)
@@ -1,3 +1,26 @@
+2007-10-12  Ulrich Weigand  <uweigand@de.ibm.com>
+
+       * block.h (struct block): Remove "gcc_compile_flag" member.
+       (BLOCK_GCC_COMPILED): Remove.
+       * block.c (allocate_block): Do not clear BLOCK_GCC_COMPILED.
+       * buildsym.c (finish_block): Do not set it.
+       * symmisc.c (dump_symtab_1): Do not dump it.
+
+       * value.h (using_struct_return): Remove "gcc_p" argument.
+       * value.c (using_struct_return): Likewise.
+       * eval.c (evaluate_subexp_standard): Adapt callers.
+       * infcall.c (call_function_by_hand): Likewise.
+       * stack.c (return_command): Likewise.
+       * sparc-tdep.c (sparc32_push_dummy_code): Likewise.
+
+       * gdbarch.sh (push_dummy_code): Remove "using_gcc" parameter.
+       * gdbarch.c, gdbarch.h: Regenerate.
+       * cris-tdep.c (cris_push_dummy_code): Adapt prototype.
+       * hppa-hpux-tdep.c (hppa_hpux_push_dummy_code): Likewise.
+       * sparc-tdep.c (sparc32_push_dummy_code): Likewise.
+       * infcall.c (generic_push_dummy_code, push_dummy_code): Likewise.
+       (push_dummy_code, call_function_by_hand): Adapt callers.
+
 2007-10-12  Ulrich Weigand  <uweigand@de.ibm.com>
 
        * infcmd.c (print_return_value): Remove STRUCT_RETURN argument.
index f34c7c4a6815af7a93af92ad3ae14866cbd8ce44..858d42d186376c42c2d58950c1930199b1b83842 100644 (file)
@@ -287,7 +287,6 @@ allocate_block (struct obstack *obstack)
   BLOCK_SUPERBLOCK (bl) = NULL;
   BLOCK_DICT (bl) = NULL;
   BLOCK_NAMESPACE (bl) = NULL;
-  BLOCK_GCC_COMPILED (bl) = 0;
 
   return bl;
 }
index 152a4fc55a1508972d8b6a91799c9c472305540c..0b69f877721e75398bd533676228e5da21cac0a3 100644 (file)
@@ -95,25 +95,12 @@ struct block
     cplus_specific;
   }
   language_specific;
-
-  /* Version of GCC used to compile the function corresponding
-     to this block, or 0 if not compiled with GCC.  When possible,
-     GCC should be compatible with the native compiler, or if that
-     is not feasible, the differences should be fixed during symbol
-     reading.  As of 16 Apr 93, this flag is never used to distinguish
-     between gcc2 and the native compiler.
-
-     If there is no function corresponding to this block, this meaning
-     of this flag is undefined.  */
-
-  unsigned char gcc_compile_flag;
 };
 
 #define BLOCK_START(bl)                (bl)->startaddr
 #define BLOCK_END(bl)          (bl)->endaddr
 #define BLOCK_FUNCTION(bl)     (bl)->function
 #define BLOCK_SUPERBLOCK(bl)   (bl)->superblock
-#define BLOCK_GCC_COMPILED(bl) (bl)->gcc_compile_flag
 #define BLOCK_DICT(bl)         (bl)->dict
 #define BLOCK_NAMESPACE(bl)   (bl)->language_specific.cplus_specific.namespace
 
index f6406794a312309e14c4a1bb7a2b28b353ed5afb..aab5056207b10a1ce50bb4ba61817f4700b025e2 100644 (file)
@@ -246,8 +246,6 @@ finish_block (struct symbol *symbol, struct pending **listhead,
   BLOCK_SUPERBLOCK (block) = NULL;
   BLOCK_NAMESPACE (block) = NULL;
 
-  BLOCK_GCC_COMPILED (block) = processing_gcc_compilation;
-
   /* Put the block in as the value of the symbol that names it.  */
 
   if (symbol)
index a2999a590da02788516982d9b457d79bab1c6ac7..a6dae9b9d589d1ffa49fad070eb96f2c8149c959 100644 (file)
@@ -868,7 +868,7 @@ cris_frame_align (struct gdbarch *gdbarch, CORE_ADDR sp)
 
 static CORE_ADDR
 cris_push_dummy_code (struct gdbarch *gdbarch,
-                      CORE_ADDR sp, CORE_ADDR funaddr, int using_gcc,
+                      CORE_ADDR sp, CORE_ADDR funaddr,
                       struct value **args, int nargs,
                       struct type *value_type,
                       CORE_ADDR *real_pc, CORE_ADDR *bp_addr,
index 0fb320e4474c9faa074f5d05e77b27046e5e44c8..ee1ac589ee2d0d07b47ce030678b2e20a24b95b3 100644 (file)
@@ -760,7 +760,6 @@ evaluate_subexp_standard (struct type *expect_type,
 
        CORE_ADDR selector = 0;
 
-       int using_gcc = 0;
        int struct_return = 0;
        int sub_no_side = 0;
 
@@ -912,9 +911,6 @@ evaluate_subexp_standard (struct type *expect_type,
 
            b = block_for_pc (funaddr);
 
-           /* If compiled without -g, assume GCC 2.  */
-           using_gcc = (b == NULL ? 2 : BLOCK_GCC_COMPILED (b));
-
            CHECK_TYPEDEF (value_type);
          
            if ((value_type == NULL) 
@@ -924,11 +920,11 @@ evaluate_subexp_standard (struct type *expect_type,
                  value_type = expect_type;
              }
 
-           struct_return = using_struct_return (value_type, using_gcc);
+           struct_return = using_struct_return (value_type);
          }
        else if (expect_type != NULL)
          {
-           struct_return = using_struct_return (check_typedef (expect_type), using_gcc);
+           struct_return = using_struct_return (check_typedef (expect_type));
          }
        
        /* Found a function symbol.  Now we will substitute its
index de6c50caaf1426e0aaf93b8c03a0a3f49e156dcf..adf56741fcbae0f2eff0d13a4057d563ced9f78c 100644 (file)
@@ -1744,13 +1744,13 @@ gdbarch_push_dummy_code_p (struct gdbarch *gdbarch)
 }
 
 CORE_ADDR
-gdbarch_push_dummy_code (struct gdbarch *gdbarch, CORE_ADDR sp, CORE_ADDR funaddr, int using_gcc, struct value **args, int nargs, struct type *value_type, CORE_ADDR *real_pc, CORE_ADDR *bp_addr, struct regcache *regcache)
+gdbarch_push_dummy_code (struct gdbarch *gdbarch, CORE_ADDR sp, CORE_ADDR funaddr, struct value **args, int nargs, struct type *value_type, CORE_ADDR *real_pc, CORE_ADDR *bp_addr, struct regcache *regcache)
 {
   gdb_assert (gdbarch != NULL);
   gdb_assert (gdbarch->push_dummy_code != NULL);
   if (gdbarch_debug >= 2)
     fprintf_unfiltered (gdb_stdlog, "gdbarch_push_dummy_code called\n");
-  return gdbarch->push_dummy_code (gdbarch, sp, funaddr, using_gcc, args, nargs, value_type, real_pc, bp_addr, regcache);
+  return gdbarch->push_dummy_code (gdbarch, sp, funaddr, args, nargs, value_type, real_pc, bp_addr, regcache);
 }
 
 void
index e24f2da904e62a9dee5f131dad19d0249895fb6e..e3775d939443a540730a69697e1aadb511741070 100644 (file)
@@ -273,8 +273,8 @@ extern void set_gdbarch_call_dummy_location (struct gdbarch *gdbarch, int call_d
 
 extern int gdbarch_push_dummy_code_p (struct gdbarch *gdbarch);
 
-typedef CORE_ADDR (gdbarch_push_dummy_code_ftype) (struct gdbarch *gdbarch, CORE_ADDR sp, CORE_ADDR funaddr, int using_gcc, struct value **args, int nargs, struct type *value_type, CORE_ADDR *real_pc, CORE_ADDR *bp_addr, struct regcache *regcache);
-extern CORE_ADDR gdbarch_push_dummy_code (struct gdbarch *gdbarch, CORE_ADDR sp, CORE_ADDR funaddr, int using_gcc, struct value **args, int nargs, struct type *value_type, CORE_ADDR *real_pc, CORE_ADDR *bp_addr, struct regcache *regcache);
+typedef CORE_ADDR (gdbarch_push_dummy_code_ftype) (struct gdbarch *gdbarch, CORE_ADDR sp, CORE_ADDR funaddr, struct value **args, int nargs, struct type *value_type, CORE_ADDR *real_pc, CORE_ADDR *bp_addr, struct regcache *regcache);
+extern CORE_ADDR gdbarch_push_dummy_code (struct gdbarch *gdbarch, CORE_ADDR sp, CORE_ADDR funaddr, struct value **args, int nargs, struct type *value_type, CORE_ADDR *real_pc, CORE_ADDR *bp_addr, struct regcache *regcache);
 extern void set_gdbarch_push_dummy_code (struct gdbarch *gdbarch, gdbarch_push_dummy_code_ftype *push_dummy_code);
 
 typedef void (gdbarch_print_registers_info_ftype) (struct gdbarch *gdbarch, struct ui_file *file, struct frame_info *frame, int regnum, int all);
index 6ad44f6ebc6c40c27bf8c9018eb164b3ee4cb9d8..8a7597cd6a371b390286618dd0ddff9a40f32752 100755 (executable)
@@ -466,7 +466,7 @@ v::int:deprecated_fp_regnum:::-1:-1::0
 # See gdbint.texinfo.  See infcall.c.
 M::CORE_ADDR:push_dummy_call:struct value *function, struct regcache *regcache, CORE_ADDR bp_addr, int nargs, struct value **args, CORE_ADDR sp, int struct_return, CORE_ADDR struct_addr:function, regcache, bp_addr, nargs, args, sp, struct_return, struct_addr
 v::int:call_dummy_location::::AT_ENTRY_POINT::0
-M::CORE_ADDR:push_dummy_code:CORE_ADDR sp, CORE_ADDR funaddr, int using_gcc, struct value **args, int nargs, struct type *value_type, CORE_ADDR *real_pc, CORE_ADDR *bp_addr, struct regcache *regcache:sp, funaddr, using_gcc, args, nargs, value_type, real_pc, bp_addr, regcache
+M::CORE_ADDR:push_dummy_code:CORE_ADDR sp, CORE_ADDR funaddr, struct value **args, int nargs, struct type *value_type, CORE_ADDR *real_pc, CORE_ADDR *bp_addr, struct regcache *regcache:sp, funaddr, args, nargs, value_type, real_pc, bp_addr, regcache
 
 m::void:print_registers_info:struct ui_file *file, struct frame_info *frame, int regnum, int all:file, frame, regnum, all::default_print_registers_info::0
 M::void:print_float_info:struct ui_file *file, struct frame_info *frame, const char *args:file, frame, args
index cf1c1d11af9d33d9f5b2bb05db11be4f53c6b570..bbbd6438b39777e1f85d491aac428fb5a86e742d 100644 (file)
@@ -1093,7 +1093,7 @@ hppa_hpux_find_dummy_bpaddr (CORE_ADDR addr)
 
 static CORE_ADDR
 hppa_hpux_push_dummy_code (struct gdbarch *gdbarch, CORE_ADDR sp,
-                          CORE_ADDR funcaddr, int using_gcc,
+                          CORE_ADDR funcaddr,
                           struct value **args, int nargs,
                           struct type *value_type,
                           CORE_ADDR *real_pc, CORE_ADDR *bp_addr,
index 21557964a63cee7cbdcc12a6de97bb305e9073a2..99d3cccd3c4e3959c9080a9262926726583a063d 100644 (file)
@@ -260,7 +260,7 @@ breakpoint_auto_delete_contents (void *arg)
 
 static CORE_ADDR
 generic_push_dummy_code (struct gdbarch *gdbarch,
-                        CORE_ADDR sp, CORE_ADDR funaddr, int using_gcc,
+                        CORE_ADDR sp, CORE_ADDR funaddr,
                         struct value **args, int nargs,
                         struct type *value_type,
                         CORE_ADDR *real_pc, CORE_ADDR *bp_addr,
@@ -300,18 +300,18 @@ generic_push_dummy_code (struct gdbarch *gdbarch,
 
 static CORE_ADDR
 push_dummy_code (struct gdbarch *gdbarch,
-                CORE_ADDR sp, CORE_ADDR funaddr, int using_gcc,
+                CORE_ADDR sp, CORE_ADDR funaddr,
                 struct value **args, int nargs,
                 struct type *value_type,
                 CORE_ADDR *real_pc, CORE_ADDR *bp_addr,
                 struct regcache *regcache)
 {
   if (gdbarch_push_dummy_code_p (gdbarch))
-    return gdbarch_push_dummy_code (gdbarch, sp, funaddr, using_gcc,
+    return gdbarch_push_dummy_code (gdbarch, sp, funaddr,
                                    args, nargs, value_type, real_pc, bp_addr,
                                    regcache);
   else    
-    return generic_push_dummy_code (gdbarch, sp, funaddr, using_gcc,
+    return generic_push_dummy_code (gdbarch, sp, funaddr,
                                    args, nargs, value_type, real_pc, bp_addr,
                                    regcache);
 }
@@ -347,7 +347,6 @@ call_function_by_hand (struct value *function, int nargs, struct value **args)
   struct inferior_status *inf_status;
   struct cleanup *inf_status_cleanup;
   CORE_ADDR funaddr;
-  int using_gcc;               /* Set to version of gcc in use, or zero if not gcc */
   CORE_ADDR real_pc;
   struct type *ftype = check_typedef (value_type (function));
   CORE_ADDR bp_addr;
@@ -455,12 +454,6 @@ call_function_by_hand (struct value *function, int nargs, struct value **args)
   funaddr = find_function_addr (function, &values_type);
   CHECK_TYPEDEF (values_type);
 
-  {
-    struct block *b = block_for_pc (funaddr);
-    /* If compiled without -g, assume GCC 2.  */
-    using_gcc = (b == NULL ? 2 : BLOCK_GCC_COMPILED (b));
-  }
-
   /* Are we returning a value using a structure return (passing a
      hidden argument pointing to storage) or a normal value return?
      There are two cases: language-mandated structure return and
@@ -482,7 +475,7 @@ call_function_by_hand (struct value *function, int nargs, struct value **args)
     }
   else
     {
-      struct_return = using_struct_return (values_type, using_gcc);
+      struct_return = using_struct_return (values_type);
       target_values_type = values_type;
     }
 
@@ -503,7 +496,7 @@ call_function_by_hand (struct value *function, int nargs, struct value **args)
       if (gdbarch_inner_than (current_gdbarch, 1, 2))
        {
          sp = push_dummy_code (current_gdbarch, sp, funaddr,
-                               using_gcc, args, nargs, target_values_type,
+                               args, nargs, target_values_type,
                                &real_pc, &bp_addr, get_current_regcache ());
          dummy_addr = sp;
        }
@@ -511,7 +504,7 @@ call_function_by_hand (struct value *function, int nargs, struct value **args)
        {
          dummy_addr = sp;
          sp = push_dummy_code (current_gdbarch, sp, funaddr,
-                               using_gcc, args, nargs, target_values_type,
+                               args, nargs, target_values_type,
                                &real_pc, &bp_addr, get_current_regcache ());
        }
       break;
index 4324bc27325620d092276d1743a3c3da3e109bbe..6f2838546d9714c32d8a02098bddee5ea798bffd 100644 (file)
@@ -378,7 +378,7 @@ sparc32_pseudo_register_write (struct gdbarch *gdbarch,
 
 static CORE_ADDR
 sparc32_push_dummy_code (struct gdbarch *gdbarch, CORE_ADDR sp,
-                        CORE_ADDR funcaddr, int using_gcc,
+                        CORE_ADDR funcaddr,
                         struct value **args, int nargs,
                         struct type *value_type,
                         CORE_ADDR *real_pc, CORE_ADDR *bp_addr,
@@ -387,7 +387,7 @@ sparc32_push_dummy_code (struct gdbarch *gdbarch, CORE_ADDR sp,
   *bp_addr = sp - 4;
   *real_pc = funcaddr;
 
-  if (using_struct_return (value_type, using_gcc))
+  if (using_struct_return (value_type))
     {
       gdb_byte buf[4];
 
index 525b1d57e09ea7e3aabf00388d8504360f79b461..448135ca9d03ec24350e336c4f85905607e483cd 100644 (file)
@@ -1805,7 +1805,7 @@ A structure or union return type is not supported by this architecture.\n\
 If you continue, the return value that you specified will be ignored.\n";
          return_value = NULL;
        }
-      else if (using_struct_return (return_type, 0))
+      else if (using_struct_return (return_type))
        {
          query_prefix = "\
 The location at which to store the function's return value is unknown.\n\
index c1fbb0e5ff2ea1310084fbc29d6c19e6a14fde54..c49ab1f7e503d1e8abe15674f08635c00f6731b8 100644 (file)
@@ -508,8 +508,6 @@ dump_symtab_1 (struct objfile *objfile, struct symtab *symtab,
                                SYMBOL_DEMANGLED_NAME (BLOCK_FUNCTION (b)));
                }
            }
-         if (BLOCK_GCC_COMPILED (b))
-           fprintf_filtered (outfile, ", compiled with gcc%d", BLOCK_GCC_COMPILED (b));
          fprintf_filtered (outfile, "\n");
          /* Now print each symbol in this block (in no particular order, if
             we're using a hashtable).  */
index 5f39bc8054b48dbeff42fa7576da6c810d26e700..656c5ead0e58c1d54b9c6fda6f325b32682e734d 100644 (file)
@@ -1709,11 +1709,10 @@ generic_use_struct_convention (int gcc_p, struct type *value_type)
 
 /* Return true if the function returning the specified type is using
    the convention of returning structures in memory (passing in the
-   address as a hidden first parameter).  GCC_P is nonzero if compiled
-   with GCC.  */
+   address as a hidden first parameter).  */
 
 int
-using_struct_return (struct type *value_type, int gcc_p)
+using_struct_return (struct type *value_type)
 {
   enum type_code code = TYPE_CODE (value_type);
 
index 37094d1fa0dddeb174f03610d20e0bc46f19173f..0824b5ea207ae7a5dcc1fcb5b5890db0ee3d1a40 100644 (file)
@@ -402,7 +402,7 @@ extern struct value *value_in (struct value *element, struct value *set);
 extern int value_bit_index (struct type *type, const gdb_byte *addr,
                            int index);
 
-extern int using_struct_return (struct type *value_type, int gcc_p);
+extern int using_struct_return (struct type *value_type);
 
 extern struct value *evaluate_expression (struct expression *exp);