Re: [PATCH 3/3 v3] Implement remote_bfd_iovec_stat using vFile:fstat

Pedro Alves
2015-03-10T18:31:38Z

On 03/10/2015 03:51 PM, Gary Benson wrote:
>
> +
> +/* Unpack an fio_uint_t. */
> +
> +static unsigned int
> +remote_fileio_to_host_uint (fio_uint_t fnum)
> +{
> + gdb_byte *buf, *lim;
> + unsigned int num = 0;
> +
> + for (buf = (gdb_byte *) fnum, lim = buf + 4; buf < lim; buf++)
> + {
> + num <<= 8;
> + num |= *buf;
> + }

How about we use

extract_unsigned_integer ((gdb_byte *) fnum, 4, BFD_ENDIAN_BIG)

instead?

Otherwise looks good.

Thanks,
Pedro Alves