aboutsummaryrefslogtreecommitdiff
path: root/gdb/arm-tdep.c
diff options
context:
space:
mode:
authorRichard Earnshaw <richard.earnshaw@arm.com>2002-02-01 13:39:43 +0000
committerRichard Earnshaw <richard.earnshaw@arm.com>2002-02-01 13:39:43 +0000
commit0defa245fc33ed9585f8f2f0f898f26e31801ee0 (patch)
tree343ec0c5b4aae480c54a5bbbeb46d2965377953f /gdb/arm-tdep.c
parent6c571f008369d830772b1edd2a55d978580c4163 (diff)
downloadfsf-binutils-gdb-0defa245fc33ed9585f8f2f0f898f26e31801ee0.zip
fsf-binutils-gdb-0defa245fc33ed9585f8f2f0f898f26e31801ee0.tar.gz
fsf-binutils-gdb-0defa245fc33ed9585f8f2f0f898f26e31801ee0.tar.bz2
* arm-tdep.c (arm_frameless_function_invocation): Add some comments.
(arm_frame_args_address, arm_frame_locals_address): New functions. (arm_frame_num_args): New function. * config/tm-arm.h (FRAME_ARGS_ADDRESS): Call arm_frame_args_address. (FRAME_LOCALS_ADDRESS): Call arm_frame_locals_address. (FRMA_NUM_ARGS): Call arm_frame_num_args.
Diffstat (limited to 'gdb/arm-tdep.c')
-rw-r--r--gdb/arm-tdep.c38
1 files changed, 38 insertions, 0 deletions
diff --git a/gdb/arm-tdep.c b/gdb/arm-tdep.c
index 8fdb1e5..1539d0d 100644
--- a/gdb/arm-tdep.c
+++ b/gdb/arm-tdep.c
@@ -297,12 +297,28 @@ arm_saved_pc_after_call (struct frame_info *frame)
return ADDR_BITS_REMOVE (read_register (LR_REGNUM));
}
+/* Determine whether the function invocation represented by FI has a
+ frame on the stack associated with it. If it does return zero,
+ otherwise return 1. */
+
int
arm_frameless_function_invocation (struct frame_info *fi)
{
CORE_ADDR func_start, after_prologue;
int frameless;
+ /* Sometimes we have functions that do a little setup (like saving the
+ vN registers with the stmdb instruction, but DO NOT set up a frame.
+ The symbol table will report this as a prologue. However, it is
+ important not to try to parse these partial frames as frames, or we
+ will get really confused.
+
+ So I will demand 3 instructions between the start & end of the
+ prologue before I call it a real prologue, i.e. at least
+ mov ip, sp,
+ stmdb sp!, {}
+ sub sp, ip, #4. */
+
func_start = (get_pc_function_start ((fi)->pc) + FUNCTION_START_OFFSET);
after_prologue = SKIP_PROLOGUE (func_start);
@@ -314,6 +330,28 @@ arm_frameless_function_invocation (struct frame_info *fi)
return frameless;
}
+/* The address of the arguments in the frame. */
+CORE_ADDR
+arm_frame_args_address (struct frame_info *fi)
+{
+ return fi->frame;
+}
+
+/* The address of the local variables in the frame. */
+CORE_ADDR
+arm_frame_locals_address (struct frame_info *fi)
+{
+ return fi->frame;
+}
+
+/* The number of arguments being passed in the frame. */
+int
+arm_frame_num_args (struct frame_info *fi)
+{
+ /* We have no way of knowing. */
+ return -1;
+}
+
/* A typical Thumb prologue looks like this:
push {r7, lr}
add sp, sp, #-28