[patch] Fix crash on NULL rl_prompt
Tom Tromey
tromey@redhat.com
Tue Mar 30 16:23:00 GMT 2010
>>>>> "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
More information about the Gdb-patches
mailing list