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

Pedro Alves
2013-05-08T17:25:15Z

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