aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGuinevere Larsen <guinevere@redhat.com>2025-01-20 09:20:59 -0300
committerGuinevere Larsen <guinevere@redhat.com>2025-01-20 09:47:24 -0300
commit24f46f126f4df6d727967f4489c66bc0921b1d6e (patch)
tree6f90a9416172e143b5506cabfff20296c772081f
parent876bcbeb43c0f409d8dd6af42ff61f92df0b29bd (diff)
downloadgdb-24f46f126f4df6d727967f4489c66bc0921b1d6e.zip
gdb-24f46f126f4df6d727967f4489c66bc0921b1d6e.tar.gz
gdb-24f46f126f4df6d727967f4489c66bc0921b1d6e.tar.bz2
gdb/testsuite: Fix file location for gdb.base/backtrace-through-cu-nodebug
The newly added test gdb.base/backtrace-through-cu-nodebug.exp had a problem in the call to gdb_compile, that caused the .o files to be outputted in the GDB file tree. This commit fixes the issues in the calls. Reported-By: Tom de Vries <tdevries@suse.de> Approved-By: Tom de Vries <tdevries@suse.de>
-rw-r--r--gdb/testsuite/gdb.base/backtrace-through-cu-nodebug.exp14
1 files changed, 7 insertions, 7 deletions
diff --git a/gdb/testsuite/gdb.base/backtrace-through-cu-nodebug.exp b/gdb/testsuite/gdb.base/backtrace-through-cu-nodebug.exp
index d6e6865..53bf642 100644
--- a/gdb/testsuite/gdb.base/backtrace-through-cu-nodebug.exp
+++ b/gdb/testsuite/gdb.base/backtrace-through-cu-nodebug.exp
@@ -17,8 +17,8 @@
# trace goes through a function with no debug information.
standard_testfile -caller.c -main.c
-set objmainfile ${testfile}-main.o
-set objcallerfile ${testfile}-caller.o
+set objmainfile [standard_output_file ${testfile}-main.o]
+set objcallerfile [standard_output_file ${testfile}-caller.o]
# Recompile the inferior with or without CFI information, then run the
# inferior until the point where the important test starts.
@@ -28,7 +28,7 @@ proc prepare_test {has_cfi} {
if {$has_cfi} {
set extension "cfi"
if {[gdb_compile "${srcdir}/${subdir}/${srcfile}" \
- "${srcdir}/${subdir}/${objcallerfile}" \
+ "${objcallerfile}" \
object [list {additional_flags=-fomit-frame-pointer \
-funwind-tables -fasynchronous-unwind-tables}]] != "" } {
untested "couldn't compile with cfi"
@@ -37,7 +37,7 @@ proc prepare_test {has_cfi} {
} else {
set extension "no-cfi"
if {[gdb_compile "${srcdir}/${subdir}/${srcfile}" \
- "${srcdir}/${subdir}/${objcallerfile}" \
+ "${objcallerfile}" \
object [list {additional_flags=-fomit-frame-pointer \
-fno-unwind-tables \
-fno-asynchronous-unwind-tables}]] != "" } {
@@ -45,8 +45,8 @@ proc prepare_test {has_cfi} {
return false
}
}
- if {[gdb_compile [list "${srcdir}/${subdir}/${objmainfile}" \
- "${srcdir}/${subdir}/${objcallerfile}"] \
+ if {[gdb_compile [list "${objmainfile}" \
+ "${objcallerfile}"] \
"${binfile}-${extension}" binfile {}] != ""} {
untested "couldn't link object files"
return false
@@ -66,7 +66,7 @@ proc prepare_test {has_cfi} {
}
if {[gdb_compile "${srcdir}/${subdir}/${srcfile2}" \
- "${srcdir}/${subdir}/${objmainfile}" \
+ "${objmainfile}" \
object {debug}] != "" } {
untested "couldn't compile main file"
return