public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
* [PATCH] [gdb/contrib] Remove superfluous .alt file after dwz invocation in cc-with-tweaks.sh
@ 2019-04-11 10:26 Tom de Vries
  2019-04-23 13:42 ` [committed] " Tom de Vries
  2019-04-24 19:23 ` [PATCH] " Tom Tromey
  0 siblings, 2 replies; 3+ messages in thread
From: Tom de Vries @ 2019-04-11 10:26 UTC (permalink / raw)
  To: gdb-patches, Pedro Alves

Hi,

The -m option of cc-with-tweaks.sh sets want_multi to true, invoking dwz like
this:
...
elif [ "$want_multi" = true ]; then
    cp $output_file ${output_file}.alt
    $DWZ -m ${output_file}.dwz "$output_file" ${output_file}.alt \
        > /dev/null 2>&1
fi
...

The problem that is being solved here, is that we want to test dwz in
multifile mode, which requires more than one input file, while we only have
(at the scope of cc-with-tweaks.sh) one executable.  We handle this by copying
the executable and offering this as a second input (and using a copy has the
additional benefit that it maximally enables dwz transformation).

However, after the dwz invocation, the copy is no longer used, and the
presence of the file actually causes a test regression:
...
FAIL: gdb.base/jit-so.exp: test jit-reader-load filename completion
...

Fix this by removing the superflous copy after dwz invocation.

Tested on x86_64-linux.

OK for trunk?

Thanks,
- Tom

[gdb/contrib] Remove superfluous .alt file after dwz invocation in cc-with-tweaks.sh

gdb/ChangeLog:

2019-04-11  Tom de Vries  <tdevries@suse.de>

	PR gdb/24438
	* contrib/cc-with-tweaks.sh: Remove superfluous .alt file after dwz
	invocation.

---
 gdb/contrib/cc-with-tweaks.sh | 1 +
 1 file changed, 1 insertion(+)

diff --git a/gdb/contrib/cc-with-tweaks.sh b/gdb/contrib/cc-with-tweaks.sh
index f6bfa16565..33c6322138 100755
--- a/gdb/contrib/cc-with-tweaks.sh
+++ b/gdb/contrib/cc-with-tweaks.sh
@@ -180,6 +180,7 @@ if [ "$want_dwz" = true ]; then
 elif [ "$want_multi" = true ]; then
     cp $output_file ${output_file}.alt
     $DWZ -m ${output_file}.dwz "$output_file" ${output_file}.alt > /dev/null 2>&1
+    rm -f ${output_file}.alt
 fi
 
 if [ "$want_dwp" = true ]; then

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

* [committed] [gdb/contrib] Remove superfluous .alt file after dwz invocation in cc-with-tweaks.sh
  2019-04-11 10:26 [PATCH] [gdb/contrib] Remove superfluous .alt file after dwz invocation in cc-with-tweaks.sh Tom de Vries
@ 2019-04-23 13:42 ` Tom de Vries
  2019-04-24 19:23 ` [PATCH] " Tom Tromey
  1 sibling, 0 replies; 3+ messages in thread
From: Tom de Vries @ 2019-04-23 13:42 UTC (permalink / raw)
  To: gdb-patches, Pedro Alves

Committed as obvious.

Thanks,
- Tom

On 11-04-19 12:26, Tom de Vries wrote:
> Hi,
> 
> The -m option of cc-with-tweaks.sh sets want_multi to true, invoking dwz like
> this:
> ...
> elif [ "$want_multi" = true ]; then
>     cp $output_file ${output_file}.alt
>     $DWZ -m ${output_file}.dwz "$output_file" ${output_file}.alt \
>         > /dev/null 2>&1
> fi
> ...
> 
> The problem that is being solved here, is that we want to test dwz in
> multifile mode, which requires more than one input file, while we only have
> (at the scope of cc-with-tweaks.sh) one executable.  We handle this by copying
> the executable and offering this as a second input (and using a copy has the
> additional benefit that it maximally enables dwz transformation).
> 
> However, after the dwz invocation, the copy is no longer used, and the
> presence of the file actually causes a test regression:
> ...
> FAIL: gdb.base/jit-so.exp: test jit-reader-load filename completion
> ...
> 
> Fix this by removing the superflous copy after dwz invocation.
> 
> Tested on x86_64-linux.
> 
> OK for trunk?
> 
> Thanks,
> - Tom
> 
> [gdb/contrib] Remove superfluous .alt file after dwz invocation in cc-with-tweaks.sh
> 
> gdb/ChangeLog:
> 
> 2019-04-11  Tom de Vries  <tdevries@suse.de>
> 
> 	PR gdb/24438
> 	* contrib/cc-with-tweaks.sh: Remove superfluous .alt file after dwz
> 	invocation.
> 
> ---
>  gdb/contrib/cc-with-tweaks.sh | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/gdb/contrib/cc-with-tweaks.sh b/gdb/contrib/cc-with-tweaks.sh
> index f6bfa16565..33c6322138 100755
> --- a/gdb/contrib/cc-with-tweaks.sh
> +++ b/gdb/contrib/cc-with-tweaks.sh
> @@ -180,6 +180,7 @@ if [ "$want_dwz" = true ]; then
>  elif [ "$want_multi" = true ]; then
>      cp $output_file ${output_file}.alt
>      $DWZ -m ${output_file}.dwz "$output_file" ${output_file}.alt > /dev/null 2>&1
> +    rm -f ${output_file}.alt
>  fi
>  
>  if [ "$want_dwp" = true ]; then
> 

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

* Re: [PATCH] [gdb/contrib] Remove superfluous .alt file after dwz invocation in cc-with-tweaks.sh
  2019-04-11 10:26 [PATCH] [gdb/contrib] Remove superfluous .alt file after dwz invocation in cc-with-tweaks.sh Tom de Vries
  2019-04-23 13:42 ` [committed] " Tom de Vries
@ 2019-04-24 19:23 ` Tom Tromey
  1 sibling, 0 replies; 3+ messages in thread
From: Tom Tromey @ 2019-04-24 19:23 UTC (permalink / raw)
  To: Tom de Vries; +Cc: gdb-patches, Pedro Alves

>>>>> "Tom" == Tom de Vries <tdevries@suse.de> writes:

Tom> Fix this by removing the superflous copy after dwz invocation.

Tom> Tested on x86_64-linux.

Tom> OK for trunk?

Tom> Thanks,
Tom> - Tom

Tom> [gdb/contrib] Remove superfluous .alt file after dwz invocation in cc-with-tweaks.sh

Tom> gdb/ChangeLog:

Tom> 2019-04-11  Tom de Vries  <tdevries@suse.de>

Tom> 	PR gdb/24438
Tom> 	* contrib/cc-with-tweaks.sh: Remove superfluous .alt file after dwz
Tom> 	invocation.

Thanks, this is ok.

Tom

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

end of thread, other threads:[~2019-04-24 19:23 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-04-11 10:26 [PATCH] [gdb/contrib] Remove superfluous .alt file after dwz invocation in cc-with-tweaks.sh Tom de Vries
2019-04-23 13:42 ` [committed] " Tom de Vries
2019-04-24 19:23 ` [PATCH] " Tom Tromey

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).