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: [PATCH] Fix readlink calls in GDB


  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



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