Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Andreas Schwab <schwab@suse.de>
To: Joel Brobecker <brobecker@adacore.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [RFA] fix "ptype $pc" internal-error
Date: Fri, 04 Jan 2008 10:36:00 -0000	[thread overview]
Message-ID: <jek5mpc1yk.fsf@sykes.suse.de> (raw)
In-Reply-To: <20080104094316.GO2179@adacore.com> (Joel Brobecker's message of 	"Fri\, 4 Jan 2008 01\:43\:16 -0800")

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."


  reply	other threads:[~2008-01-04 10:36 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-01-04  9:43 Joel Brobecker
2008-01-04 10:36 ` Andreas Schwab [this message]
2008-01-04 10:50   ` Joel Brobecker
2008-01-29 17:47     ` Daniel Jacobowitz
2008-01-30 17:31       ` Mark Kettenis
2008-01-30 19:01       ` Joel Brobecker

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=jek5mpc1yk.fsf@sykes.suse.de \
    --to=schwab@suse.de \
    --cc=brobecker@adacore.com \
    --cc=gdb-patches@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox