GDB: S12Z: Add assertion
authorJohn Darrington <john@darrington.wattle.id.au>
Thu, 8 Nov 2018 16:51:22 +0000 (17:51 +0100)
committerJohn Darrington <john@darrington.wattle.id.au>
Tue, 20 Nov 2018 06:36:24 +0000 (07:36 +0100)
gdb/ChangeLog:

* s12z-tdep.c (s12z_frame_cache): Add an assertion.

gdb/ChangeLog
gdb/s12z-tdep.c

index f2b6f56..252ef58 100644 (file)
@@ -1,3 +1,7 @@
+2018-11-19  John Darrington <john@darrington.wattle.id.au>
+
+       *s12z-tdep.c (s12z_frame_cache): Add an assertion.
+
 2018-11-19  Simon Marchi  <simon.marchi@polymtl.ca>
 
        * infrun.c (displaced_step_inferior_state) <next>: Remove.
index 79f5772..bd0bd7c 100644 (file)
@@ -320,6 +320,7 @@ s12z_frame_cache (struct frame_info *this_frame, void **prologue_cache)
     }
   else
     {
+      gdb_assert (this_sp == this_sp_for_id);
       /* The stack pointer of the prev frame is frame_size greater
          than the stack pointer of this frame plus one address
          size (caused by the JSR or BSR).  */