From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17022 invoked by alias); 7 May 2013 12:44:01 -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 17011 invoked by uid 89); 7 May 2013 12:44:01 -0000 X-Spam-SWARE-Status: No, score=-4.3 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; Tue, 07 May 2013 12:43:59 +0000 Received: from svr-orw-exc-10.mgc.mentorg.com ([147.34.98.58]) by relay1.mentorg.com with esmtp id 1UZhFO-0001mD-4z from Muhammad_Bilal@mentor.com ; Tue, 07 May 2013 05:43:58 -0700 Received: from SVR-IES-FEM-01.mgc.mentorg.com ([137.202.0.104]) by SVR-ORW-EXC-10.mgc.mentorg.com with Microsoft SMTPSVC(6.0.3790.4675); Tue, 7 May 2013 05:43:58 -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; Tue, 7 May 2013 13:43:56 +0100 Message-ID: <5188F70A.1030908@codesourcery.com> Date: Tue, 07 May 2013 12:44: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> In-Reply-To: <5188AA15.5010904@codesourcery.com> Content-Type: text/plain; charset="ISO-8859-1"; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2013-05/txt/msg00207.txt.bz2 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