This is the mail archive of the binutils@sourceware.org mailing list for the binutils 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: --build-id use of elf_obj_tdata


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


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