* s390-tdep.c (struct frame_extra_info): new member:
authorJim Blandy <jimb@codesourcery.com>
Wed, 2 Jul 2003 19:20:55 +0000 (19:20 +0000)
committerJim Blandy <jimb@codesourcery.com>
Wed, 2 Jul 2003 19:20:55 +0000 (19:20 +0000)
'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.

gdb/ChangeLog
gdb/s390-tdep.c

index 9d9b6b12ce8d2107de7db0d0047554314c935f09..60de94dd36fda49ff2025015eb66c042c2fbdce6 100644 (file)
@@ -1,5 +1,13 @@
 2003-07-02  Jim Blandy  <jimb@redhat.com>
 
+       * 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.
+
        New S390 prologue analyzer.
        * s390-tdep.c (struct prologue_value, enum pv_boolean): New types.
        (pv_set_to_unknown, pv_set_to_constant, pv_set_to_register,
index 69463ab83cae30340afe63696ee683dce27820db..0f3bd41f764a37a1b6441201bcf1b8cf91be8c1f 100644 (file)
@@ -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;