This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH v2 1/2] Fixed indentation for printing Fortran types with pointers
- From: Tom Tromey <tromey at redhat dot com>
- To: Christoph Weinmann <christoph dot t dot weinmann at intel dot com>
- Cc: gdb-patches at sourceware dot org
- Date: Mon, 23 Sep 2013 14:24:52 -0600
- Subject: Re: [PATCH v2 1/2] Fixed indentation for printing Fortran types with pointers
- Authentication-results: sourceware.org; auth=none
- References: <1379079383-20685-1-git-send-email-christoph dot t dot weinmann at intel dot com> <1379079383-20685-2-git-send-email-christoph dot t dot weinmann at intel dot com>
>>>>> "Christoph" == Christoph Weinmann <christoph.t.weinmann@intel.com> writes:
Christoph> Printing the prefix "PTR TO -> (" resp. "REF TO ->(" ignored the
Christoph> active indentation level. This caused inconsistent appearance of
Christoph> user-defined Fortran types containing pointers. Fixed by using
Christoph> "fprintfi_filtered" with the current indentation level for
Christoph> outputting the prefix string. Added test case ptr-indentation.
Thanks once again.
Christoph> +# Check the indentation when using ptype on pointers in user-defined types.
Christoph> +set test "type-printing for type with pointers"
Christoph> +gdb_test_multiple "whatis ta" $test {
Christoph> + -re "type = tudf.*$gdb_prompt $" {
Christoph> + pass $test
Christoph> + }
Christoph> +}
Christoph> +gdb_test_multiple "ptype ta" $test {
Christoph> + -re ".*type = Type tudf\r\n *${int4} :: i\r\n PTR TO \-\> \\( tudf :: ptr\\)\r\n.*End Type tudf.*$gdb_prompt $" {
I think these tests are better written using plain old "gdb_test".
Tom