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: [3/3] [PATCH] value_optimized_out and value_fetch_lazy


On 19/06/2013 4:50 PM, Pedro Alves wrote:
> On 06/10/2013 11:24 AM, Andrew Burgess wrote:
>
>> I ran into an issue with gdb that appears to be caused by an incorrect
>> use of value_optimized_out.
>>
> 
> I'm finding the patch a bit hard to read though.  Could you
> split it up?  

This tiny patch notices that when we mark a value as optimized out
we can also mark the value as no longer lazy.
This patch is not required, but felt like a good thing to me, not
sure if everyone will agree though.

Should I apply?

Thanks
Andrew




gdb/ChangeLog

2013-07-01  Andrew Burgess  <aburgess@broadcom.com>

	* value.c (set_value_optimized_out): A value that is optimized out
	is no longer lazy.

diff --git a/gdb/value.c b/gdb/value.c
index 8547590..61fd4a1 100644
--- a/gdb/value.c
+++ b/gdb/value.c
@@ -1061,6 +1061,8 @@ void
 set_value_optimized_out (struct value *value, int val)
 {
   value->optimized_out = val;
+  if (val)
+    set_value_lazy (value, 0);
 }
 
 int



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