From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 990 invoked by alias); 4 Mar 2010 07:26:35 -0000 Received: (qmail 978 invoked by uid 22791); 4 Mar 2010 07:26:34 -0000 X-SWARE-Spam-Status: No, hits=-2.4 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from rock.gnat.com (HELO rock.gnat.com) (205.232.38.15) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 04 Mar 2010 07:26:31 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id 7817D2BABBC; Thu, 4 Mar 2010 02:26:29 -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 4XyzcgKWZtLm; Thu, 4 Mar 2010 02:26:29 -0500 (EST) Received: from joel.gnat.com (localhost.localdomain [127.0.0.1]) by rock.gnat.com (Postfix) with ESMTP id 079292BABB1; Thu, 4 Mar 2010 02:26:29 -0500 (EST) Received: by joel.gnat.com (Postfix, from userid 1000) id EBFC0F5894; Thu, 4 Mar 2010 11:26:20 +0400 (RET) Date: Thu, 04 Mar 2010 07:26:00 -0000 From: Joel Brobecker To: Hui Zhu Cc: gdb-patches ml Subject: Re: [RFA] Fix "Segmentation fault" when "gdb -v" Message-ID: <20100304072620.GJ2832@adacore.com> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.20 (2009-06-14) 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: 2010-03/txt/msg00160.txt.bz2 > All of this code use "printf_filtered". But this function must be > call after "interp_set". > But this part of code call before "interp_set". I think that this was an unforseen side-effect of a recent change. IMO, it's better to get rid of this side-effect (needing the interpreter to be set) in printf_filtered. We should NOT change printf_filtered into printf_unfiltered in this case because the same function is used in two different situations: - when the user uses -v - when the user types "show version" In the latter case, the printf_filtered is appropriate. Now, we need to decide whether pagination should be enabled if the interpreter is not set. I think it makes sense to disable pagination in this case. If the interpreter is not set yet, we're just printing stuff on stdout, we haven't started the interactive session (if any) yet... -- Joel