aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJason Thorpe <thorpej@netbsd.org>2002-01-20 01:33:15 +0000
committerJason Thorpe <thorpej@netbsd.org>2002-01-20 01:33:15 +0000
commitf8453e34b90230680a57fbf4e981c0a714b2c292 (patch)
tree6e1a9e84e1aac56811c2fc149eb78be35b224992
parent52d9e613016c52e9be699717484e1e10028a77e6 (diff)
downloadfsf-binutils-gdb-f8453e34b90230680a57fbf4e981c0a714b2c292.zip
fsf-binutils-gdb-f8453e34b90230680a57fbf4e981c0a714b2c292.tar.gz
fsf-binutils-gdb-f8453e34b90230680a57fbf4e981c0a714b2c292.tar.bz2
* alpha-tdep.c (alpha_register_byte): New function.
(alpha_register_raw_size): Ditto. (alpha_register_virtual_size): Ditto. (alpha_skip_prologue_internal): Renamed from alpha_skip_prologue. (alpha_skip_prologue): New version that calls alpha_skip_prologue_internal. (alpha_in_lenient_prologue): Use alpha_skip_prologue_internal. * config/alpha/tm-alpha.h (SKIP_PROLOGUE): Remove second argument from alpha_skip_prologue. (REGISTER_BYTE): Use alpha_register_byte. (REGISTER_RAW_SIZE): Use alpha_register_raw_size. (REGISTER_VIRTUAL_SIZE): Use alpha_register_virtual_size. (FRAMELESS_FUNCTION_INVOCATION): Use generic_frameless_function_invocation_not. (FRAME_NUM_ARGS): Use frame_num_args_unknown. (COERCE_FLOAT_TO_DOUBLE): Use standard_coerce_float_to_double.
-rw-r--r--gdb/ChangeLog20
-rw-r--r--gdb/alpha-tdep.c30
-rw-r--r--gdb/config/alpha/tm-alpha.h29
3 files changed, 64 insertions, 15 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 45771d6..171d21e 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,23 @@
+2002-01-19 Jason Thorpe <thorpej@wasabisystems.com>
+
+ * alpha-tdep.c (alpha_register_byte): New function.
+ (alpha_register_raw_size): Ditto.
+ (alpha_register_virtual_size): Ditto.
+ (alpha_skip_prologue_internal): Renamed from
+ alpha_skip_prologue.
+ (alpha_skip_prologue): New version that calls
+ alpha_skip_prologue_internal.
+ (alpha_in_lenient_prologue): Use alpha_skip_prologue_internal.
+ * config/alpha/tm-alpha.h (SKIP_PROLOGUE): Remove
+ second argument from alpha_skip_prologue.
+ (REGISTER_BYTE): Use alpha_register_byte.
+ (REGISTER_RAW_SIZE): Use alpha_register_raw_size.
+ (REGISTER_VIRTUAL_SIZE): Use alpha_register_virtual_size.
+ (FRAMELESS_FUNCTION_INVOCATION): Use
+ generic_frameless_function_invocation_not.
+ (FRAME_NUM_ARGS): Use frame_num_args_unknown.
+ (COERCE_FLOAT_TO_DOUBLE): Use standard_coerce_float_to_double.
+
2002-01-19 Andrew Cagney <ac131313@redhat.com>
* config/mips/xm-news-mips.h: Delete file.
diff --git a/gdb/alpha-tdep.c b/gdb/alpha-tdep.c
index b894fbd..971dd63 100644
--- a/gdb/alpha-tdep.c
+++ b/gdb/alpha-tdep.c
@@ -322,6 +322,24 @@ alpha_register_virtual_type (int regno)
return ((regno >= FP0_REGNUM && regno < (FP0_REGNUM+31))
? builtin_type_double : builtin_type_long);
}
+
+int
+alpha_register_byte (int regno)
+{
+ return (regno * 8);
+}
+
+int
+alpha_register_raw_size (int regno)
+{
+ return 8;
+}
+
+int
+alpha_register_virtual_size (int regno)
+{
+ return 8;
+}
/* Guaranteed to set frame->saved_regs to some values (it never leaves it
@@ -1277,8 +1295,8 @@ alpha_pop_frame (void)
Currently we must not skip more on the alpha, but we might need the
lenient stuff some day. */
-CORE_ADDR
-alpha_skip_prologue (CORE_ADDR pc, int lenient)
+static CORE_ADDR
+alpha_skip_prologue_internal (CORE_ADDR pc, int lenient)
{
unsigned long inst;
int offset;
@@ -1350,6 +1368,12 @@ alpha_skip_prologue (CORE_ADDR pc, int lenient)
return pc + offset;
}
+CORE_ADDR
+alpha_skip_prologue (CORE_ADDR addr)
+{
+ return (alpha_skip_prologue_internal (addr, 0));
+}
+
#if 0
/* Is address PC in the prologue (loosely defined) for function at
STARTADDR? */
@@ -1357,7 +1381,7 @@ alpha_skip_prologue (CORE_ADDR pc, int lenient)
static int
alpha_in_lenient_prologue (CORE_ADDR startaddr, CORE_ADDR pc)
{
- CORE_ADDR end_prologue = alpha_skip_prologue (startaddr, 1);
+ CORE_ADDR end_prologue = alpha_skip_prologue_internal (startaddr, 1);
return pc >= startaddr && pc < end_prologue;
}
#endif
diff --git a/gdb/config/alpha/tm-alpha.h b/gdb/config/alpha/tm-alpha.h
index b869768..cc29e77 100644
--- a/gdb/config/alpha/tm-alpha.h
+++ b/gdb/config/alpha/tm-alpha.h
@@ -60,15 +60,15 @@ struct symbol;
/* Advance PC across any function entry prologue instructions
to reach some "real" code. */
-#define SKIP_PROLOGUE(pc) (alpha_skip_prologue(pc, 0))
-extern CORE_ADDR alpha_skip_prologue (CORE_ADDR addr, int lenient);
+#define SKIP_PROLOGUE(pc) alpha_skip_prologue((pc))
+extern CORE_ADDR alpha_skip_prologue (CORE_ADDR addr);
/* Immediately after a function call, return the saved pc.
Can't always go through the frames for this because on some machines
the new frame is not set up until the new function executes
some instructions. */
-#define SAVED_PC_AFTER_CALL(frame) alpha_saved_pc_after_call(frame)
+#define SAVED_PC_AFTER_CALL(frame) alpha_saved_pc_after_call(frame)
extern CORE_ADDR alpha_saved_pc_after_call (struct frame_info *);
/* Are we currently handling a signal ? */
@@ -144,17 +144,20 @@ extern int alpha_cannot_store_register (int);
/* Index within `registers' of the first byte of the space for
register N. */
-#define REGISTER_BYTE(N) ((N) * 8)
+#define REGISTER_BYTE(N) alpha_register_byte ((N))
+extern int alpha_register_byte (int);
/* Number of bytes of storage in the actual machine representation
for register N. On Alphas, all regs are 8 bytes. */
-#define REGISTER_RAW_SIZE(N) 8
+#define REGISTER_RAW_SIZE(N) alpha_register_raw_size ((N))
+extern int alpha_register_raw_size (int);
/* Number of bytes of storage in the program's representation
for register N. On Alphas, all regs are 8 bytes. */
-#define REGISTER_VIRTUAL_SIZE(N) 8
+#define REGISTER_VIRTUAL_SIZE(N) alpha_register_virtual_size ((N))
+extern int alpha_register_virtual_size (int);
/* Largest value REGISTER_RAW_SIZE can have. */
@@ -255,11 +258,12 @@ extern CORE_ADDR alpha_frame_chain (struct frame_info *);
by FI does not have a frame on the stack associated with it. */
/* We handle this differently for alpha, and maybe we should not */
-#define FRAMELESS_FUNCTION_INVOCATION(FI) (0)
+#define FRAMELESS_FUNCTION_INVOCATION(FI) \
+ generic_frameless_function_invocation_not ((FI))
/* Saved Pc. */
-#define FRAME_SAVED_PC(FRAME) (alpha_frame_saved_pc(FRAME))
+#define FRAME_SAVED_PC(FRAME) alpha_frame_saved_pc(FRAME)
extern CORE_ADDR alpha_frame_saved_pc (struct frame_info *);
/* The alpha has two different virtual pointers for arguments and locals.
@@ -286,7 +290,7 @@ extern CORE_ADDR alpha_frame_locals_address (struct frame_info *);
/* Return number of args passed to a frame.
Can return -1, meaning no way to tell. */
-#define FRAME_NUM_ARGS(fi) (-1)
+#define FRAME_NUM_ARGS(fi) frame_num_args_unknown ((fi))
/* Return number of bytes at start of arglist that are not really args. */
@@ -312,12 +316,12 @@ alpha_push_arguments (int, struct value **, CORE_ADDR, int, CORE_ADDR);
/* Push an empty stack frame, to record the current PC, etc. */
-#define PUSH_DUMMY_FRAME alpha_push_dummy_frame()
+#define PUSH_DUMMY_FRAME alpha_push_dummy_frame()
extern void alpha_push_dummy_frame (void);
/* Discard from the stack the innermost frame, restoring all registers. */
-#define POP_FRAME alpha_pop_frame()
+#define POP_FRAME alpha_pop_frame()
extern void alpha_pop_frame (void);
/* Alpha OSF/1 inhibits execution of code on the stack.
@@ -432,7 +436,8 @@ extern struct frame_info *setup_arbitrary_frame (int, CORE_ADDR *);
values are always passed in as doubles. Thus by setting this to 1, both
types of calls will work. */
-#define COERCE_FLOAT_TO_DOUBLE(formal, actual) (1)
+#define COERCE_FLOAT_TO_DOUBLE(formal, actual) \
+ standard_coerce_float_to_double ((formal), (actual))
/* Return TRUE if procedure descriptor PROC is a procedure descriptor
that refers to a dynamically generated sigtramp function.