This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH v2] testsuite: Treat an empty string in needs_status_wrapper as false
- From: Pedro Alves <palves at redhat dot com>
- To: Anton Kolesov <Anton dot Kolesov at synopsys dot com>
- Cc: gdb-patches at sourceware dot org, Jeremy Bennett <Jeremy dot bennett at embecosm dot com>
- Date: Mon, 21 Oct 2013 12:23:18 +0100
- Subject: Re: [PATCH v2] testsuite: Treat an empty string in needs_status_wrapper as false
- Authentication-results: sourceware.org; auth=none
- References: <39A54937CC95F24AA2F794E2D2B66B1356BD8887 at de02wembxa dot internal dot synopsys dot com> <1382354229-10006-1-git-send-email-Anton dot Kolesov at synopsys dot com>
On 10/21/2013 12:17 PM, Anton Kolesov wrote:
> GDB test suite considers [target_info needs_status_wrapper] to be false if
> it unset or have a zero value. The former is achieved by using [target_info
> exists needs_status_wrapper]. GCC test suite on the other hand do not use
> "exists" but compares to an empty string. This doesn't make difference if
> value is unset, as unset value is treated as an empty string, but makes a
> difference if value was set to and empty string. In that case if
> needs_status_wrapper was set to an empty string, then GCC test suite will
> not use status wrapper, but GDB test suite will use it. Dejagnu's own
> remote.exp uses a comparison with an empty string. Though for some reason
> Dejagnu unlike GCC and GDB test suite doesn't treat a zero as a false.
There's another reference to needs_status_wrapper in java.exp.
I think it'd be good to add a new procedure all these 3 places
call instead of inlining all these not-set/""/"0" checks. It'd
also be great if the info quoted above was put in the code
itself (in the new procedure's documentation).
--
Pedro Alves