This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
RE: [PATCH] Fix readlink calls in GDB
- From: "Pierre Muller" <pierre dot muller at ics-cnrs dot unistra dot fr>
- To: "'Pedro Alves'" <palves at redhat dot com>
- Cc: <gdb-patches at sourceware dot org>, <rustyBSD at gmx dot fr>
- Date: Mon, 26 Nov 2012 16:31:29 +0100
- Subject: RE: [PATCH] Fix readlink calls in GDB
- References: <20121126142036.10142.97678.stgit@brno.lan> <004401cdcbe4$524136c0$f6c3a440$@muller@ics-cnrs.unistra.fr> <50B38790.5090206@redhat.com>
I don't see any code setting the terminal char to '\0'
in fbsd_pid_to_exec_file (fbsd-nat.c:40 rev 1.29)
nor in linux_child_pid_to_exec_file (linux-nat.c:4311 rev 1.261)
nor in nbsd_pid_to_exec_file (nbsd-nat.c:30 rev 1.10)...
Maybe I am missing something...
Pierre
> -----Message d'origine-----
> De : gdb-patches-owner@sourceware.org [mailto:gdb-patches-
> owner@sourceware.org] De la part de Pedro Alves
> Envoyà : lundi 26 novembre 2012 16:15
> Ã : Pierre Muller
> Cc : gdb-patches@sourceware.org; rustyBSD@gmx.fr
> Objet : Re: [PATCH] Fix readlink calls in GDB
>
> On 11/26/2012 02:42 PM, Pierre Muller wrote:
>
> > Just a question:
> > your change doesn't seem to add the terminating '\0'
> > in all the calls concerned, is this because it concerns specific
> > native files for operating systems that already append the '\0' at the
> end?
>
> No. That must be done in all operating systems. If you look at the code
> that surrounds the lines touched by the patch, you'll find the preexisting
> code doing that.
>
>
> --
> Pedro Alves