From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22362 invoked by alias); 1 Apr 2013 11:34:03 -0000 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 Received: (qmail 22341 invoked by uid 89); 1 Apr 2013 11:33:55 -0000 X-Spam-SWARE-Status: No, score=-8.9 required=5.0 tests=AWL,BAYES_00,KHOP_RCVD_UNTRUST,KHOP_THREADED,RCVD_IN_DNSWL_HI,RCVD_IN_HOSTKARMA_W,RP_MATCHES_RCVD,SPF_HELO_PASS autolearn=ham version=3.3.1 Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.84/v0.84-167-ge50287c) with ESMTP; Mon, 01 Apr 2013 11:33:23 +0000 Received: from int-mx02.intmail.prod.int.phx2.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r31BXKMB024487 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Mon, 1 Apr 2013 07:33:20 -0400 Received: from [127.0.0.1] (ovpn01.gateway.prod.ext.ams2.redhat.com [10.39.146.11]) by int-mx02.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id r31BXIUn005576; Mon, 1 Apr 2013 07:33:19 -0400 Message-ID: <5159707E.9090209@redhat.com> Date: Mon, 01 Apr 2013 11:34:00 -0000 From: Pedro Alves User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130311 Thunderbird/17.0.4 MIME-Version: 1.0 To: Jan Kratochvil CC: mbilal , gdb-patches@sourceware.org, tromey@redhat.com Subject: Re: Fwd: [PATCH] Fix for PR gdb/15224 should "set history save on" by default References: <51558CB4.8010003@codesourcery.com> <51558EC5.2030806@codesourcery.com> <20130329141514.GA16671@host2.jankratochvil.net> In-Reply-To: <20130329141514.GA16671@host2.jankratochvil.net> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-SW-Source: 2013-04/txt/msg00003.txt.bz2 On 03/29/2013 02:15 PM, Jan Kratochvil wrote: > While that could be fixed in GDB testsuite the same problem will affect any > GDB frontend. > > Could you propose a patch compatible at least with existing front ends (like > Eclipse CDT)? The commands issued in MI sessions aren't added to the history, as when the top level interpreter is MI, GDB doesn't use readline/history (look for add_history). It could be argued that commands executed through "-interpreter-exec console" should make it to the history. Then we'd have the problem that cli commands that frontends issue because there are no MI alternatives would appear on the history. But, we already have a solution for that -- the "server" command/prefix (http://sourceware.org/gdb/onlinedocs/gdb/Server-Prefix.html#Server-Prefix). > I was thinking to just bind the default WRITE_HISTORY_P to > whether ~/.gdbinit is being read or not. The history's filename is also tweakable with the GDBHISTFILE environment variable (there's HISTSIZE too; 'GDBHISTFILE= gdb' effectively disables history load/save). Doesn't feel quite right to tie this to .gdbinit. One possible counter argument to flipping this on would that since history files are saved to the current directory by default, this has potential for littering users' directories with (hidden) .gdb_history files without the users noticing. We should at least make that fact explicit in NEWS and perhaps make it prominent in the manual. -- Pedro Alves