This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: [patch] Use value_at_lazy() when dereferencing type int expressions
- From: Don Howard <dhoward at redhat dot com>
- To: <gdb-patches at sources dot redhat dot com>
- Date: Tue, 18 Jun 2002 15:32:46 -0700 (PDT)
- Subject: Re: [patch] Use value_at_lazy() when dereferencing type int expressions
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