This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [patch] Fix crash on NULL rl_prompt
>>>>> "Pedro" == Pedro Alves <pedro@codesourcery.com> writes:
Pedro> It isn't clear to me your patch isn't doing so, FTR. It could
Pedro> have been a readline change only visible when using a more recent
Pedro> system readline, instead of the version bundled with gdb, for
Pedro> example.
The included readline handles rl_prompt == NULL:
int
rl_set_prompt (prompt)
const char *prompt;
{
FREE (rl_prompt);
rl_prompt = prompt ? savestring (prompt) : (char *)NULL;
rl_display_prompt = rl_prompt ? rl_prompt : "";
rl_visible_prompt_length = rl_expand_prompt (rl_prompt);
return 0;
}
Tom