This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [BUG] BINOP_DIV and ptyp command
I would prefer that we not make type promotion more wrong, so I would
rather not apply your patch until the standard promotions do something
more sensible.
On Tue, Jan 29, 2008 at 08:20:07AM -0800, Doug Evans wrote:
> For completeness' sake, while my pedantic bit is flipped,
> One premise of this particular comment is that it assumes one
> particular definition of EVAL_AVOID_SIDE_EFFECTS. If E_A_S_E is
> indeed intended to mean to avoid calling error() (which isn't
> unreasonable), then that changes the premise.
>
> To make progress here (and those who have worked on gdb longer
> probably know the complete definition of E_A_S_E already - they take
> it as a given - I can't) it would be nice to at least have a full and
> correct definition of EVAL_AVOID_SIDE_EFFECTS at its definition site.
Either there's no complete definition of the type you want, or it was
lost before I began working on GDB. We need to set one.
EVAL_AVOID_SIDE_EFFECTS is checked in many places, but only set in a
few: evaluate_type, to check for user defined operators in
short-circuit expressions, and sizeof. evaluate_type is only used for
whatis (ptype), maint print type, and the error case for varobjs.
I think that avoiding value-dependent calls to error, when practical,
is more useful in all of those cases. One way to do it would be to
pass noside further down; but that changes all call sites.
--
Daniel Jacobowitz
CodeSourcery