From 7afa16426aa2d92b2b59d4b7ce1e4d3e4421ff31 Mon Sep 17 00:00:00 2001 From: Jan Kratochvil Date: Mon, 27 Aug 2012 16:47:15 +0000 Subject: [PATCH] gdb/ * cli/cli-decode.c (print_doc_line): Keep skipping '.' and ',' not followed by a whitespace. --- gdb/ChangeLog | 5 +++++ gdb/cli/cli-decode.c | 5 ++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index dc3240a..081e82b 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,5 +1,10 @@ 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. * dwarf2read.c (dwarf2_locate_sections): Move variable aflag here. Move the SEC_HAS_CONTENTS check here - for any NAMES use. diff --git a/gdb/cli/cli-decode.c b/gdb/cli/cli-decode.c index 3c2e152..4752a82 100644 --- a/gdb/cli/cli-decode.c +++ b/gdb/cli/cli-decode.c @@ -1068,8 +1068,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) { -- 2.7.4