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: [patchv3 7/8] Validate symbol file using build-id


On 02/27/2014 09:33 PM, Jan Kratochvil wrote:
> +static int
> +svr4_validate (const struct so_list *const so)
> +{
> +  gdb_assert (so != NULL);
> +
> +  /* There is no way to safely fetch build-id from running inferior without OS

What is "safely" referring to here?

> +     specific code.  The code from get_hex_build_id from gdbserver/linux-low.c
> +     could be used for GNU/Linux NAT target.  */

I'd rather not have comments that kind of suggest solib-svr4.c
is a Linux-specific file, when it is not.

I'd prefer just saying:

  +  /* Target doesn't support reporting the build ID.  */
> +  if (so->build_id == NULL)
> +    return 1;

Which covers even older GNU/Linux GDBservers and cores too.

-- 
Pedro Alves


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