[RFA] fix "ptype $pc" internal-error
Andreas Schwab
schwab@suse.de
Fri Jan 4 10:36:00 GMT 2008
Joel Brobecker <brobecker@adacore.com> writes:
> Index: eval.c
> ===================================================================
> --- eval.c (revision 65)
> +++ eval.c (revision 66)
> @@ -512,7 +512,15 @@ evaluate_subexp_standard (struct type *e
> name, strlen (name));
> if (regno == -1)
> error (_("Register $%s not available."), name);
> - if (noside == EVAL_AVOID_SIDE_EFFECTS)
> +
> + /* In EVAL_AVOID_SIDE_EFFECTS mode, we only need to return
> + a value with the appropriate register type. Unfortunately,
> + we don't have easy access to the type of user registers.
> + So for these registers, we fetch the register value regardless
> + of the evaluation mode. */
> + if (noside == EVAL_AVOID_SIDE_EFFECTS
> + && regno < gdbarch_num_regs (current_gdbarch)
> + + gdbarch_num_pseudo_regs (current_gdbarch))
Indentation is off here.
if (noside == EVAL_AVOID_SIDE_EFFECTS
&& regno < (gdbarch_num_regs (current_gdbarch)
+ gdbarch_num_pseudo_regs (current_gdbarch)))
Andreas.
--
Andreas Schwab, SuSE Labs, schwab@suse.de
SuSE Linux Products GmbH, MaxfeldstraÃe 5, 90409 Nürnberg, Germany
PGP key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."
More information about the Gdb-patches
mailing list