diff options
author | Jim Blandy <jimb@codesourcery.com> | 2001-07-10 21:24:48 +0000 |
---|---|---|
committer | Jim Blandy <jimb@codesourcery.com> | 2001-07-10 21:24:48 +0000 |
commit | 75af7f6801beb09d1c2726a1c80b92ef92ee2fce (patch) | |
tree | af5b534d8b2d6132fa3a5d20412706372bd4930b /gdb/gdbarch.h | |
parent | ef166cf46a1b37daf20f3470f1478b9c1e2ddbc6 (diff) | |
download | gdb-75af7f6801beb09d1c2726a1c80b92ef92ee2fce.zip gdb-75af7f6801beb09d1c2726a1c80b92ef92ee2fce.tar.gz gdb-75af7f6801beb09d1c2726a1c80b92ef92ee2fce.tar.bz2 |
Clean up the D10V port so that GDB and the target program no
longer disagree on how big pointers are.
* findvar.c (value_from_register): Remove special case code for D10V.
* printcmd.c (print_frame_args): Same.
* valops.c (value_at, value_fetch_lazy): Same.
* values.c (unpack_long): Same.
* gdbarch.sh: Changes to effect the following:
* gdbarch.h (GDB_TARGET_IS_D10V, D10V_MAKE_DADDR,
gdbarch_d10v_make_daddr_ftype, gdbarch_d10v_make_daddr,
set_gdbarch_d10v_make_daddr, D10V_MAKE_IADDR,
gdbarch_d10v_make_iaddr_ftype, gdbarch_d10v_make_iaddr,
set_gdbarch_d10v_make_iaddr, D10V_DADDR_P,
gdbarch_d10v_daddr_p_ftype, gdbarch_d10v_daddr_p,
set_gdbarch_d10v_daddr_p, D10V_IADDR_P,
gdbarch_d10v_iaddr_p_ftype, gdbarch_d10v_iaddr_p,
set_gdbarch_d10v_iaddr_p, D10V_CONVERT_DADDR_TO_RAW,
gdbarch_d10v_convert_daddr_to_raw_ftype,
gdbarch_d10v_convert_daddr_to_raw,
set_gdbarch_d10v_convert_daddr_to_raw, D10V_CONVERT_IADDR_TO_RAW,
gdbarch_d10v_convert_iaddr_to_raw_ftype,
gdbarch_d10v_convert_iaddr_to_raw,
set_gdbarch_d10v_convert_iaddr_to_raw): Delete declarations.
* gdbarch.c: Delete the corresponding definitions.
(struct gdbarch): Delete members d10v_make_daddr,
d10v_make_iaddr, d10v_daddr_p, d10v_iaddr_p,
d10v_convert_daddr_to_raw, and d10v_convert_iaddr_to_raw.
(startup_gdbarch): Remove initializers for the above.
(verify_gdbarch, gdbarch_dump): Don't verify or dump them any
more.
* d10v-tdep.c (d10v_register_virtual_type): Rather that
claiming the stack pointer and PC are 32 bits long (which they
aren't), say that the stack pointer is an int16_t, and the
program counter is a function pointer. This allows the rest
of GDB to make the appropriate conversions between the code
pointer format and real addresses.
(d10v_register_convertible, d10v_register_convert_to_virtual,
d10v_register_convert_to_raw): Delete function; no registers
are convertible now, so we use
generic_register_convertible_not instead.
(d10v_address_to_pointer, d10v_pointer_to_address): New gdbarch
methods.
(d10v_push_arguments, d10v_extract_return_value): Remove special
cases for code and data pointers.
(d10v_gdbarch_init): Set gdbarch_ptr_bit to 16, so that GDB and
the target agree on how large pointers are. Say that addresses
are 32 bits long. Register the address_to_pointer and
pointer_to_address conversion functions. Since no registers are
convertible now, register generic_register_convertible_not as the
gdbarch_register_convertible method instead of
d10v_register_convertible. Remove registrations for
d10v_register_convert_to_virtual,
d10v_register_convert_to_raw, gdbarch_d10v_make_daddr,
gdbarch_d10v_make_iaddr, gdbarch_d10v_daddr_p,
gdbarch_d10v_iaddr_p, gdbarch_d10v_convert_daddr_to_raw, and
gdbarch_d10v_convert_iaddr_to_raw.
Diffstat (limited to 'gdb/gdbarch.h')
-rw-r--r-- | gdb/gdbarch.h | 110 |
1 files changed, 0 insertions, 110 deletions
diff --git a/gdb/gdbarch.h b/gdb/gdbarch.h index 0ace44b..287ec83 100644 --- a/gdb/gdbarch.h +++ b/gdb/gdbarch.h @@ -1293,110 +1293,6 @@ extern void set_gdbarch_pop_frame (struct gdbarch *gdbarch, gdbarch_pop_frame_ft #endif #endif -/* I wish that these would just go away.... */ - -/* Default (function) for non- multi-arch platforms. */ -#if (!GDB_MULTI_ARCH) && !defined (D10V_MAKE_DADDR) -#define D10V_MAKE_DADDR(x) (internal_error (__FILE__, __LINE__, "D10V_MAKE_DADDR"), 0) -#endif - -typedef CORE_ADDR (gdbarch_d10v_make_daddr_ftype) (CORE_ADDR x); -extern CORE_ADDR gdbarch_d10v_make_daddr (struct gdbarch *gdbarch, CORE_ADDR x); -extern void set_gdbarch_d10v_make_daddr (struct gdbarch *gdbarch, gdbarch_d10v_make_daddr_ftype *d10v_make_daddr); -#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (D10V_MAKE_DADDR) -#error "Non multi-arch definition of D10V_MAKE_DADDR" -#endif -#if GDB_MULTI_ARCH -#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (D10V_MAKE_DADDR) -#define D10V_MAKE_DADDR(x) (gdbarch_d10v_make_daddr (current_gdbarch, x)) -#endif -#endif - -/* Default (function) for non- multi-arch platforms. */ -#if (!GDB_MULTI_ARCH) && !defined (D10V_MAKE_IADDR) -#define D10V_MAKE_IADDR(x) (internal_error (__FILE__, __LINE__, "D10V_MAKE_IADDR"), 0) -#endif - -typedef CORE_ADDR (gdbarch_d10v_make_iaddr_ftype) (CORE_ADDR x); -extern CORE_ADDR gdbarch_d10v_make_iaddr (struct gdbarch *gdbarch, CORE_ADDR x); -extern void set_gdbarch_d10v_make_iaddr (struct gdbarch *gdbarch, gdbarch_d10v_make_iaddr_ftype *d10v_make_iaddr); -#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (D10V_MAKE_IADDR) -#error "Non multi-arch definition of D10V_MAKE_IADDR" -#endif -#if GDB_MULTI_ARCH -#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (D10V_MAKE_IADDR) -#define D10V_MAKE_IADDR(x) (gdbarch_d10v_make_iaddr (current_gdbarch, x)) -#endif -#endif - -/* Default (function) for non- multi-arch platforms. */ -#if (!GDB_MULTI_ARCH) && !defined (D10V_DADDR_P) -#define D10V_DADDR_P(x) (internal_error (__FILE__, __LINE__, "D10V_DADDR_P"), 0) -#endif - -typedef int (gdbarch_d10v_daddr_p_ftype) (CORE_ADDR x); -extern int gdbarch_d10v_daddr_p (struct gdbarch *gdbarch, CORE_ADDR x); -extern void set_gdbarch_d10v_daddr_p (struct gdbarch *gdbarch, gdbarch_d10v_daddr_p_ftype *d10v_daddr_p); -#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (D10V_DADDR_P) -#error "Non multi-arch definition of D10V_DADDR_P" -#endif -#if GDB_MULTI_ARCH -#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (D10V_DADDR_P) -#define D10V_DADDR_P(x) (gdbarch_d10v_daddr_p (current_gdbarch, x)) -#endif -#endif - -/* Default (function) for non- multi-arch platforms. */ -#if (!GDB_MULTI_ARCH) && !defined (D10V_IADDR_P) -#define D10V_IADDR_P(x) (internal_error (__FILE__, __LINE__, "D10V_IADDR_P"), 0) -#endif - -typedef int (gdbarch_d10v_iaddr_p_ftype) (CORE_ADDR x); -extern int gdbarch_d10v_iaddr_p (struct gdbarch *gdbarch, CORE_ADDR x); -extern void set_gdbarch_d10v_iaddr_p (struct gdbarch *gdbarch, gdbarch_d10v_iaddr_p_ftype *d10v_iaddr_p); -#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (D10V_IADDR_P) -#error "Non multi-arch definition of D10V_IADDR_P" -#endif -#if GDB_MULTI_ARCH -#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (D10V_IADDR_P) -#define D10V_IADDR_P(x) (gdbarch_d10v_iaddr_p (current_gdbarch, x)) -#endif -#endif - -/* Default (function) for non- multi-arch platforms. */ -#if (!GDB_MULTI_ARCH) && !defined (D10V_CONVERT_DADDR_TO_RAW) -#define D10V_CONVERT_DADDR_TO_RAW(x) (internal_error (__FILE__, __LINE__, "D10V_CONVERT_DADDR_TO_RAW"), 0) -#endif - -typedef CORE_ADDR (gdbarch_d10v_convert_daddr_to_raw_ftype) (CORE_ADDR x); -extern CORE_ADDR gdbarch_d10v_convert_daddr_to_raw (struct gdbarch *gdbarch, CORE_ADDR x); -extern void set_gdbarch_d10v_convert_daddr_to_raw (struct gdbarch *gdbarch, gdbarch_d10v_convert_daddr_to_raw_ftype *d10v_convert_daddr_to_raw); -#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (D10V_CONVERT_DADDR_TO_RAW) -#error "Non multi-arch definition of D10V_CONVERT_DADDR_TO_RAW" -#endif -#if GDB_MULTI_ARCH -#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (D10V_CONVERT_DADDR_TO_RAW) -#define D10V_CONVERT_DADDR_TO_RAW(x) (gdbarch_d10v_convert_daddr_to_raw (current_gdbarch, x)) -#endif -#endif - -/* Default (function) for non- multi-arch platforms. */ -#if (!GDB_MULTI_ARCH) && !defined (D10V_CONVERT_IADDR_TO_RAW) -#define D10V_CONVERT_IADDR_TO_RAW(x) (internal_error (__FILE__, __LINE__, "D10V_CONVERT_IADDR_TO_RAW"), 0) -#endif - -typedef CORE_ADDR (gdbarch_d10v_convert_iaddr_to_raw_ftype) (CORE_ADDR x); -extern CORE_ADDR gdbarch_d10v_convert_iaddr_to_raw (struct gdbarch *gdbarch, CORE_ADDR x); -extern void set_gdbarch_d10v_convert_iaddr_to_raw (struct gdbarch *gdbarch, gdbarch_d10v_convert_iaddr_to_raw_ftype *d10v_convert_iaddr_to_raw); -#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (D10V_CONVERT_IADDR_TO_RAW) -#error "Non multi-arch definition of D10V_CONVERT_IADDR_TO_RAW" -#endif -#if GDB_MULTI_ARCH -#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (D10V_CONVERT_IADDR_TO_RAW) -#define D10V_CONVERT_IADDR_TO_RAW(x) (gdbarch_d10v_convert_iaddr_to_raw (current_gdbarch, x)) -#endif -#endif - typedef void (gdbarch_store_struct_return_ftype) (CORE_ADDR addr, CORE_ADDR sp); extern void gdbarch_store_struct_return (struct gdbarch *gdbarch, CORE_ADDR addr, CORE_ADDR sp); extern void set_gdbarch_store_struct_return (struct gdbarch *gdbarch, gdbarch_store_struct_return_ftype *store_struct_return); @@ -2293,12 +2189,6 @@ extern disassemble_info tm_print_insn_info; -/* Explicit test for D10V architecture. - USE of these macro's is *STRONGLY* discouraged. */ - -#define GDB_TARGET_IS_D10V (TARGET_ARCHITECTURE->arch == bfd_arch_d10v) - - /* Set the dynamic target-system-dependent parameters (architecture, byte-order, ...) using information found in the BFD */ |