From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 30286 invoked by alias); 9 Mar 2008 21:13:52 -0000 Received: (qmail 30273 invoked by uid 22791); 9 Mar 2008 21:13:51 -0000 X-Spam-Check-By: sourceware.org Received: from NaN.false.org (HELO nan.false.org) (208.75.86.248) by sourceware.org (qpsmtpd/0.31) with ESMTP; Sun, 09 Mar 2008 21:13:32 +0000 Received: from nan.false.org (localhost [127.0.0.1]) by nan.false.org (Postfix) with ESMTP id 612DD98118; Sun, 9 Mar 2008 21:13:30 +0000 (GMT) Received: from caradoc.them.org (22.svnf5.xdsl.nauticom.net [209.195.183.55]) by nan.false.org (Postfix) with ESMTP id 2B8B29801D; Sun, 9 Mar 2008 21:13:30 +0000 (GMT) Received: from drow by caradoc.them.org with local (Exim 4.69) (envelope-from ) id 1JYSpl-0006zK-Fi; Sun, 09 Mar 2008 17:13:29 -0400 Date: Sun, 09 Mar 2008 22:37:00 -0000 From: Daniel Jacobowitz To: Eli Zaretskii Cc: gdb@sources.redhat.com Subject: Re: info proc cmd Message-ID: <20080309211329.GB26503@caradoc.them.org> Mail-Followup-To: Eli Zaretskii , gdb@sources.redhat.com References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.17 (2007-12-11) X-IsSubscribed: yes Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2008-03/txt/msg00093.txt.bz2 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