* gdbarch.sh (BELIEVE_PCC_PROMOTION): Replace by
authorUlrich Weigand <uweigand@de.ibm.com>
Tue, 19 Jun 2007 17:21:51 +0000 (17:21 +0000)
committerUlrich Weigand <uweigand@de.ibm.com>
Tue, 19 Jun 2007 17:21:51 +0000 (17:21 +0000)
gdbarch_believe_pcc_promotion.
* stabsread.c (define_symbol): Likewise.
Remove unnecessary definition.
* coffread.c (process_coff_symbol): Remove unnecessary code.
* gdbarch.c, gdbarch.h: Regenerate.

gdb/ChangeLog
gdb/coffread.c
gdb/gdbarch.c
gdb/gdbarch.h
gdb/gdbarch.sh
gdb/stabsread.c

index aa17e044ed8166292b1c48dec76fe78a3cca6299..cdca84cb147c780b4d0fdf24f35eb4eec56d6fc5 100644 (file)
@@ -1,3 +1,12 @@
+2007-06-19  Markus Deuling  <deuling@de.ibm.com>
+
+       * gdbarch.sh (BELIEVE_PCC_PROMOTION): Replace by
+       gdbarch_believe_pcc_promotion.
+       * stabsread.c (define_symbol): Likewise.
+       Remove unnecessary definition.
+       * coffread.c (process_coff_symbol): Remove unnecessary code.
+       * gdbarch.c, gdbarch.h: Regenerate.
+
 2007-06-19  Daniel Jacobowitz  <dan@codesourcery.com>
 
        * configure.ac: Do not use ${objdir}.
