This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH V5 1/3] Add AVX512 registers support to GDB.
- From: Pedro Alves <palves at redhat dot com>
- To: Michael Sturm <michael dot sturm at intel dot com>
- Cc: palves at redhat dot com, eliz at gnu dot org, mark dot kettenis at xs4all dot nl, walfred dot tedeschi at intel dot com, gdb-patches at sourceware dot org
- Date: Thu, 24 Apr 2014 12:33:46 +0100
- Subject: Re: [PATCH V5 1/3] Add AVX512 registers support to GDB.
- Authentication-results: sourceware.org; auth=none
- References: <1398258160-9070-1-git-send-email-michael dot sturm at intel dot com> <1398258160-9070-2-git-send-email-michael dot sturm at intel dot com>
On 04/23/2014 02:02 PM, Michael Sturm wrote:
> +
> +for { set r 0 } { $r < $nr_regs } { incr r } {
> + set val [expr $r + 1]
> + gdb_test "print/x k_data\[$r\]" \
> + ".. = 0x$val$val$val$val" \
> + "check contents of k_data\[$r\]"
> +
> +gdb_test "break [gdb_get_line_number "third breakpoint here"]" \
> + "Breakpoint .* at .*i386-avx512.c.*" \
> + "set third breakpoint in main"
> +gdb_continue_to_breakpoint "continue to third breakpoint in main"
> +
This bit wasn't addressed -- indentation here and all the way through
below still isn't right.
Ah, actually, it's not really the indentation that is missing.
It's a '}' to close the for loop above that is missing. So it
looks like the "check contents of k_data\[$r\]" test is only
running for $r == 0. Then the remainder of the tests
don't actually run $nr_regs times, because there are other loops
within that broken loop that also use $r as iterator:
> +for { set r 0 } { $r < $nr_regs } { incr r } {
> + gdb_test "print zmm_data\[$r\]" \
> + ".. = \\{f = \\{[expr $r + 30], [expr $r.125 + 30], [expr $r.25 + 20], [expr $r.375 + 20], [expr $r.5 + 10], [expr $r.625 + 10], [expr $r.75 + 10], [expr $r.875 + 10]\\}\\}.*" \
> + "check contents of zmm_data\[$r\] after writing XMM regs"
> +}
> +
> +}
> +
This last "}" is closing the broken for loop. Seems to me it's misplaced.
Other than that, looks fine to me. Please push with those issues fixed.
--
Pedro Alves