This is the mail archive of the gdb@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: info proc cmd


On Sat, Mar 08, 2008 at 06:55:22PM +0200, Eli Zaretskii wrote:
> There seems to be a bug in "info proc".  The command line of the
> process is produced like this (in linux-nat.c):

Another bug in it; it accepts things which are neither pids nor
keywords.  I thought at first you meant "info proc cmd" literally,
so I tried it, and it behaved just like info proc :-)

> This bug is easy enough to fix, but I wonder whether some older
> versions of Linux did use the one-string format, in which case fixing
> this to assume a set of null-terminated arguments would break those
> old systems.
> 
> Does anyone has further insight into the history of this?  Should I
> just go ahead and fix the code?

I think you can go ahead and fix it; it's been NUL separated for as
long as I can remember.  The kernel actually reads memory from the
child to display this, and the memory is where the initial argv
strings were placed; there won't be any spaces unless the app put them
there with setproctitle.

-- 
Daniel Jacobowitz
CodeSourcery


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