aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite
diff options
context:
space:
mode:
authorTom Tromey <tromey@adacore.com>2019-04-09 12:52:46 -0600
committerTom Tromey <tromey@adacore.com>2019-04-19 13:01:54 -0600
commit62160ec9547cdd21ac7334d9a378ca2930aac61c (patch)
tree55873c12bd4acb1b1f7434524a1a2c0d10c3dc49 /gdb/testsuite
parentee3c5f8968e7b43854204898fa46933b3a1b5991 (diff)
downloadgdb-62160ec9547cdd21ac7334d9a378ca2930aac61c.zip
gdb-62160ec9547cdd21ac7334d9a378ca2930aac61c.tar.gz
gdb-62160ec9547cdd21ac7334d9a378ca2930aac61c.tar.bz2
Fix "list" when control characters are seen
PR symtab/24423 points out that control characters in a source file cause a hang in the "list" command, a regression introduced by the styling changes. This patch, from the PR, fixes the bug. I've included a minimal change to the "list" test that exercises this code. I recall that this bug was discussed on gdb-patches, and I thought there was a patch there as well, but I was unable to find it. gdb/ChangeLog 2019-04-19 Ilya Yu. Malakhov <malakhov@mcst.ru> PR symtab/24423: * source.c (print_source_lines_base): Advance "iter" when a control character is seen. gdb/testsuite/ChangeLog 2019-04-19 Tom Tromey <tromey@adacore.com> PR symtab/24423: * gdb.base/list0.h (foo): Add a control-l character.
Diffstat (limited to 'gdb/testsuite')
-rw-r--r--gdb/testsuite/ChangeLog5
-rw-r--r--gdb/testsuite/gdb.base/list0.h2
2 files changed, 6 insertions, 1 deletions
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog
index 297e2d4..89058f4 100644
--- a/gdb/testsuite/ChangeLog
+++ b/gdb/testsuite/ChangeLog
@@ -1,3 +1,8 @@
+2019-04-19 Tom Tromey <tromey@adacore.com>
+
+ PR symtab/24423:
+ * gdb.base/list0.h (foo): Add a control-l character.
+
2019-04-18 Tom de Vries <tdevries@suse.de>
PR gdb/24433
diff --git a/gdb/testsuite/gdb.base/list0.h b/gdb/testsuite/gdb.base/list0.h
index 42a4fe0..6f28093 100644
--- a/gdb/testsuite/gdb.base/list0.h
+++ b/gdb/testsuite/gdb.base/list0.h
@@ -3,7 +3,7 @@
extern void bar(int);
static void foo (int x)
/* !
- !
+
! */
{
bar (x++);