[PATCH] Fix readlink calls in GDB
Pierre Muller
pierre.muller@ics-cnrs.unistra.fr
Mon Nov 26 15:31:00 GMT 2012
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
More information about the Gdb-patches
mailing list