summaryrefslogtreecommitdiffstats
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
parent28e66c70aa949a56fa6615d5b7cc095c50856543 (diff)
downloadppe42-binutils-7afa16426aa2d92b2b59d4b7ce1e4d3e4421ff31.tar.gz
ppe42-binutils-7afa16426aa2d92b2b59d4b7ce1e4d3e4421ff31.zip
gdb/
* cli/cli-decode.c (print_doc_line): Keep skipping '.' and ',' not followed by a whitespace.
-rw-r--r--gdb/ChangeLog5
-rw-r--r--gdb/cli/cli-decode.c5
2 files changed, 9 insertions, 1 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index dc3240aa1a..081e82bd62 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,10 @@
2012-08-27 Jan Kratochvil <jan.kratochvil@redhat.com>
+ * cli/cli-decode.c (print_doc_line): Keep skipping '.' and ',' not
+ followed by a whitespace.
+
+2012-08-27 Jan Kratochvil <jan.kratochvil@redhat.com>
+
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 3c2e1526c9..4752a829ed 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)
{
OpenPOWER on IntegriCloud