[PATCH] More Alpha multi-arch cleanup
Jason R Thorpe
thorpej@wasabisystems.com
Wed Apr 24 23:21:00 GMT 2002
Puts FUNCTION_START_OFFSET under control of gdbarch, and removes
the deprecated BREAKPOINT in favor of BREAKPOINT_FROM_PC.
Committed per the multi-arch rule.
* alpha-tdep.c (alpha_breakpoint_from_pc): New function.
(alpha_gdbarch_init): Set gdbarch_breakpoint_from_pc to
alpha_breakpoint_from_pc. Set gdbarch_function_start_offset
to 0.
* config/alpha/tm-alpha.h: Remove forward decls of struct type
and struct value.
(FUNCTION_START_OFFSET): Remove.
(BREAKPOINT): Ditto.
--
-- Jason R. Thorpe <thorpej@wasabisystems.com>
-------------- next part --------------
Index: alpha-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/alpha-tdep.c,v
retrieving revision 1.28
diff -u -r1.28 alpha-tdep.c
--- alpha-tdep.c 25 Apr 2002 05:06:08 -0000 1.28
+++ alpha-tdep.c 25 Apr 2002 06:17:18 -0000
@@ -59,6 +59,8 @@
alpha_extract_struct_value_address;
static gdbarch_use_struct_convention_ftype alpha_use_struct_convention;
+static gdbarch_breakpoint_from_pc_ftype alpha_breakpoint_from_pc;
+
static gdbarch_frame_args_address_ftype alpha_frame_args_address;
static gdbarch_frame_locals_address_ftype alpha_frame_locals_address;
@@ -1496,6 +1498,16 @@
error ("Cannot store value in floating point register");
}
+static const unsigned char *
+alpha_breakpoint_from_pc (CORE_ADDR *pcptr, int *lenptr)
+{
+ static const unsigned char alpha_breakpoint[] =
+ { 0x80, 0, 0, 0 }; /* call_pal bpt */
+
+ *lenptr = sizeof(alpha_breakpoint);
+ return (alpha_breakpoint);
+}
+
/* Given a return value in `regbuf' with a type `valtype',
extract and copy its value into `valbuf'. */
@@ -2061,7 +2073,10 @@
set_gdbarch_coerce_float_to_double (gdbarch,
standard_coerce_float_to_double);
+ set_gdbarch_breakpoint_from_pc (gdbarch, alpha_breakpoint_from_pc);
set_gdbarch_decr_pc_after_break (gdbarch, 4);
+
+ set_gdbarch_function_start_offset (gdbarch, 0);
set_gdbarch_frame_args_skip (gdbarch, 0);
/* Hook in ABI-specific overrides, if they have been registered. */
Index: config/alpha/tm-alpha.h
===================================================================
RCS file: /cvs/src/src/gdb/config/alpha/tm-alpha.h,v
retrieving revision 1.24
diff -u -r1.24 tm-alpha.h
--- config/alpha/tm-alpha.h 25 Apr 2002 05:06:08 -0000 1.24
+++ config/alpha/tm-alpha.h 25 Apr 2002 06:17:19 -0000
@@ -31,21 +31,12 @@
#include "coff/symconst.h"
struct frame_info;
-struct type;
-struct value;
struct symbol;
/* Number of traps that happen between exec'ing the shell
to run an inferior, and when we finally get to
the inferior code. This is 2 on most implementations. */
#define START_INFERIOR_TRAPS_EXPECTED 3
-
-/* Offset from address of function to start of its code.
- Zero on most machines. */
-
-#define FUNCTION_START_OFFSET 0
-
-#define BREAKPOINT {0x80, 0, 0, 0} /* call_pal bpt */
/* Special symbol found in blocks associated with routines. We can hang
alpha_extra_func_info_t's off of this. */
More information about the Gdb-patches
mailing list