This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [RFA] corner case in value_from_contents_and_address


> 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]