This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH 1/2] GDB: S12Z: Add assertion
- From: Kevin Buettner <kevinb at redhat dot com>
- To: gdb-patches at sourceware dot org
- Cc: John Darrington <john at darrington dot wattle dot id dot au>
- Date: Sat, 17 Nov 2018 14:59:28 -0700
- Subject: Re: [PATCH 1/2] GDB: S12Z: Add assertion
- References: <20181112091721.28040-1-john@darrington.wattle.id.au>
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