* [pushed 1/2] [gdb/testsuite] Use shlib gdb_compile option in gdb.base/skip-solib.exp
@ 2023-03-07 14:46 Tom de Vries
2023-03-07 14:46 ` [pushed 2/2] [gdb/testsuite] Fix gdb.base/skip-solib.exp for remote target Tom de Vries
0 siblings, 1 reply; 2+ messages in thread
From: Tom de Vries @ 2023-03-07 14:46 UTC (permalink / raw)
To: gdb-patches
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
^ permalink raw reply [flat|nested] 2+ messages in thread
* [pushed 2/2] [gdb/testsuite] Fix gdb.base/skip-solib.exp for remote target
2023-03-07 14:46 [pushed 1/2] [gdb/testsuite] Use shlib gdb_compile option in gdb.base/skip-solib.exp Tom de Vries
@ 2023-03-07 14:46 ` Tom de Vries
0 siblings, 0 replies; 2+ messages in thread
From: Tom de Vries @ 2023-03-07 14:46 UTC (permalink / raw)
To: gdb-patches
Fix test-case gdb.base/skip-solib.exp for target board
remote-gdbserver-on-localhost using gdb_load_shlib.
Tested on x86_64-linux.
---
gdb/testsuite/gdb.base/skip-solib.exp | 2 ++
1 file changed, 2 insertions(+)
diff --git a/gdb/testsuite/gdb.base/skip-solib.exp b/gdb/testsuite/gdb.base/skip-solib.exp
index f01196c3fed..9caf7e09dac 100644
--- a/gdb/testsuite/gdb.base/skip-solib.exp
+++ b/gdb/testsuite/gdb.base/skip-solib.exp
@@ -61,6 +61,7 @@ if {[gdb_compile "${binfile_main}.o" "${binfile_main}" executable \
with_test_prefix "ignoring solib file" {
clean_restart ${executable_main}
+ gdb_load_shlib $binfile_lib
gdb_test "skip file ${srcfile_lib}" \
"File ${srcfile_lib} will be skipped when stepping." \
@@ -87,6 +88,7 @@ with_test_prefix "ignoring solib file" {
#
with_test_prefix "ignoring solib function" {
clean_restart ${executable_main}
+ gdb_load_shlib $binfile_lib
gdb_test "skip function multiply" \
"Function multiply will be skipped when stepping\\." \
--
2.35.3
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2023-03-07 14:45 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-07 14:46 [pushed 1/2] [gdb/testsuite] Use shlib gdb_compile option in gdb.base/skip-solib.exp Tom de Vries
2023-03-07 14:46 ` [pushed 2/2] [gdb/testsuite] Fix gdb.base/skip-solib.exp for remote target Tom de Vries
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).