summaryrefslogtreecommitdiff
path: root/gdb/s390-tdep.c
diff options
context:
space:
mode:
authorJim Blandy <jimb@codesourcery.com>2001-11-09 18:58:14 +0000
committerJim Blandy <jimb@codesourcery.com>2001-11-09 18:58:14 +0000
commitfbb58d319175ea81b7c91c72c629fbceb00d6c2a (patch)
tree221048416ed8059a50b07e19a5be0b7231d7ae25 /gdb/s390-tdep.c
parentd6241b80b8c742cb1008306a701e71b842c0f1cb (diff)
downloadgdb-fbb58d319175ea81b7c91c72c629fbceb00d6c2a.tar.gz
* s390-nat.c: (s390_push_arguments): Write a back chain pointer
into the dummy frame, to help us get backtraces.
Diffstat (limited to 'gdb/s390-tdep.c')
-rw-r--r--gdb/s390-tdep.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/gdb/s390-tdep.c b/gdb/s390-tdep.c
index 97e65d9eee5..bbac85a183b 100644
--- a/gdb/s390-tdep.c
+++ b/gdb/s390-tdep.c
@@ -1263,7 +1263,16 @@ s390_push_arguments (int nargs, struct value **args, CORE_ADDR sp,
}
}
}
- if (!second_pass)
+ if (second_pass)
+ {
+ /* Write the back chain pointer into the first word of the
+ stack frame. This will help us get backtraces from
+ within functions called from GDB. */
+ write_memory_unsigned_integer (sp,
+ (TARGET_PTR_BIT / TARGET_CHAR_BIT),
+ read_fp ());
+ }
+ else
{
outgoing_args_space = outgoing_args_ptr;
/* Align to 16 bytes because because I like alignment &