[PATCH V2 4/7] Fortran, typeprint: Decrease level of details when printing elements of a structure.

Yao Qi qiyaoltc@gmail.com
Fri May 13 14:12:00 GMT 2016


Bernhard Heckel <bernhard.heckel@intel.com> writes:

Patch is good to me.

> --- a/gdb/testsuite/gdb.fortran/derived-type.exp
> +++ b/gdb/testsuite/gdb.fortran/derived-type.exp
> @@ -40,10 +40,10 @@ gdb_test "ptype p" "type = Type bar\r\n *$int :: c\r\n *$real :: d\r\n *End Type
>  
>  set test "type-printing for derived type"
>  gdb_test_multiple "ptype q" $test {
> -    -re "type = Type foo\r\n *$real :: a\r\n *Type bar\r\n *$int :: c\r\n *$real :: d\r\n *End Type bar :: x\r\n *character\\*7 :: b\r\n *End Type foo\r\n$gdb_prompt $" {
> +    -re "type = Type foo\r\n *$real :: a\r\n *Type bar :: x\r\n *character\\*7 :: b\r\n *End Type foo\r\n$gdb_prompt $" {
>  	pass $test
>      }
> -    -re "type = Type foo\r\n *$real :: a\r\n *Type bar\r\n *$int :: c\r\n *$real :: d\r\n *End Type bar :: x\r\n *character :: b\\(7\\)\r\n *End Type foo\r\n$gdb_prompt $" {
> +    -re "type = Type foo\r\n *$real :: a\r\n *Type bar :: x\r\n *character :: b\\(7\\)\r\n *End Type foo\r\n$gdb_prompt $" {
>  	# Compiler should produce string, not an array of characters.
>  	setup_xfail "*-*-*"
>  	fail $test

Before you apply this patch, can you convert these patterns to using
multi_line?  Then, this patch is much cleaner.  The change to using
multi_line is obvious, so you don't need review/approval for it.

-- 
Yao (齐尧)



More information about the Gdb-patches mailing list