Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Don Howard <dhoward@redhat.com>
To: <gdb-patches@sources.redhat.com>
Subject: Re: [patch] Use value_at_lazy() when dereferencing type int expressions
Date: Tue, 18 Jun 2002 15:33:00 -0000	[thread overview]
Message-ID: <Pine.LNX.4.33.0206181530560.3839-100000@theotherone> (raw)
In-Reply-To: <Pine.LNX.4.33.0206181426170.3839-100000@theotherone>



I forgot to give credit to Jim Blandy for suggesting this solution.

2002-06-18  Don Howard  <dhoward@redhat.com>

	* valops.c (value_ind): Use value_at_lazy() when dereferencing
	type int expressions.  Thanks to Jim Blandy <jimb@redhat.com> for
	suggesting this solution.



On Tue, 18 Jun 2002, Don Howard wrote:

> 
> 
> The following allows gdb expressions like
> 
> set *YYYY = zzzz
> 
> to be evaluated without reading target memory at *YYYY.
> 
> No testsuite regressions on x86 linux.
> 
> 
> 2002-06-18  Don Howard  <dhoward@redhat.com>
> 
> 	* valops.c (value_ind): Use value_at_lazy() when dereferencing
> 	type int expressions.
> 
> Index: valops.c
> ===================================================================
> RCS file: /cvs/src/src/gdb/valops.c,v
> retrieving revision 1.60
> diff -p -u -w -r1.60 valops.c
> --- valops.c    14 Jun 2002 14:34:26 -0000      1.60
> +++ valops.c    18 Jun 2002 21:28:52 -0000
> @@ -961,7 +961,7 @@ value_ind (struct value *arg1)
>       to do.  "long long" variables are rare enough that
>       BUILTIN_TYPE_LONGEST would seem to be a mistake.  */
>    if (TYPE_CODE (base_type) == TYPE_CODE_INT)
> -    return value_at (builtin_type_int,
> +    return value_at_lazy (builtin_type_int,
>                      (CORE_ADDR) value_as_long (arg1),
>                      VALUE_BFD_SECTION (arg1));
>    else if (TYPE_CODE (base_type) == TYPE_CODE_PTR)
> 
> 

-- 
dhoward@redhat.com
gdb engineering



  reply	other threads:[~2002-06-18 22:33 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-06-18 14:38 Don Howard
2002-06-18 15:33 ` Don Howard [this message]
2002-06-18 16:16 ` Andrew Cagney
2002-06-18 16:41   ` Don Howard

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=Pine.LNX.4.33.0206181530560.3839-100000@theotherone \
    --to=dhoward@redhat.com \
    --cc=gdb-patches@sources.redhat.com \
    /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