aboutsummaryrefslogtreecommitdiff
path: root/gdb/s390-tdep.c
diff options
context:
space:
mode:
authorJim Blandy <jimb@codesourcery.com>2003-07-02 19:20:55 +0000
committerJim Blandy <jimb@codesourcery.com>2003-07-02 19:20:55 +0000
commita9dd42f1978d784aed979d58d51766af84c2f986 (patch)
tree5b54eca4ac5769aa219128c0ec207026b31588da /gdb/s390-tdep.c
parent4bc8c58814033f909eb73c7c9f4886236440a545 (diff)
downloadgdb-a9dd42f1978d784aed979d58d51766af84c2f986.zip
gdb-a9dd42f1978d784aed979d58d51766af84c2f986.tar.gz
gdb-a9dd42f1978d784aed979d58d51766af84c2f986.tar.bz2
* s390-tdep.c (struct frame_extra_info): new member:
'stack_bought_valid'. (s390_get_frame_info): Set fextra_info->stack_bought_valid if we initialize fextra_info->stack_bought. (s390_frameless_function_invocation): Don't trust the value of fextra_info_ptr->stack_bought unless fextra_info->stack_bought_valid is set.
Diffstat (limited to 'gdb/s390-tdep.c')
-rw-r--r--gdb/s390-tdep.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/gdb/s390-tdep.c b/gdb/s390-tdep.c
index 69463ab..0f3bd41 100644
--- a/gdb/s390-tdep.c
+++ b/gdb/s390-tdep.c
@@ -113,6 +113,7 @@ struct frame_extra_info
CORE_ADDR sig_fixed_saved_pc_valid;
CORE_ADDR sig_fixed_saved_pc;
CORE_ADDR frame_pointer_saved_pc; /* frame pointer needed for alloca */
+ CORE_ADDR stack_bought_valid;
CORE_ADDR stack_bought; /* amount we decrement the stack pointer by */
CORE_ADDR sigcontext;
};
@@ -1392,6 +1393,7 @@ s390_get_frame_info (CORE_ADDR start_pc,
if (frame_size != -1)
{
+ fextra_info->stack_bought_valid = 1;
fextra_info->stack_bought = frame_size;
}
@@ -1604,7 +1606,8 @@ s390_frameless_function_invocation (struct frame_info *fi)
s390_get_frame_info (s390_sniff_pc_function_start (get_frame_pc (fi), fi),
fextra_info_ptr, fi, 1);
}
- frameless = ((fextra_info_ptr->stack_bought == 0));
+ frameless = (fextra_info_ptr->stack_bought_valid
+ && fextra_info_ptr->stack_bought == 0);
}
return frameless;