summaryrefslogtreecommitdiff
path: root/gdb/arch-utils.c
diff options
context:
space:
mode:
authorAndrew Cagney <cagney@redhat.com>2001-08-11 00:59:29 +0000
committerAndrew Cagney <cagney@redhat.com>2001-08-11 00:59:29 +0000
commitfe882aae76da6e2f04a8a8de4ef3c7538a163b7d (patch)
tree551da6c28e62d90a6a7103b19915e80aaf9f3178 /gdb/arch-utils.c
parent150c7cbc061880c3386ca4bfecf9aac9eb5ab34a (diff)
downloadgdb-fe882aae76da6e2f04a8a8de4ef3c7538a163b7d.tar.gz
* target.h (TARGET_VIRTUAL_FRAME_POINTER): Delete, multi-arched.
* gdbarch.sh (TARGET_VIRTUAL_FRAME_POINTER): Add. * gdbarch.h, gdbarch.c: Regenerate. * arch-utils.h (legacy_virtual_frame_pointer): Declare. * arch-utils.c: Include "gdb_assert.h". (legacy_virtual_frame_pointer): Define. * Makefile.in (arch-utils.o): Depends on gdb_assert.h. * tracepoint.c (encode_actions): Make frame_reg an int. Make frame_offset a LONGEST. * ax-gdb.c (gen_frame_args_address): Ditto. (gen_frame_locals_address): Ditto. * mn10300-tdep.c (mn10300_gdbarch_init): Initialize virtual_frame_pointer. (mn10300_virtual_frame_pointer): Make static. Update parameter list to match function signature. * config/mn10300/tm-mn10300.h (TARGET_VIRTUAL_FRAME_POINTER): Delete.
Diffstat (limited to 'gdb/arch-utils.c')
-rw-r--r--gdb/arch-utils.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/gdb/arch-utils.c b/gdb/arch-utils.c
index 3da3c2713a6..93da7c86ca9 100644
--- a/gdb/arch-utils.c
+++ b/gdb/arch-utils.c
@@ -38,6 +38,7 @@
#include "annotate.h"
#endif
#include "regcache.h"
+#include "gdb_assert.h"
#include "version.h"
@@ -322,6 +323,19 @@ cannot_register_not (int regnum)
{
return 0;
}
+
+/* Legacy version of target_virtual_frame_pointer(). Assumes that
+ there is an FP_REGNUM and that it is the same, cooked or raw. */
+
+void
+legacy_virtual_frame_pointer (CORE_ADDR pc,
+ int *frame_regnum,
+ LONGEST *frame_offset)
+{
+ gdb_assert (FP_REGNUM >= 0);
+ *frame_regnum = FP_REGNUM;
+ *frame_offset = 0;
+}
/* Functions to manipulate the endianness of the target. */