This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH v2] testsuite: Treat an empty string in needs_status_wrapper as false


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]