public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
* [committed][gdb/testsuite] Fix incorrect string concat in jit-elf.exp
@ 2020-05-12 13:00 Tom de Vries
  2020-05-12 14:14 ` Simon Marchi
  0 siblings, 1 reply; 10+ messages in thread
From: Tom de Vries @ 2020-05-12 13:00 UTC (permalink / raw)
  To: gdb-patches

Hi,

When running test-case gdb.base/jit-elf.exp with target board
cc-with-gdb-index, we get:
...
spawn -ignore SIGHUP gdb/contrib/cc-with-tweaks.sh -i gcc \
  -fno-stack-protector src/gdb/testsuite/gdb.base/jit-elf-main.c \
  -fdiagnostics-color=never -DATTACH=1 -DLOAD_ADDRESS=0x7000000 \
  -DLOAD_INCREMENT=0x1000000 -g -lm \
  -o outputs/gdb.base/jit-elf/jit-elf-main"-attach"^M
outputs/gdb.base/jit-elf/.tmp/jit-elf-main-attach: \
  No such file or directory.^M
output is:
outputs/gdb.base/jit-elf/.tmp/jit-elf-main-attach: \
  No such file or directory.^M

gdb compile failed, outputs/gdb.base/jit-elf/.tmp/jit-elf-main-attach: \
  No such file or directory.
UNTESTED: gdb.base/jit-elf.exp: failed to compile jit-elf-main"-attach"
...

The problem is a string concat in jit-elf.exp:
...
  ${main_binfile}"-attach"
...
which is intended to generate string 'jit-elf-main-attach' but instead
generates string 'jit-elf-main"-attach"'.

Fix this by using "${main_binfile}-attach" instead.

Tested on x86_64-linux.

Committed to trunk.

Thanks,
- Tom

[gdb/testsuite] Fix incorrect string concat in jit-elf.exp

gdb/testsuite/ChangeLog:

2020-05-12  Tom de Vries  <tdevries@suse.de>

	* gdb.base/jit-elf.exp: Fix string concat.

---
 gdb/testsuite/gdb.base/jit-elf.exp | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/gdb/testsuite/gdb.base/jit-elf.exp b/gdb/testsuite/gdb.base/jit-elf.exp
index 68196a0a88..78a19c2c9a 100644
--- a/gdb/testsuite/gdb.base/jit-elf.exp
+++ b/gdb/testsuite/gdb.base/jit-elf.exp
@@ -147,7 +147,7 @@ if { [compile_jit_main ${main_srcfile} ${main_binfile} {}] == 0 } {
 # registered.  We reuse the normal test, and detach/reattach at
 # specific interesting points.
 if {[can_spawn_for_attach]} {
-    if { [compile_jit_main ${main_srcfile} ${main_binfile}"-attach" \
+    if { [compile_jit_main ${main_srcfile} "${main_binfile}-attach" \
 	    {additional_flags=-DATTACH=1}] == 0 } {
 	with_test_prefix attach {
 	    one_jit_test $jit_solibs_target "${hex}  jit_function_0001\[\r\n\]+${hex}  jit_function_0002" 1
@@ -155,7 +155,8 @@ if {[can_spawn_for_attach]} {
     }
 }
 
-if { [compile_jit_main ${main_srcfile} ${main_binfile}"-pie" {additional_flags=-fPIE ldflags=-pie}] == 0 } {
+if { [compile_jit_main ${main_srcfile} "${main_binfile}-pie" \
+	  {additional_flags=-fPIE ldflags=-pie}] == 0 } {
     with_test_prefix PIE {
 	one_jit_test [lindex $jit_solibs_target 0] "${hex}  jit_function_0001" 0
     }

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2020-05-26 20:38 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-12 13:00 [committed][gdb/testsuite] Fix incorrect string concat in jit-elf.exp Tom de Vries
2020-05-12 14:14 ` Simon Marchi
2020-05-12 14:37   ` Strasuns, Mihails
2020-05-13  8:52     ` Tom de Vries
2020-05-13 13:45       ` Simon Marchi
2020-05-26  8:49         ` How to run multiple target boards Tom de Vries
2020-05-26 10:39           ` Pedro Alves
2020-05-26 10:56             ` Tom de Vries
2020-05-26 20:38               ` Simon Marchi
2020-05-13  8:44   ` [committed][gdb/testsuite] Fix incorrect string concat in jit-elf.exp 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).