index dcd17d35faa069f805840a86b61acf60f702cf9c..a7a3765baa5da205807e4c9342da6b2c58bf9400 100644 (file)
@@ -1561,25 +1561,6 @@ process_coff_symbol (struct coff_symbol *cs,
        case C_ARG:
          SYMBOL_CLASS (sym) = LOC_ARG;
          add_symbol_to_list (sym, &local_symbols);
-#if !defined (BELIEVE_PCC_PROMOTION)
-         if (gdbarch_byte_order (current_gdbarch) == BFD_ENDIAN_BIG)
-           {
-             /* If PCC says a parameter is a short or a char,
-                aligned on an int boundary, realign it to the
-                "little end" of the int.  */
-             struct type *temptype;
-             temptype = lookup_fundamental_type (current_objfile,
-                                                 FT_INTEGER);
-             if (TYPE_LENGTH (SYMBOL_TYPE (sym)) < TYPE_LENGTH (temptype)
-                 && TYPE_CODE (SYMBOL_TYPE (sym)) == TYPE_CODE_INT
-                 && 0 == SYMBOL_VALUE (sym) % TYPE_LENGTH (temptype))
-               {
-                 SYMBOL_VALUE (sym) +=
-                   TYPE_LENGTH (temptype)
-                   - TYPE_LENGTH (SYMBOL_TYPE (sym));
-               }
-           }
-#endif
          break;
 
        case C_REGPARM:
@@ -1587,26 +1568,6 @@ process_coff_symbol (struct coff_symbol *cs,
          SYMBOL_VALUE (sym) = gdbarch_sdb_reg_to_regnum
                                 (current_gdbarch, cs->c_value);
          add_symbol_to_list (sym, &local_symbols);
-#if !defined (BELIEVE_PCC_PROMOTION)
-         /* FIXME:  This should retain the current type, since it's just
-            a register value.  gnu@adobe, 26Feb93 */
-         {
-           /* If PCC says a parameter is a short or a char,
-              it is really an int.  */
-           struct type *temptype;
-           temptype =
-             lookup_fundamental_type (current_objfile, FT_INTEGER);
-           if (TYPE_LENGTH (SYMBOL_TYPE (sym)) < TYPE_LENGTH (temptype)
-               && TYPE_CODE (SYMBOL_TYPE (sym)) == TYPE_CODE_INT)
-             {
-               SYMBOL_TYPE (sym) =
-                 (TYPE_UNSIGNED (SYMBOL_TYPE (sym))
-                  ? lookup_fundamental_type (current_objfile,
-                                             FT_UNSIGNED_INTEGER)
-                  : temptype);
-             }
-         }
-#endif
          break;
 
        case C_TPDEF:
index d7cac695db7c573c6be45e10b9749cb6343053de..854306baad0c9915f6d0f0722228f6707fe5d3bb 100644 (file)
@@ -673,11 +673,6 @@ gdbarch_dump (struct gdbarch *current_gdbarch, struct ui_file *file)
   fprintf_unfiltered (file,
                       "gdbarch_dump: adjust_breakpoint_address = <0x%lx>\n",
                       (long) current_gdbarch->adjust_breakpoint_address);
-#ifdef BELIEVE_PCC_PROMOTION
-  fprintf_unfiltered (file,
-                      "gdbarch_dump: BELIEVE_PCC_PROMOTION # %s\n",
-                      XSTRING (BELIEVE_PCC_PROMOTION));
-#endif
   fprintf_unfiltered (file,
                       "gdbarch_dump: believe_pcc_promotion = %s\n",
                       paddr_d (current_gdbarch->believe_pcc_promotion));
index 19fb2b3497c5ef6ee7fb8253739a541acd2a70d9..9235b111e27b16ab8d043ffb15a4002fb4e680ca 100644 (file)
@@ -320,12 +320,6 @@ extern void set_gdbarch_get_longjmp_target (struct gdbarch *gdbarch, gdbarch_get
 
 extern int gdbarch_believe_pcc_promotion (struct gdbarch *gdbarch);
 extern void set_gdbarch_believe_pcc_promotion (struct gdbarch *gdbarch, int believe_pcc_promotion);
-#if !defined (GDB_TM_FILE) && defined (BELIEVE_PCC_PROMOTION)
-#error "Non multi-arch definition of BELIEVE_PCC_PROMOTION"
-#endif
-#if !defined (BELIEVE_PCC_PROMOTION)
-#define BELIEVE_PCC_PROMOTION (gdbarch_believe_pcc_promotion (current_gdbarch))
-#endif
 
 typedef int (gdbarch_convert_register_p_ftype) (int regnum, struct type *type);
 extern int gdbarch_convert_register_p (struct gdbarch *gdbarch, int regnum, struct type *type);
index 2d14280779469ef2ab4c2e80aa995f436b13bf98..c81f6999744cb829deb3ed6ed04f6bd45760e524 100755 (executable)
@@ -481,7 +481,7 @@ f::int:cannot_store_register:int regnum:regnum::cannot_register_not::0
 # setjmp/longjmp support.
 F::int:get_longjmp_target:struct frame_info *frame, CORE_ADDR *pc:frame, pc
 #
-v:=:int:believe_pcc_promotion:::::::
+v::int:believe_pcc_promotion:::::::
 #
 f::int:convert_register_p:int regnum, struct type *type:regnum, type:0:generic_convert_register_p::0
 f::void:register_to_value:struct frame_info *frame, int regnum, struct type *type, gdb_byte *buf:frame, regnum, type, buf:0
index d4d5c3599fd5ba43fb9e7c30e1303b4c74112933..e1550878ee137ebf53453103c3c06f121a784320 100644 (file)
@@ -162,15 +162,6 @@ void stabsread_clear_cache (void);
 static const char vptr_name[] = "_vptr$";
 static const char vb_name[] = "_vb$";
 
-/* Define this as 1 if a pcc declaration of a char or short argument
-   gives the correct address.  Otherwise assume pcc gives the
-   address of the corresponding int, which is not the same on a
-   big-endian machine.  */
-
-#if !defined (BELIEVE_PCC_PROMOTION)
-#define BELIEVE_PCC_PROMOTION 0
-#endif
-
 static void
 invalid_cpp_abbrev_complaint (const char *arg1)
 {
@@ -971,10 +962,11 @@ define_symbol (CORE_ADDR valu, char *string, int desc, int type,
        }
 
       /* If it's gcc-compiled, if it says `short', believe it.  */
-      if (processing_gcc_compilation || BELIEVE_PCC_PROMOTION)
+      if (processing_gcc_compilation
+         || gdbarch_believe_pcc_promotion (current_gdbarch))
        break;
 
-      if (!BELIEVE_PCC_PROMOTION)
+      if (!gdbarch_believe_pcc_promotion (current_gdbarch))
        {
          /* This is the signed type which arguments get promoted to.  */
          static struct type *pcc_promotion_type;