aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorAndrew Cagney <cagney@redhat.com>2004-04-30 14:40:56 +0000
committerAndrew Cagney <cagney@redhat.com>2004-04-30 14:40:56 +0000
commit8ee56bcfa3a6a15ffaf041c2e02dbebad38b1c7f (patch)
treeb1f250d5d29aac075ecd1721041231c82bc6d93d /gdb
parentd0d6a25bf3db9eea811699671a0f218e75586ca0 (diff)
downloadgdb-8ee56bcfa3a6a15ffaf041c2e02dbebad38b1c7f.zip
gdb-8ee56bcfa3a6a15ffaf041c2e02dbebad38b1c7f.tar.gz
gdb-8ee56bcfa3a6a15ffaf041c2e02dbebad38b1c7f.tar.bz2
2004-04-30 Andrew Cagney <cagney@redhat.com>
* gdbarch.sh (BELIEVE_PCC_PROMOTION_TYPE): Delete. * gdbarch.h, gdbarch.c: Re-generate. * stabsread.c (define_symbol): Delete BELIEVE_PCC_PROMOTION_TYPE code.
Diffstat (limited to 'gdb')
-rw-r--r--gdb/ChangeLog7
-rw-r--r--gdb/doc/ChangeLog5
-rw-r--r--gdb/doc/gdbint.texinfo6
-rw-r--r--gdb/gdbarch.c26
-rw-r--r--gdb/gdbarch.h9
-rwxr-xr-xgdb/gdbarch.sh1
-rw-r--r--gdb/stabsread.c62
7 files changed, 21 insertions, 95 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index cd7d3d4..b027761 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,12 @@
2004-04-30 Andrew Cagney <cagney@redhat.com>
+ * gdbarch.sh (BELIEVE_PCC_PROMOTION_TYPE): Delete.
+ * gdbarch.h, gdbarch.c: Re-generate.
+ * stabsread.c (define_symbol): Delete BELIEVE_PCC_PROMOTION_TYPE
+ code.
+
+2004-04-30 Andrew Cagney <cagney@redhat.com>
+
* gdb-events.sh (selected_thread_changed)
(selected_frame_level_changed, target_changed): Delete.
* gdb-events.h, gdb-events.c: Re-generate.
diff --git a/gdb/doc/ChangeLog b/gdb/doc/ChangeLog
index 66b9781..31b63d5 100644
--- a/gdb/doc/ChangeLog
+++ b/gdb/doc/ChangeLog
@@ -1,3 +1,8 @@
+2004-04-30 Andrew Cagney <cagney@redhat.com>
+
+ * gdbint.texinfo (Target Architecture Definition): Delete
+ documentation for BELIEVE_PCC_PROMOTION_TYPE, no longer defined.
+
2004-04-30 Orjan Friberg <orjanf@axis.com>
* observer.texi (GDB Observers): Correct spelling.
diff --git a/gdb/doc/gdbint.texinfo b/gdb/doc/gdbint.texinfo
index 2d17a34..72d415e 100644
--- a/gdb/doc/gdbint.texinfo
+++ b/gdb/doc/gdbint.texinfo
@@ -2926,12 +2926,6 @@ Define if the compiler promotes a @code{short} or @code{char}
parameter to an @code{int}, but still reports the parameter as its
original type, rather than the promoted type.
-@item BELIEVE_PCC_PROMOTION_TYPE
-@findex BELIEVE_PCC_PROMOTION_TYPE
-Define this if @value{GDBN} should believe the type of a @code{short}
-argument when compiled by @code{pcc}, but look within a full int space to get
-its value. Only defined for Sun-3 at present.
-
@item BITS_BIG_ENDIAN
@findex BITS_BIG_ENDIAN
Define this if the numbering of bits in the targets does @strong{not} match the
diff --git a/gdb/gdbarch.c b/gdb/gdbarch.c
index ff1d687..0f68e84 100644
--- a/gdb/gdbarch.c
+++ b/gdb/gdbarch.c
@@ -182,7 +182,6 @@ struct gdbarch
gdbarch_deprecated_pc_in_call_dummy_ftype *deprecated_pc_in_call_dummy;
gdbarch_deprecated_init_frame_pc_ftype *deprecated_init_frame_pc;
int believe_pcc_promotion;
- int believe_pcc_promotion_type;
gdbarch_deprecated_get_saved_register_ftype *deprecated_get_saved_register;
gdbarch_deprecated_register_convertible_ftype *deprecated_register_convertible;
gdbarch_deprecated_register_convert_to_virtual_ftype *deprecated_register_convert_to_virtual;
@@ -347,7 +346,6 @@ struct gdbarch startup_gdbarch =
deprecated_pc_in_call_dummy, /* deprecated_pc_in_call_dummy */
0, /* deprecated_init_frame_pc */
0, /* believe_pcc_promotion */
- 0, /* believe_pcc_promotion_type */
0, /* deprecated_get_saved_register */
0, /* deprecated_register_convertible */
0, /* deprecated_register_convert_to_virtual */
@@ -862,14 +860,6 @@ gdbarch_dump (struct gdbarch *current_gdbarch, struct ui_file *file)
"gdbarch_dump: BELIEVE_PCC_PROMOTION = %d\n",
BELIEVE_PCC_PROMOTION);
#endif
-#ifdef BELIEVE_PCC_PROMOTION_TYPE
- fprintf_unfiltered (file,
- "gdbarch_dump: BELIEVE_PCC_PROMOTION_TYPE # %s\n",
- XSTRING (BELIEVE_PCC_PROMOTION_TYPE));
- fprintf_unfiltered (file,
- "gdbarch_dump: BELIEVE_PCC_PROMOTION_TYPE = %d\n",
- BELIEVE_PCC_PROMOTION_TYPE);
-#endif
#ifdef BREAKPOINT_FROM_PC
fprintf_unfiltered (file,
"gdbarch_dump: %s # %s\n",
@@ -3790,22 +3780,6 @@ set_gdbarch_believe_pcc_promotion (struct gdbarch *gdbarch,
}
int
-gdbarch_believe_pcc_promotion_type (struct gdbarch *gdbarch)
-{
- gdb_assert (gdbarch != NULL);
- if (gdbarch_debug >= 2)
- fprintf_unfiltered (gdb_stdlog, "gdbarch_believe_pcc_promotion_type called\n");
- return gdbarch->believe_pcc_promotion_type;
-}
-
-void
-set_gdbarch_believe_pcc_promotion_type (struct gdbarch *gdbarch,
- int believe_pcc_promotion_type)
-{
- gdbarch->believe_pcc_promotion_type = believe_pcc_promotion_type;
-}
-
-int
gdbarch_deprecated_get_saved_register_p (struct gdbarch *gdbarch)
{
gdb_assert (gdbarch != NULL);
diff --git a/gdb/gdbarch.h b/gdb/gdbarch.h
index d881eb2..b7dfa8f 100644
--- a/gdb/gdbarch.h
+++ b/gdb/gdbarch.h
@@ -1137,15 +1137,6 @@ extern void set_gdbarch_believe_pcc_promotion (struct gdbarch *gdbarch, int beli
#define BELIEVE_PCC_PROMOTION (gdbarch_believe_pcc_promotion (current_gdbarch))
#endif
-extern int gdbarch_believe_pcc_promotion_type (struct gdbarch *gdbarch);
-extern void set_gdbarch_believe_pcc_promotion_type (struct gdbarch *gdbarch, int believe_pcc_promotion_type);
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (BELIEVE_PCC_PROMOTION_TYPE)
-#error "Non multi-arch definition of BELIEVE_PCC_PROMOTION_TYPE"
-#endif
-#if !defined (BELIEVE_PCC_PROMOTION_TYPE)
-#define BELIEVE_PCC_PROMOTION_TYPE (gdbarch_believe_pcc_promotion_type (current_gdbarch))
-#endif
-
#if defined (DEPRECATED_GET_SAVED_REGISTER)
/* Legacy for systems yet to multi-arch DEPRECATED_GET_SAVED_REGISTER */
#if !defined (DEPRECATED_GET_SAVED_REGISTER_P)
diff --git a/gdb/gdbarch.sh b/gdb/gdbarch.sh
index e46c64f..acb4b9b 100755
--- a/gdb/gdbarch.sh
+++ b/gdb/gdbarch.sh
@@ -564,7 +564,6 @@ F::DEPRECATED_PC_IN_CALL_DUMMY:int:deprecated_pc_in_call_dummy:CORE_ADDR pc, COR
F:2:DEPRECATED_INIT_FRAME_PC:CORE_ADDR:deprecated_init_frame_pc:int fromleaf, struct frame_info *prev:fromleaf, prev
#
v:2:BELIEVE_PCC_PROMOTION:int:believe_pcc_promotion:::::::
-v::BELIEVE_PCC_PROMOTION_TYPE:int:believe_pcc_promotion_type:::::::
F:2:DEPRECATED_GET_SAVED_REGISTER:void:deprecated_get_saved_register:char *raw_buffer, int *optimized, CORE_ADDR *addrp, struct frame_info *frame, int regnum, enum lval_type *lval:raw_buffer, optimized, addrp, frame, regnum, lval
#
# For register <-> value conversions, replaced by CONVERT_REGISTER_P et.al.
diff --git a/gdb/stabsread.c b/gdb/stabsread.c
index 07c6fe0..e91a980 100644
--- a/gdb/stabsread.c
+++ b/gdb/stabsread.c
@@ -978,61 +978,17 @@ define_symbol (CORE_ADDR valu, char *string, int desc, int type,
init_type (TYPE_CODE_INT, TARGET_INT_BIT / TARGET_CHAR_BIT,
TYPE_FLAG_UNSIGNED, "unsigned int", NULL);
- if (BELIEVE_PCC_PROMOTION_TYPE)
+ /* If PCC says a parameter is a short or a char, it is
+ really an int. */
+ if (TYPE_LENGTH (SYMBOL_TYPE (sym)) < TYPE_LENGTH (pcc_promotion_type)
+ && TYPE_CODE (SYMBOL_TYPE (sym)) == TYPE_CODE_INT)
{
- /* This is defined on machines (e.g. sparc) where we
- should believe the type of a PCC 'short' argument,
- but shouldn't believe the address (the address is the
- address of the corresponding int).
-
- My guess is that this correction, as opposed to
- changing the parameter to an 'int' (as done below,
- for PCC on most machines), is the right thing to do
- on all machines, but I don't want to risk breaking
- something that already works. On most PCC machines,
- the sparc problem doesn't come up because the calling
- function has to zero the top bytes (not knowing
- whether the called function wants an int or a short),
- so there is little practical difference between an
- int and a short (except perhaps what happens when the
- GDB user types "print short_arg = 0x10000;").
-
- Hacked for SunOS 4.1 by gnu@cygnus.com. In 4.1, the
- compiler actually produces the correct address (we
- don't need to fix it up). I made this code adapt so
- that it will offset the symbol if it was pointing at
- an int-aligned location and not otherwise. This way
- you can use the same gdb for 4.0.x and 4.1 systems.
-
- If the parameter is shorter than an int, and is
- integral (e.g. char, short, or unsigned equivalent),
- and is claimed to be passed on an integer boundary,
- don't believe it! Offset the parameter's address to
- the tail-end of that integer. */
-
- if (TYPE_LENGTH (SYMBOL_TYPE (sym)) < TYPE_LENGTH (pcc_promotion_type)
- && TYPE_CODE (SYMBOL_TYPE (sym)) == TYPE_CODE_INT
- && 0 == SYMBOL_VALUE (sym) % TYPE_LENGTH (pcc_promotion_type))
- {
- SYMBOL_VALUE (sym) += TYPE_LENGTH (pcc_promotion_type)
- - TYPE_LENGTH (SYMBOL_TYPE (sym));
- }
- break;
- }
- else
- {
- /* If PCC says a parameter is a short or a char,
- it is really an int. */
- if (TYPE_LENGTH (SYMBOL_TYPE (sym)) < TYPE_LENGTH (pcc_promotion_type)
- && TYPE_CODE (SYMBOL_TYPE (sym)) == TYPE_CODE_INT)
- {
- SYMBOL_TYPE (sym) =
- TYPE_UNSIGNED (SYMBOL_TYPE (sym))
- ? pcc_unsigned_promotion_type
- : pcc_promotion_type;
- }
- break;
+ SYMBOL_TYPE (sym) =
+ TYPE_UNSIGNED (SYMBOL_TYPE (sym))
+ ? pcc_unsigned_promotion_type
+ : pcc_promotion_type;
}
+ break;
}
case 'P':