This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH 1/2] GDB: S12Z: Add assertion


On Mon, 12 Nov 2018 10:17:20 +0100
John Darrington <john@darrington.wattle.id.au> wrote:

> ---
>  gdb/s12z-tdep.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/gdb/s12z-tdep.c b/gdb/s12z-tdep.c
> index 79f5772035..bd0bd7c001 100644
> --- a/gdb/s12z-tdep.c
> +++ b/gdb/s12z-tdep.c
> @@ -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).  */
> -- 

Could you please add a ChangeLog entry?

Also, on the same topic, what happened to the ChangeLog entries
for the initial commit / push of the s12z port?  (I don't see them
in the ChangeLog file.)

As for adding the assert, I suppose that you're just reminding the
reader of this earlier assignment? ...

  this_sp_for_id = this_sp;

(I didn't see anything which might change either this_sp or
this_sp_for_id along the code path leading to the assert.)

Kevin


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]