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 v2] Catch exception in value_rtti_indirect_type



On 15-01-23 07:33 AM, Pedro Alves wrote:
> On 12/05/2014 08:32 PM, Simon Marchi wrote:
> 
>> gdb/Changelog:
>>
>> 	* valops.c (value_rtti_indirect_type): Catch exception thrown by
>> 	value_ind.
>>
>> gdb/testsuite/ChangeLog
>>
>> 	* gdb.mi/mi-var-list-children-invalid-grandchild.c: New file.
>> 	* gdb.mi/mi-var-list-children-invalid-grandchild.exp: New file.
> 
> This is OK, thanks.
> 
>> +/* This testcase is part of GDB, the GNU debugger.
>> +
>> +   Copyright 2014 Free Software Foundation, Inc.
> 
> Recall to update this to "2014-2015" before pushing.
> 
>> +++ b/gdb/testsuite/gdb.mi/mi-var-list-children-invalid-grandchild.exp
>> @@ -0,0 +1,63 @@
>> +# Copyright 2014 Free Software Foundation, Inc.
>> +
> 
> Please update these to "2014-2015" before pushing.
> 
> Thanks,
> Pedro Alves

Hmm I am now getting a

/home/emaisin/src/binutils-gdb/gdb/valops.c:3625:13: error: âtargetâ may be used uninitialized in this function [-Werror=maybe-uninitialized]
   real_type = value_rtti_type (target, full, top, using_enc);

Logically, target can't be uninitialized there because of the exception throw. I would expect gcc to be
smarter about it, since throw_error is marked as noreturn. I can obviously fix it by assigning it to NULL
at declaration time, but is there a better way of getting rid of the error in these cases?


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