public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Tom de Vries <tdevries@suse.de>
To: gdb-patches@sourceware.org
Subject: [pushed 1/2] [gdb/testsuite] Use shlib gdb_compile option in gdb.base/skip-solib.exp
Date: Tue,  7 Mar 2023 15:46:02 +0100	[thread overview]
Message-ID: <20230307144603.5152-1-tdevries@suse.de> (raw)

In test-case gdb.base/skip-solib.exp the linking against a shared library is
done manually:
...
if {[gdb_compile "${binfile_main}.o" "${binfile_main}" executable \
        [list debug "additional_flags=-L$testobjdir" \
             "additional_flags=-l${test}" \
             "ldflags=-Wl,-rpath=$testobjdir"]] != ""} {
...

Instead, use the shlib gdb_compile option such that we simply have:
...
        [list debug shlib=$binfile_lib]] != ""} {
...

Tested on x86_64-linux.
---
 gdb/testsuite/gdb.base/skip-solib.exp | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/gdb/testsuite/gdb.base/skip-solib.exp b/gdb/testsuite/gdb.base/skip-solib.exp
index 3cdb455bb59..f01196c3fed 100644
--- a/gdb/testsuite/gdb.base/skip-solib.exp
+++ b/gdb/testsuite/gdb.base/skip-solib.exp
@@ -51,9 +51,7 @@ if {[gdb_compile "${srcdir}/${subdir}/${srcfile_main}" "${binfile_main}.o" \
 
 set testobjdir [standard_output_file {}]
 if {[gdb_compile "${binfile_main}.o" "${binfile_main}" executable \
-	 [list debug "additional_flags=-L$testobjdir" \
-	      "additional_flags=-l${test}" \
-	      "ldflags=-Wl,-rpath=$testobjdir"]] != ""} {
+	 [list debug shlib=$binfile_lib]] != ""} {
     return -1
 }
 

base-commit: dfe30a41c8c1237f70a9cc31cc8cc90f1c1a46f6
-- 
2.35.3


             reply	other threads:[~2023-03-07 14:45 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-07 14:46 Tom de Vries [this message]
2023-03-07 14:46 ` [pushed 2/2] [gdb/testsuite] Fix gdb.base/skip-solib.exp for remote target Tom de Vries

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=20230307144603.5152-1-tdevries@suse.de \
    --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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).