Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Tom de Vries <tdevries@suse.de>
To: gdb-patches@sourceware.org
Subject: [PATCH][gdb/testsuite] Remove stale exec in gdb_compile_ada
Date: Thu, 13 Feb 2020 10:47:00 -0000	[thread overview]
Message-ID: <20200213104740.GA9654@delia> (raw)

Hi,

When running test-case gdb.ada/ptype_tagged_param.exp, I get:
...
PASS: gdb.ada/ptype_tagged_param.exp: compilation foo.adb
...

However, when I then de-install gnatmake and run again, I get the same result.
This is due to a stale exec. After removing the stale exec, I get:
...
UNSUPPORTED: gdb.ada/ptype_tagged_param.exp: compilation foo.adb
...

Fix this removing the stale exec in gdb_compile_ada before compilation.

Tested on x86_64-linux.

OK for trunk?

Thanks,
- Tom

[gdb/testsuite] Remove stale exec in gdb_compile_ada

gdb/testsuite/ChangeLog:

2020-02-13  Tom de Vries  <tdevries@suse.de>

	* lib/ada.exp (gdb_compile_ada): Delete stale exec before compilation.

---
 gdb/testsuite/lib/ada.exp | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/gdb/testsuite/lib/ada.exp b/gdb/testsuite/lib/ada.exp
index 726977d98f..9933cc951e 100644
--- a/gdb/testsuite/lib/ada.exp
+++ b/gdb/testsuite/lib/ada.exp
@@ -60,6 +60,8 @@ proc gdb_compile_ada {source dest type options} {
     set gprdir [file dirname $srcdir]
     set objdir [file dirname $dest]
 
+    file delete $dest
+
     # Although strictly not necessary, we force the recompilation
     # of all units (additional_flags=-f).  This is what is done
     # when using GCC to build programs in the other languages,


             reply	other threads:[~2020-02-13 10:47 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-13 10:47 Tom de Vries [this message]
2020-02-13 14:25 ` 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=20200213104740.GA9654@delia \
    --to=tdevries@suse.de \
    --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