From: Anton Kolesov <Anton.Kolesov@synopsys.com>
To: "gdb-patches@sourceware.org" <gdb-patches@sourceware.org>
Cc: "Jeremy.bennett@embecosm.com" <Jeremy.bennett@embecosm.com>
Subject: RE: [PATCH] testsuite: Treat empty string in needs_status_wrapper as a false value
Date: Thu, 17 Oct 2013 15:07:00 -0000 [thread overview]
Message-ID: <39A54937CC95F24AA2F794E2D2B66B1356BD8887@de02wembxa.internal.synopsys.com> (raw)
In-Reply-To: <1382014717-15710-1-git-send-email-Anton.Kolesov@synopsys.com>
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset="utf-8", Size: 2469 bytes --]
Hi all,
It seems that I should have removed call to [target_info exists] in this patch as well, as it is redundant, since if variable is not set, then an empty string will be returned. However if needs_status_wrapper was explicitly set to an empty string, then [target_info exists] will have a different result than comparison with an empty string. Dejagnu itself in remote.exp compares needs_status_wrapper with an empty string, so I think that the same should be done in GDB test suite. If there are no other objections I will send an updated patch.
--
Anton Kolesov
> -----Original Message-----
> From: Anton Kolesov [mailto:Anton.Kolesov@synopsys.com]
> Sent: 17 October 2013 16:59
> To: gdb-patches@sourceware.org
> Cc: Anton Kolesov; Jeremy.bennett@embecosm.com
> Subject: [PATCH] testsuite: Treat empty string in needs_status_wrapper as
> a false value
>
> GCC testsuite treats empty string in [target_info needs_status_wrapper]
> the
> same way as "0" - as a false value. GDB testsuite on the other hand
> recognizes
> only zero as false. This patch changes this to improve compatibilty of
> board files.
>
> gdb/testsuite/ChangeLog:
>
> 2013-10-17 Anton Kolesov <Anton.Kolesov@synopsys.com>
>
> * lib/gdb.exp (gdb_compile, gdb_wrapper_init): Treat empty string in
> target_info needs_status_wrapper the same way as zero - as a false
> value.
> ---
> gdb/testsuite/lib/gdb.exp | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp
> index 3efd539..f5f1555 100644
> --- a/gdb/testsuite/lib/gdb.exp
> +++ b/gdb/testsuite/lib/gdb.exp
> @@ -2511,6 +2511,7 @@ proc gdb_wrapper_init { args } {
> if { $gdb_wrapper_initialized == 1 } { return; }
>
> if {[target_info exists needs_status_wrapper] && \
> + [target_info needs_status_wrapper] != "" && \
> [target_info needs_status_wrapper] != "0"} {
> set result [build_wrapper "testglue.o"]
> if { $result != "" } {
> @@ -2610,6 +2611,7 @@ proc gdb_compile {source dest type options} {
> if { $gdb_wrapper_initialized == 0 } { gdb_wrapper_init }
>
> if {[target_info exists needs_status_wrapper] && \
> + [target_info needs_status_wrapper] != "" && \
> [target_info needs_status_wrapper] != "0" && \
> [info exists gdb_wrapper_file]} {
> lappend options "libs=${gdb_wrapper_file}"
> --
> 1.8.4.1
\x16º&Öéj×!zÊÞ¶êç×N¸Ób²Ö«r\x18\x1dnr\x17¬
next prev parent reply other threads:[~2013-10-17 15:07 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-10-17 12:59 Anton Kolesov
2013-10-17 15:07 ` Anton Kolesov [this message]
2013-10-21 11:17 ` [PATCH v2] testsuite: Treat an empty string in needs_status_wrapper as false Anton Kolesov
2013-10-21 11:23 ` Pedro Alves
2013-10-22 10:51 ` [PATCH v3] " Anton Kolesov
2013-10-24 22:07 ` Pedro Alves
2013-10-25 9:25 ` Anton Kolesov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=39A54937CC95F24AA2F794E2D2B66B1356BD8887@de02wembxa.internal.synopsys.com \
--to=anton.kolesov@synopsys.com \
--cc=Jeremy.bennett@embecosm.com \
--cc=gdb-patches@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox