This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [patchv3 7/8] Validate symbol file using build-id
- From: Pedro Alves <palves at redhat dot com>
- To: Jan Kratochvil <jan dot kratochvil at redhat dot com>
- Cc: gdb-patches at sourceware dot org, Aleksandar Ristovski <ARistovski at qnx dot com>
- Date: Fri, 28 Feb 2014 13:28:23 +0000
- Subject: Re: [patchv3 7/8] Validate symbol file using build-id
- Authentication-results: sourceware.org; auth=none
- References: <20140227213334 dot GH21121 at host2 dot jankratochvil dot net>
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