• R/O
  • HTTP
  • SSH
  • HTTPS

コミット

タグ
未設定

よく使われているワード(クリックで追加)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

GNU Binutils with patches for OS216


コミットメタ情報

リビジョン0df0352ad0b64e884977d8251cf1b88b6640600f (tree)
日時2019-09-30 06:58:21
作者Tom de Vries <tdevries@suse...>
コミッターTom de Vries

ログメッセージ

[gdb/contrib] cc-with-tweaks.sh: Create .dwz file in .tmp subdir

When running a test-case gdb.base/foo.exp with cc-with-dwz-m, a file
build/gdb/testsuite/outputs/gdb.base/foo/foo.dwz will be created, alongside
executable build/gdb/testsuite/outputs/gdb.base/foo/foo.

This can cause problems in f.i. test-cases that test file name completion.

Make these problems less likely by moving foo.dwz to a .tmp subdir:
build/gdb/testsuite/outputs/gdb.base/foo/.tmp/foo.dwz.

Tested on x86_64-linux.

gdb/ChangeLog:

2019-09-29 Tom de Vries <tdevries@suse.de>

* contrib/cc-with-tweaks.sh (get_tmpdir): New function.
Use $tmpdir/$(basename "$output_file").dwz instead of
"${output_file}.dwz".

gdb/testsuite/ChangeLog:

2019-09-29 Tom de Vries <tdevries@suse.de>

        • gdb.dwarf2/gdb-index.exp: Handle new location of .dwz file.

変更サマリ

差分

--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,9 @@
1+2019-09-29 Tom de Vries <tdevries@suse.de>
2+
3+ * contrib/cc-with-tweaks.sh (get_tmpdir): New function.
4+ Use $tmpdir/$(basename "$output_file").dwz instead of
5+ "${output_file}.dwz".
6+
17 2019-09-28 Simon Marchi <simon.marchi@polymtl.ca>
28
39 PR gdb/25045
--- a/gdb/contrib/cc-with-tweaks.sh
+++ b/gdb/contrib/cc-with-tweaks.sh
@@ -163,6 +163,12 @@ then
163163 exit 1
164164 fi
165165
166+get_tmpdir ()
167+{
168+ tmpdir=$(dirname "$output_file")/.tmp
169+ mkdir -p "$tmpdir"
170+}
171+
166172 if [ "$want_objcopy_compress" = true ]; then
167173 $OBJCOPY --compress-debug-sections "$output_file"
168174 rc=$?
@@ -202,17 +208,19 @@ if [ "$want_dwz" = true ]; then
202208 ;;
203209 esac
204210 elif [ "$want_multi" = true ]; then
211+ get_tmpdir
212+ dwz_file=$tmpdir/$(basename "$output_file").dwz
205213 # Remove the dwz output file if it exists, so we don't mistake it for a
206214 # new file in case dwz fails.
207- rm -f "${output_file}.dwz"
215+ rm -f "$dwz_file"
208216
209217 cp $output_file ${output_file}.alt
210- $DWZ -m ${output_file}.dwz "$output_file" ${output_file}.alt > /dev/null
218+ $DWZ -m "$dwz_file" "$output_file" ${output_file}.alt > /dev/null
211219 rm -f ${output_file}.alt
212220
213221 # Validate dwz's work by checking if the expected output file exists.
214- if [ ! -f "${output_file}.dwz" ]; then
215- echo "$myname: dwz file ${output_file}.dwz missing."
222+ if [ ! -f "$dwz_file" ]; then
223+ echo "$myname: dwz file $dwz_file missing."
216224 exit 1
217225 fi
218226 fi
--- a/gdb/testsuite/ChangeLog
+++ b/gdb/testsuite/ChangeLog
@@ -1,5 +1,9 @@
11 2019-09-29 Tom de Vries <tdevries@suse.de>
22
3+ * gdb.dwarf2/gdb-index.exp: Handle new location of .dwz file.
4+
5+2019-09-29 Tom de Vries <tdevries@suse.de>
6+
37 * gdb.dwarf2/gdb-index.exp: Use with_test_prefix for second objcopy.
48
59 2019-09-27 Tom de Vries <tdevries@suse.de>
--- a/gdb/testsuite/gdb.dwarf2/gdb-index.exp
+++ b/gdb/testsuite/gdb.dwarf2/gdb-index.exp
@@ -34,8 +34,10 @@ if { [prepare_for_testing "failed to prepare" "${testfile}" \
3434
3535 proc add_gdb_index { program } {
3636 set index_file ${program}.gdb-index
37- set dwz ${program}.dwz
38- set dwz_index_file ${dwz}.gdb-index
37+ set dir [file dirname ${program}]
38+ set filename [file tail ${program}]
39+ set dwz $dir/.tmp/${filename}.dwz
40+ set dwz_index_file $program.dwz.gdb-index
3941 verbose -log "index_file: ${index_file}"
4042 remote_file host delete ${index_file}
4143 remote_file host delete ${dwz_index_file}