From: Jan Kratochvil Date: Mon, 27 Aug 2012 16:47:32 +0000 (+0000) Subject: gdb/ X-Git-Tag: gdb_7_5_1-2012-11-29-release~117 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=61547c8c0215a7189892810dfe8bbc6dad106d70;p=thirdparty%2Fbinutils-gdb.git gdb/ * cli/cli-decode.c (print_doc_line): Keep skipping '.' and ',' not followed by a whitespace. --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index d74486ffb2a..10d07a4f9df 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2012-08-27 Jan Kratochvil + + * cli/cli-decode.c (print_doc_line): Keep skipping '.' and ',' not + followed by a whitespace. + 2012-08-27 Jan Kratochvil PR gdb/14494. diff --git a/gdb/cli/cli-decode.c b/gdb/cli/cli-decode.c index c337b43f813..6fa929b1d71 100644 --- a/gdb/cli/cli-decode.c +++ b/gdb/cli/cli-decode.c @@ -1003,8 +1003,11 @@ print_doc_line (struct ui_file *stream, char *str) line_buffer = (char *) xmalloc (line_size); } + /* Keep printing '.' or ',' not followed by a whitespace for embedded strings + like '.gdbinit'. */ p = str; - while (*p && *p != '\n' && *p != '.' && *p != ',') + while (*p && *p != '\n' + && ((*p != '.' && *p != ',') || (p[1] && !isspace (p[1])))) p++; if (p - str > line_size - 1) {