Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Tom de Vries <tdevries@suse.de>
To: Simon Marchi <simon.marchi@polymtl.ca>, gdb-patches@sourceware.org
Subject: Re: [committed][gdb/testsuite] Fix tcl error in jit-elf-helpers.exp
Date: Mon, 25 May 2020 12:29:35 +0200	[thread overview]
Message-ID: <101108ab-80a5-ad64-adcd-8b497359514b@suse.de> (raw)
In-Reply-To: <77635b98-dd74-41d7-42d3-ae3b88f896cf@polymtl.ca>

[-- Attachment #1: Type: text/plain, Size: 869 bytes --]

On 24-05-2020 16:24, Simon Marchi wrote:
> On 2020-05-12 8:43 a.m., Tom de Vries wrote:
>> @@ -94,8 +96,10 @@ proc compile_and_download_n_jit_so {jit_solib_basename jit_solib_srcfile count}
>>  	    additional_flags=-DFUNCTION_NAME=[format "jit_function_%04d" $i] \
>>  	    additional_flags=-Xlinker \
>>  	    additional_flags=-Ttext-segment=$addr]
>> -	if { [gdb_compile_shlib ${jit_solib_srcfile} ${binfile} $options] != "" } {
>> -	    untested "failed to compile ${jit_solib_basename}.c as a shared library"
>> +	if { [gdb_compile_shlib ${jit_solib_srcfile} ${binfile} \
>> +		  $options] != "" } {
>> +	    set f [file tail $binfile]
>> +	    untested "failed to compile shared library $binfile"
>>  	    return -1
> 
> I just noticed, should it be `$f` instead of `$binfile` here?

Yes, thanks for noticing.

Fixed in attached patch, committed.

Thanks,
- Tom


[-- Attachment #2: 0001-gdb-testsuite-Fix-var-use-in-compile_and_download_n_jit_so.patch --]
[-- Type: text/x-patch, Size: 1317 bytes --]

[gdb/testsuite] Fix var use in compile_and_download_n_jit_so

In commit 1b59ca1cf1 "[gdb/testsuite] Fix tcl error in jit-elf-helpers.exp", I
introduced a variable f in compile_and_download_n_jit_so, to be used in the
untested message, but actually variable binfile was used instead:
...
+           set f [file tail $binfile]
+           untested "failed to compile shared library $binfile"
...

Fix this by using $f in the untested message.

Tested on x86_64-linux.

gdb/testsuite/ChangeLog:

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

	* lib/jit-elf-helpers.exp (compile_and_download_n_jit_so): Use $f
	instead of $binfile in the untested message.

---
 gdb/testsuite/lib/jit-elf-helpers.exp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gdb/testsuite/lib/jit-elf-helpers.exp b/gdb/testsuite/lib/jit-elf-helpers.exp
index 62672f4ab3..f1e8ad7785 100644
--- a/gdb/testsuite/lib/jit-elf-helpers.exp
+++ b/gdb/testsuite/lib/jit-elf-helpers.exp
@@ -99,7 +99,7 @@ proc compile_and_download_n_jit_so {jit_solib_basename jit_solib_srcfile count}
 	if { [gdb_compile_shlib ${jit_solib_srcfile} ${binfile} \
 		  $options] != "" } {
 	    set f [file tail $binfile]
-	    untested "failed to compile shared library $binfile"
+	    untested "failed to compile shared library $f"
 	    return -1
 	}
 

      reply	other threads:[~2020-05-25 10:29 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-12 12:43 Tom de Vries
2020-05-24 14:24 ` Simon Marchi
2020-05-25 10:29   ` Tom de Vries [this message]

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=101108ab-80a5-ad64-adcd-8b497359514b@suse.de \
    --to=tdevries@suse.de \
    --cc=gdb-patches@sourceware.org \
    --cc=simon.marchi@polymtl.ca \
    /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