--build-id use of elf_obj_tdata

Jan Kratochvil jan.kratochvil@redhat.com
Tue Feb 19 05:24:00 GMT 2013


On Tue, 19 Feb 2013 00:31:23 +0100, Alan Modra wrote:
> On Mon, Feb 18, 2013 at 04:18:58PM +0100, Jan Kratochvil wrote:
> > Just here I do not see why the new condition 'u.i.size == 0' is needed, even
> > if (improbably) the build-id section is empty GDB can handle such 0-length
> > struct elf_build_id fine.
> 
> See elf-bfd struct elf_build_id_info.  Zero u.i.size says you have the
> union u.o field valid.  (I use u.i.size aka u.o.zero instead of
> another field to specify the type of union.)  It's true that for gdb
> you are always operating on input bfds, so the test is redundant.
> Leaving the test as is, removing it, or replacing with an assert are
> all valid options.

Sorry I missed it.  OK with it although I prefer gdb_assert there as it cannot
happen now.


Thanks,
Jan



More information about the Binutils mailing list