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: Tom Tromey <tromey at redhat dot com>
- Cc: Yao Qi <yao at codesourcery dot com>, Doug Evans <dje at google dot com>, gdb-patches at sourceware dot org
- Date: Tue, 11 Sep 2012 19:19:32 +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> <87ehm8a3gg.fsf@fleche.redhat.com>
On Tue, 11 Sep 2012 19:12:31 +0200, Tom Tromey wrote:
> I would rather not use this approach.
> My reason is that there is no obvious connection between
> TYPE_OBJFILE_OWNED and register-ness -- and it is the sort of invariant
> that is very difficult to ensure will remain true over time.
>
> If lval_register can't work, then another choice would be a new flag on
> struct value. This would be somewhat ugly but, I think, more robust.
I also did not like TYPE_OBJFILE_OWNED too much, I was thinking putting it
possibly to
evaluate_subexp_standard <BINOP_ASSIGN>
checking there LHS (left hand side) expression, not the LHS value.
Sure one can easily create an expression escaping such check but it should
catch the normal problematic case; if there is any.
Thanks,
Jan