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: [PATCH] Eliminate -var-create error for optzd ptr to struct


On 4/4/2016 3:41 AM, Yao Qi wrote:
> Don Breazeal <donb@codesourcery.com> writes:
> 
>> Note that we if value_optimized_out throws an error we just assume
>> the value is not optimized out.  We let value_rtti_indirect_type
>> handle any errors, and don't try to duplicate its error handling.
> 
> I am wondering why does value_optimized_out have to throw an error?
> Can't we catch the error in value_optimized_out thrown by
> value_fetch_lazy?
> 
> I am not very sure on this idea, but I searched the archive, and didn't
> find anything say we can't do that.
> 
I looked briefly at all the call sites for value_optimized_out.  It
looks like if value_optimized_out were to just return 'false' when it
got a memory error, the result in most cases would be that a subsequent
memory read would throw an error.  It might be that this could prevent a
scenario similar to the -var-create error elsewhere in GDB, but there
wasn't anything obvious in my quick scan.

I'll change the patch accordingly and run the testsuite.
--Don


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