This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH] Fix "list" when control characters are seen
- From: Tom Tromey <tromey at adacore dot com>
- To: Pedro Alves <palves at redhat dot com>
- Cc: Tom Tromey <tromey at adacore dot com>, gdb-patches at sourceware dot org
- Date: Tue, 18 Jun 2019 09:29:23 -0600
- Subject: Re: [PATCH] Fix "list" when control characters are seen
- References: <20190409185432.16985-1-tromey@adacore.com> <32fe2c91-99f5-5b2a-ccaa-8481b1747dd5@redhat.com>
>> static void foo (int x)
>> /* !
>> - !
>> +
Pedro> This seems pretty obscure without the context of the patch around.
Pedro> Should we add a comment here?
Good idea, how's this?
Tom
commit d20ed5fd574ce1b72543c2963fa53946eb2225de
Author: Tom Tromey <tromey@adacore.com>
Date: Tue Jun 18 09:27:45 2019 -0600
Add comment to list0.h
Pedro suggested adding a comment to list0.h to explain the control
character.
Tested on x86-64 Fedora 29.
gdb/testsuite/ChangeLog
2019-06-18 Tom Tromey <tromey@adacore.com>
* gdb.base/list0.h: Add comment explaining control character.
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog
index b6fcf58c7dd..75adad35f48 100644
--- a/gdb/testsuite/ChangeLog
+++ b/gdb/testsuite/ChangeLog
@@ -1,3 +1,7 @@
+2019-06-18 Tom Tromey <tromey@adacore.com>
+
+ * gdb.base/list0.h: Add comment explaining control character.
+
2019-06-18 Tom de Vries <tdevries@suse.de>
* boards/fission.exp: Break up long debug_flags line.
diff --git a/gdb/testsuite/gdb.base/list0.h b/gdb/testsuite/gdb.base/list0.h
index 6f280935509..ba18e29268e 100644
--- a/gdb/testsuite/gdb.base/list0.h
+++ b/gdb/testsuite/gdb.base/list0.h
@@ -2,7 +2,7 @@
extern void bar(int);
static void foo (int x)
-/* !
+/* ! the next line has a control character, see PR symtab/24423.
! */
{