[PATCH PR gdb/15715] 'set history filename' to by immediately converted to absolute path.

Muhammad Bilal mbilal@codesourcery.com
Tue Jul 30 09:56:00 GMT 2013


Oh , my bad, and I am  sorry

On 07/29/2013 07:20 PM, Pedro Alves wrote:
> Hello,
>
> On 07/29/2013 07:12 AM, Muhammad Bilal wrote:
>
>> 2013-07-29  Muhammad Bilal  <mbilal@codesorcery.com>
>>
>>           PR gdb/15715
>>           * top.c: include "filenames.h"
>>           (set_history_filename):New function.
> Space after ':'.
fixed.
>>   static void
>> +set_history_filename (char *args, int from_tty, struct cmd_list_element *c)
>> +{
>> +  /*We include the current directory so that if the user changes
>> +    directories the file written will be the same as the one
>> +    that was read.  */
> Formatting still not right.  Add a space after '/*', and then reindent.
> Also, there's trailing whitespace in the first two lines that should not
> be there.  The correct format is:
>
>      /* We include the current directory so that if the user changes
>         directories the file written will be the same as the one that
>         was read.  */
>
>> +  if (!IS_ABSOLUTE_PATH (history_filename))
>> +    history_filename = reconcat (history_filename, current_directory, "/",
>> +				 history_filename, (char *) NULL);
>> +}
> Thanks,

fixed.

Please find new patch.


2013-07-30  Muhammad Bilal  <mbilal@codesorcery.com>

         PR gdb/15715
         * top.c: include "filenames.h"
         (set_history_filename): New function.
         (init_main): Install it as set hook of the "set history filename"
         command.

./testsuit

2013-07-30  Muhammad Bilal  <mbilal@codesourcery.com>

         PR gdb/15715
         * gdb.base/setshow.exp: Test that relative paths passed to
         'set history filename' are converted to absolute paths.






OK?




Thanks,
-Bilal





-------------- next part --------------
A non-text attachment was scrubbed...
Name: pr15715.diff
Type: text/x-patch
Size: 3486 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/gdb-patches/attachments/20130730/cf55fd76/attachment.bin>


More information about the Gdb-patches mailing list