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] bfd: Use size_t for length argument totarget_read_memory function passed into bfd_elf_bfd_from_remote_memory


On Fri, 1 Jun 2012 20:24:14 +0200, Hans-Peter wrote:
> There's always bfd_size_type, though I haven't checked if it
> fits your needs.

Should be OK as long as it always matches the size_t definition in the
stddef.h that gcc ships. They're both typically unsigned long, but if
that is so, then bfd_size_type should have been typedef'd to size_t
anyway.
 
> This caused failure to build for simulators for (at least) the
> following targets:
> 
> cris-elf, frv-elf, h8300-elf, iq2000-elf, m32r-elf, mips-elf, and
> mn10300-elf.
> 
> They fail building either of sim/common/cgen-utils.c,
> sim/common/sim-command.c, sim/mips/interp.c, or
> sim/common/nrun.c all due to lack of size_t definition; a
> missing include of stddef.h before its use.
> 
> Should bfd.h include sysdep.h or what is missing?

An stddef.h include in bfd.h should fix this. That or I can fix my
patch to use bfd_size_type provided its size is always equal to
size_t, so that the include is not needed. Which way would be
preferable?

Regards,
Siddhesh


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