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: [RFC][PATCH][symtab] Warn about unresolved DW_AT_upper_bound/DW_AT_count


>>>>> "Tom" == Tom de Vries <tdevries@suse.de> writes:

Tom> this patch (without test-case for now) generates a warning if
Tom> DW_AT_upper_bound or DW_AT_count is defined, but can't be translated.  This
Tom> is triggered for current gcc in lto mode for vla test-cases.

Tom> F.i.:
Tom> ...
Tom> $ gcc gcc/testsuite/gcc.dg/guality/vla-1.c -g -O2 -flto \
Tom>     -DPREVENT_OPTIMIZATION -o ./vla-1.exe
Tom> $ ./gdb -batch -ex "set complaints 10" -ex "file ./vla-1.exe"
Tom> During symbol reading, Unresolved DW_AT_upper_bound - DIE at 0x337
Tom>   [in module vla-1.exe].
Tom> ...

Tom> Good idea?

I think so.

Tom> +	  if (attr_ub)
[...]
Tom> +	  if (attr_count)

The gdb style is to use a check against nullptr in these spots.

Tom


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