From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2915 invoked by alias); 8 May 2013 08:22:25 -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 2903 invoked by uid 89); 8 May 2013 08:22:25 -0000 X-Spam-SWARE-Status: No, score=-4.4 required=5.0 tests=AWL,BAYES_00,KHOP_RCVD_UNTRUST,KHOP_THREADED,RCVD_IN_HOSTKARMA_W,RCVD_IN_HOSTKARMA_WL autolearn=ham version=3.3.1 Received: from relay1.mentorg.com (HELO relay1.mentorg.com) (192.94.38.131) by sourceware.org (qpsmtpd/0.84/v0.84-167-ge50287c) with ESMTP; Wed, 08 May 2013 08:22:12 +0000 Received: from svr-orw-fem-01.mgc.mentorg.com ([147.34.98.93]) by relay1.mentorg.com with esmtp id 1UZzda-0003hj-He from Muhammad_Bilal@mentor.com ; Wed, 08 May 2013 01:22:10 -0700 Received: from SVR-IES-FEM-01.mgc.mentorg.com ([137.202.0.104]) by svr-orw-fem-01.mgc.mentorg.com over TLS secured channel with Microsoft SMTPSVC(6.0.3790.4675); Wed, 8 May 2013 01:22:09 -0700 Received: from [137.202.157.37] (137.202.0.76) by SVR-IES-FEM-01.mgc.mentorg.com (137.202.0.104) with Microsoft SMTP Server (TLS) id 14.2.247.3; Wed, 8 May 2013 09:22:08 +0100 Message-ID: <518A0B2E.7000706@codesourcery.com> Date: Wed, 08 May 2013 08:22:00 -0000 From: mbilal User-Agent: Mozilla/5.0 (X11; Linux i686; rv:17.0) Gecko/17.0 Thunderbird/17.0 MIME-Version: 1.0 To: CC: , Subject: Re: [PATCH 1/7] PR gdb/15224 "set history filename" to by immediately converted to absolute path References: <51877A32.1030503@codesourcery.com> <51877A99.4060503@codesourcery.com> <5188AA15.5010904@codesourcery.com> <5188F70A.1030908@codesourcery.com> In-Reply-To: <5188F70A.1030908@codesourcery.com> Content-Type: text/plain; charset="ISO-8859-1"; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2013-05/txt/msg00273.txt.bz2 On 05/07/2013 05:43 PM, mbilal wrote: > please find updated patch . > > I made new 'set_history_filename' function to solve this problem > > and thanks Pedro for review this patch. > > > > diff --git a/gdb/top.c b/gdb/top.c > index 480b67e..20aecc9 100644 > --- a/gdb/top.c > +++ b/gdb/top.c > @@ -48,6 +48,7 @@ > #include "interps.h" > #include "observer.h" > #include "maint.h" > +#include "filenames.h" > > /* readline include files. */ > #include "readline/readline.h" > @@ -1607,6 +1608,14 @@ set_verbose (char *args, int from_tty, struct > cmd_list_element *c) > } > } > > +static void > +set_history_filename (char *args, int from_tty, struct > cmd_list_element *c) > +{ > + if (!IS_ABSOLUTE_PATH (*(char **) c->var)) > + *(char **) c->var = concat (current_directory, "/", *(char **) > c->var, > + (char *)NULL); > +} > + > /* Init the history buffer. Note that we are called after the init > file(s) > have been read so that the user can change the history file via his > .gdbinit file (for instance). The GDBHISTFILE environment variable > @@ -1777,7 +1786,7 @@ variable \"HISTSIZE\", or to 256 if this > variable is not set."), > Set the filename in which to record the command history"), _("\ > Show the filename in which to record the command history"), _("\ > (the list of previous commands of which a record is kept)."), > - NULL, > + set_history_filename, > show_history_filename, > &sethistlist, &showhistlist); > > > > > Thanks, > -Bilal ping?