This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [RFA] corner case in value_from_contents_and_address
- From: Joel Brobecker <brobecker at adacore dot com>
- To: Jerome Guitton <guitton at adacore dot com>, Tom Tromey <tromey at redhat dot com>
- Cc: gdb-patches at sourceware dot org
- Date: Tue, 3 Feb 2009 08:53:34 -0800
- Subject: Re: [RFA] corner case in value_from_contents_and_address
- References: <20081127150102.GC3835@adacore.com>
> 2008-11-27 Jerome Guitton <guitton@adacore.com>
>
> * value.c (value_from_content_and_address): Always return
> a lval_memory value, even if address is null.
Approved.
Tom,
I assume you weren't taking advantage of this undocumented anomaly...
> Index: value.c
> ===================================================================
> RCS file: /cvs/src/src/gdb/value.c,v
> retrieving revision 1.72
> diff -u -p -r1.72 value.c
> --- value.c 26 Nov 2008 16:27:27 -0000 1.72
> +++ value.c 27 Nov 2008 15:00:31 -0000
> @@ -1704,8 +1704,7 @@ value_from_contents_and_address (struct
> else
> memcpy (value_contents_raw (v), valaddr, TYPE_LENGTH (type));
> VALUE_ADDRESS (v) = address;
> - if (address != 0)
> - VALUE_LVAL (v) = lval_memory;
> + VALUE_LVAL (v) = lval_memory;
> return v;
> }
>
--
Joel