Fix "list" when control characters are seen

Message ID 87lfxylxnw.fsf@tromey.com
State New, archived
Headers

Commit Message

Tom Tromey June 18, 2019, 3:29 p.m. UTC
  >> 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.
  

Comments

Pedro Alves June 18, 2019, 3:33 p.m. UTC | #1
On 6/18/19 4:29 PM, Tom Tromey wrote:
>>> 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?

Looks great, thanks.

Pedro Alves
  

Patch

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.
 
    ! */
 {