This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [RFC] Don't allow setting register in non-innermost frame
- From: Jan Kratochvil <jan dot kratochvil at redhat dot com>
- To: Yao Qi <yao at codesourcery dot com>
- Cc: Tom Tromey <tromey at redhat dot com>, Doug Evans <dje at google dot com>, gdb-patches at sourceware dot org
- Date: Mon, 10 Sep 2012 21:43:19 +0200
- Subject: Re: [RFC] Don't allow setting register in non-innermost frame
- References: <1345170040-25959-1-git-send-email-yao@codesourcery.com> <CADPb22SGp-9TaoA3rNi_PJordCuv_bjwFQZiHvfjktHx3Y_krA@mail.gmail.com> <87hartpodt.fsf@fleche.redhat.com> <20120907164544.GA18234@host2.jankratochvil.net> <504D49DA.6070006@codesourcery.com> <20120910074639.GA26588@host2.jankratochvil.net>
On Mon, 10 Sep 2012 09:46:39 +0200, Jan Kratochvil wrote:
> I understand you are more concerned with MI but if I read correctly MI will
> answer it as 'y', unaware whether the query message gets propagated to your MI
> frontend so maybe you would like:
>
> if (query (_("Really assign to stored register in non-innermost frame? ")))
> warning (_("Assigning to register in non-innermost frame."));
> else
> error (_("Not confirmed."));
or to prevent double-warning in CLI mode:
if (!query (_("Really assign to stored register in non-innermost frame? ")))
error (_("Not confirmed."));
else if (ui_out_is_mi_like_p (uiout))
warning (_("Assigning to register in non-innermost frame."));
Thanks,
Jan