aboutsummaryrefslogtreecommitdiff
path: root/gdb
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
commit01c464e928465c5928b15f2f47a655cc4d971572 (patch)
tree7326481a8ad42f9ec4d1974afd636a09788f8fb4 /gdb
parentb165b83891be5218d0f7b4c9e773c5fb4b6d8e6e (diff)
downloadgdb-01c464e928465c5928b15f2f47a655cc4d971572.zip
gdb-01c464e928465c5928b15f2f47a655cc4d971572.tar.gz
gdb-01c464e928465c5928b15f2f47a655cc4d971572.tar.bz2
* s390-nat.c: (s390_push_arguments): Write a back chain pointer
into the dummy frame, to help us get backtraces.
Diffstat (limited to 'gdb')
-rw-r--r--gdb/ChangeLog3
-rw-r--r--gdb/s390-tdep.c11
2 files changed, 13 insertions, 1 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 04d1f19..e6ad44b 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,8 @@
2001-11-09 Jim Blandy <jimb@redhat.com>
+ * s390-nat.c: (s390_push_arguments): Write a back chain pointer
+ into the dummy frame, to help us get backtraces.
+
* values.c (value_as_address): If VAL is a function or method,
just return its address; don't let COERCE_ARRAY convert its
address to a pointer, and then have unpack_long convert it back to
diff --git a/gdb/s390-tdep.c b/gdb/s390-tdep.c
index 97e65d9..bbac85a 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 &