[PATCH, testsuite] Adjust gdb.base/maint.exp for Windows hosts
Pedro Alves
palves@redhat.com
Mon Jun 23 14:17:00 GMT 2014
On 06/10/2014 01:13 PM, Luis Machado wrote:
> Hi,
>
> Last year changes to gdb.base/maint.exp seem to have caused a few
> failures for Windows testing.
>
> The first issue is the output of "maint set per-command". On Linux
> hosts, it looks like this:
>
> (top-gdb) maint set per-command off
> Command execution time: 0.000000 (cpu), 0.000070 (wall)
> Space used: 10321920 (+0 for this command)
> #symtabs: 492 (+0), #primary symtabs: 3 (+0), #blocks: 253 (+0)
>
> On Windows hosts, it looks like this:
>
> (gdb) maint set per-command off
> Command execution time: 0.000000 (cpu), 0.000000 (wall)
> #symtabs: 0 (+0), #primary symtabs: 0 (+0), #blocks: 0 (+0)
>
> The space summary isn't displayed because Windows hosts don't have
> HAVE_SBRK defined.
So that bit of code should be ported to Windows then IMO, IMO.
The test failure is exactly serving as reminder. I believe
VirtualQuery/VirtualQueryEx would be what to use.
> Other systems that don't define the same constant
> will also run into pattern matching problems here.
Well, we can make the code do whatever is necessary for such
systems as we find them -- and the test is what helps us find them.
>
> diff --git a/gdb/testsuite/gdb.base/maint.exp b/gdb/testsuite/gdb.base/maint.exp
> index 64753b7..b588c69 100644
> --- a/gdb/testsuite/gdb.base/maint.exp
> +++ b/gdb/testsuite/gdb.base/maint.exp
> @@ -46,6 +46,13 @@
> #
>
>
> +# Some targets do not support 'ls', 'grep' and 'rm', like Windows.
> +# Set the flag here so we don't attempt to test things using those tools
> +# later on.
> +set linux_tools_supported 1
> +if { [ishost *-*-*mingw*] } {
> + set linux_tools_supported 0
> +}
These tools really aren't "Linux"-specific.
In any case, it seems to me that the test should instead be tweaked
to use tcl/dejagnu commands instead of (ab)using GDB's "shell".
--
Pedro Alves
More information about the Gdb-patches
mailing list