public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Tom Tromey <tom@tromey.com>
To: Shahab Vahedi <shahab.vahedi@gmail.com>
Cc: gdb-patches@sourceware.org,  Shahab Vahedi <shahab@synopsys.com>,
		Francois Bedard <fbedard@synopsys.com>
Subject: Re: [PATCH] gdb/testsuite: Regenerate the testglue if it is not in path
Date: Tue, 11 Feb 2020 15:41:00 -0000	[thread overview]
Message-ID: <87zhdp876w.fsf@tromey.com> (raw)
In-Reply-To: <20200211133710.6120-1-shahab.vahedi@gmail.com> (Shahab Vahedi's	message of "Tue, 11 Feb 2020 14:37:10 +0100")

>>>>> "Shahab" == Shahab Vahedi <shahab.vahedi@gmail.com> writes:

Shahab> For running the  DejaGnu  tests,  some  esoteric  configurations
Shahab> may require a testglue.

Thank you for the patch.  I wasn't aware of this code at all :-)

Shahab> This patch checks if the wrapper file ("gdb_tg.o") is  still  in
Shahab> reach and if it is not, it will stimulate the generation of  the
Shahab> wrapper again.

I wonder if it would make sense to instead set gdb_wrapper_file to the
absolute path.

It could perhaps be put in the cache directory.  This might help avoid
recompiling it many times when running the tests in parallel.

What do you think of that?

Shahab> +    # if the wrapper is initialized but the wrapper file cannot be

GNU style is to start a comment with an upper-case letter, so "If".

Shahab> +    # found anymore, the wrapper file must be built again.
Shahab> +    if { $gdb_wrapper_initialized == 1 && \
Shahab> +	    [info exists gdb_wrapper_file] && \
Shahab> +	    ![file exists $gdb_wrapper_file] } {
Shahab> +	verbose "reinitializing the wrapper"
Shahab> +	set gdb_wrapper_initialized 0
Shahab> +    }
Shahab> +
Shahab>      if { $gdb_wrapper_initialized == 0 } { gdb_wrapper_init }

If you don't like the absolute path idea, maybe just having all this
logic be in the wrapper code would be better, and this could just call
gdb_wrapper_init unconditionally.

Tom

  reply	other threads:[~2020-02-11 15:41 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-11 13:37 Shahab Vahedi
2020-02-11 15:41 ` Tom Tromey [this message]
2020-02-11 16:52   ` Shahab Vahedi
2020-02-18 11:51 ` [PATCH v2] " Shahab Vahedi
2020-02-19  3:10   ` Simon Marchi
2020-02-19 21:16     ` Tom Tromey
2020-02-19 15:11 ` [PATCH v3] gdb/testsuite: Regenerate the testglue if it is not in Shahab Vahedi
2020-02-19 21:29   ` Tom Tromey

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=87zhdp876w.fsf@tromey.com \
    --to=tom@tromey.com \
    --cc=fbedard@synopsys.com \
    --cc=gdb-patches@sourceware.org \
    --cc=shahab.vahedi@gmail.com \
    --cc=shahab@synopsys.com \
    /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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).