This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH 1/7] PR gdb/15224 "set history filename" to by immediately converted to absolute path


On 05/08/2013 04:46 PM, Pedro Alves wrote:

>> +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);
>> +}

In addition to my previous comments, I realized that this will do the
wrong thing with "set history filename ~/foo".  Best use tilde_expand
and gdb_realpath.

-- 
Pedro Alves


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]