diff options
author | Adam Fedor <fedor@gnu.org> | 2003-06-02 02:54:35 +0000 |
---|---|---|
committer | Adam Fedor <fedor@gnu.org> | 2003-06-02 02:54:35 +0000 |
commit | 143985b7f3c98d0644b2eef50059f14974fe9d64 (patch) | |
tree | f7be8c8c3c477f6a794f4f67885b1afe31c9418f /gdb/gdbarch.h | |
parent | 7c0b4a206672ef45cc3112a1c3f5269e35f44efa (diff) | |
download | gdb-143985b7f3c98d0644b2eef50059f14974fe9d64.zip gdb-143985b7f3c98d0644b2eef50059f14974fe9d64.tar.gz gdb-143985b7f3c98d0644b2eef50059f14974fe9d64.tar.bz2 |
* gdbarch.sh (function_list): Add FETCH_POINTER_ARGUMENT.
* gdbarch.[ch]: Regenerate.
* hppa-tdep.c (hppa_fetch_pointer_argument): New function.
(hppa_gdbarch_init): Set it in the gdbarch vector.
* i386-tdep.c (i386_fetch_pointer_argument): New
(i386_gdbarch_init): Set it into gdbarch.
* rs6000-tdep.c (rs6000_fetch_pointer_argument): New.
(rs6000_gdbarch_init): Set it in gdbarch.
* sparc-tdep.c (sparc_fetch_pointer_argument): New
(sparc_gdbarch_init): Set it in gdbarch.
Diffstat (limited to 'gdb/gdbarch.h')
-rw-r--r-- | gdb/gdbarch.h | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/gdb/gdbarch.h b/gdb/gdbarch.h index 6a822f3..9678f4f 100644 --- a/gdb/gdbarch.h +++ b/gdb/gdbarch.h @@ -2940,6 +2940,43 @@ typedef int (gdbarch_register_reggroup_p_ftype) (struct gdbarch *gdbarch, int re extern int gdbarch_register_reggroup_p (struct gdbarch *gdbarch, int regnum, struct reggroup *reggroup); extern void set_gdbarch_register_reggroup_p (struct gdbarch *gdbarch, gdbarch_register_reggroup_p_ftype *register_reggroup_p); +/* Fetch the pointer to the ith function argument. */ + +#if defined (FETCH_POINTER_ARGUMENT) +/* Legacy for systems yet to multi-arch FETCH_POINTER_ARGUMENT */ +#if !defined (FETCH_POINTER_ARGUMENT_P) +#define FETCH_POINTER_ARGUMENT_P() (1) +#endif +#endif + +/* Default predicate for non- multi-arch targets. */ +#if (!GDB_MULTI_ARCH) && !defined (FETCH_POINTER_ARGUMENT_P) +#define FETCH_POINTER_ARGUMENT_P() (0) +#endif + +extern int gdbarch_fetch_pointer_argument_p (struct gdbarch *gdbarch); +#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (FETCH_POINTER_ARGUMENT_P) +#error "Non multi-arch definition of FETCH_POINTER_ARGUMENT" +#endif +#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (FETCH_POINTER_ARGUMENT_P) +#define FETCH_POINTER_ARGUMENT_P() (gdbarch_fetch_pointer_argument_p (current_gdbarch)) +#endif + +/* Default (function) for non- multi-arch platforms. */ +#if (!GDB_MULTI_ARCH) && !defined (FETCH_POINTER_ARGUMENT) +#define FETCH_POINTER_ARGUMENT(frame, argi, type) (internal_error (__FILE__, __LINE__, "FETCH_POINTER_ARGUMENT"), 0) +#endif + +typedef CORE_ADDR (gdbarch_fetch_pointer_argument_ftype) (struct frame_info *frame, int argi, struct type *type); +extern CORE_ADDR gdbarch_fetch_pointer_argument (struct gdbarch *gdbarch, struct frame_info *frame, int argi, struct type *type); +extern void set_gdbarch_fetch_pointer_argument (struct gdbarch *gdbarch, gdbarch_fetch_pointer_argument_ftype *fetch_pointer_argument); +#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (FETCH_POINTER_ARGUMENT) +#error "Non multi-arch definition of FETCH_POINTER_ARGUMENT" +#endif +#if !defined (FETCH_POINTER_ARGUMENT) +#define FETCH_POINTER_ARGUMENT(frame, argi, type) (gdbarch_fetch_pointer_argument (current_gdbarch, frame, argi, type)) +#endif + extern struct gdbarch_tdep *gdbarch_tdep (struct gdbarch *gdbarch); |