aboutsummaryrefslogtreecommitdiff
path: root/gdb/cli
diff options
context:
space:
mode:
authorJan Kratochvil <jan.kratochvil@redhat.com>2012-08-27 16:47:15 +0000
committerJan Kratochvil <jan.kratochvil@redhat.com>2012-08-27 16:47:15 +0000
commit7afa16426aa2d92b2b59d4b7ce1e4d3e4421ff31 (patch)
treea8b3f50a52755eed6486883aee4f9bb2cfe28a5b /gdb/cli
parent28e66c70aa949a56fa6615d5b7cc095c50856543 (diff)
downloadgdb-7afa16426aa2d92b2b59d4b7ce1e4d3e4421ff31.zip
gdb-7afa16426aa2d92b2b59d4b7ce1e4d3e4421ff31.tar.gz
gdb-7afa16426aa2d92b2b59d4b7ce1e4d3e4421ff31.tar.bz2
gdb/
* cli/cli-decode.c (print_doc_line): Keep skipping '.' and ',' not followed by a whitespace.
Diffstat (limited to 'gdb/cli')
-rw-r--r--gdb/cli/cli-decode.c5
1 files changed, 4 insertions, 1 deletions
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)
{