From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2437 invoked by alias); 4 Jan 2008 15:41:37 -0000 Received: (qmail 2429 invoked by uid 22791); 4 Jan 2008 15:41:37 -0000 X-Spam-Check-By: sourceware.org Received: from rock.gnat.com (HELO rock.gnat.com) (205.232.38.15) by sourceware.org (qpsmtpd/0.31) with ESMTP; Fri, 04 Jan 2008 15:41:20 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id 85D142A967D; Fri, 4 Jan 2008 10:41:18 -0500 (EST) Received: from rock.gnat.com ([127.0.0.1]) by localhost (rock.gnat.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id DAYtLNiaZuOp; Fri, 4 Jan 2008 10:41:18 -0500 (EST) Received: from joel.gnat.com (localhost.localdomain [127.0.0.1]) by rock.gnat.com (Postfix) with ESMTP id B41F32A9616; Fri, 4 Jan 2008 10:41:17 -0500 (EST) Received: by joel.gnat.com (Postfix, from userid 1000) id 61A9DE7ACB; Fri, 4 Jan 2008 07:41:10 -0800 (PST) Date: Fri, 04 Jan 2008 15:41:00 -0000 From: Joel Brobecker To: Pedro Alves Cc: gdb-patches@sourceware.org Subject: Re: --pid and --core Message-ID: <20080104154110.GC5975@adacore.com> References: <477D122A.4060405@codesourcery.com> <20080104045813.GA28411@adacore.com> <477E23F9.7040904@codesourcery.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <477E23F9.7040904@codesourcery.com> User-Agent: Mutt/1.4.2.2i Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2008-01/txt/msg00057.txt.bz2 > There's a wrinkle. The 'int count' variable that was originally > used in the loop, was also used to do a last resort stack alignment in > captured_main's entry. > > #if defined (ALIGN_STACK_ON_STARTUP) > i = (int) &count & 0x03; > if (i != 0) > alloca (4 - i); > #endif > > ALIGN_STACK_ON_STARTUP isn't defined in any target/host > anymore, and if it was, count is in the middle of the stack frame > for long and nobody complained. We can safely > remove it. I agree. > 2008-01-03 Pedro Alves > > * main.c (captured_main): Remove 'count' varible and the > ALIGN_STACK_ON_ENTRY block that used it. Error out if --core and > --pid options were issued simultaneously. If an explicit pid > option was passed, don't fallback to core file. Detect extra > arguments better in the presence of explicit pid or core > arguments. This part is OK, please go ahead and commit. Thanks, -- Joel