aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite/lib/dwarf.exp
diff options
context:
space:
mode:
authorTom de Vries <tdevries@suse.de>2022-09-30 05:58:43 +0200
committerTom de Vries <tdevries@suse.de>2022-09-30 05:58:43 +0200
commit511f4ff4d9bcaed1ed53ee64211d7c9f80f07fed (patch)
tree8eb90019a2a5f194d12afa25b3f1914184a70f2a /gdb/testsuite/lib/dwarf.exp
parent137c886e9a624f68cba212ebdb156298957c25c4 (diff)
downloadgdb-511f4ff4d9bcaed1ed53ee64211d7c9f80f07fed.zip
gdb-511f4ff4d9bcaed1ed53ee64211d7c9f80f07fed.tar.gz
gdb-511f4ff4d9bcaed1ed53ee64211d7c9f80f07fed.tar.bz2
[gdb/testsuite] Add aranges to gdb.dwarf2/dw2-dir-file-name.exp
Since commit 52b920c5d20 ("[gdb/testsuite] Fix gdb.dwarf2/dw2-dir-file-name.exp for ppc64le"), the test-case fails with target board cc-with-debug-names, due to missing .debug_aranges info. Add the missing .debug_aranges info. Also add a file_id option to Dwarf::assemble, to make it possible to contribute to an already open file. Tested on x86_64-linux.
Diffstat (limited to 'gdb/testsuite/lib/dwarf.exp')
-rw-r--r--gdb/testsuite/lib/dwarf.exp15
1 files changed, 13 insertions, 2 deletions
diff --git a/gdb/testsuite/lib/dwarf.exp b/gdb/testsuite/lib/dwarf.exp
index 6db0ed2..b85ec29 100644
--- a/gdb/testsuite/lib/dwarf.exp
+++ b/gdb/testsuite/lib/dwarf.exp
@@ -3193,6 +3193,9 @@ namespace eval Dwarf {
# - the name of the file where the generated assembly
# code is written.
# default = "".
+ # file_id <tcl channel identifier>
+ # - open file where the generated assemble core is written.
+ # default = "".
# add_dummy_cus <0|1>
# - Whether to add dummy CUs before and after the CUs
# added in the BODY.
@@ -3233,6 +3236,7 @@ namespace eval Dwarf {
parse_options {
{ filename "" }
+ { file_id "" }
{ add_dummy_cus 1 }
}
@@ -3241,7 +3245,12 @@ namespace eval Dwarf {
set _initialized 1
}
- set _output_file [open $filename w]
+ if { $file_id != "" } {
+ set _output_file $file_id
+ } else {
+ set _output_file [open $filename w]
+ }
+
set _cu_count -1
_empty_array _deferred_output
set _defer ""
@@ -3274,7 +3283,9 @@ namespace eval Dwarf {
_write_deferred_output
- catch {close $_output_file}
+ if { $file_id == "" } {
+ catch {close $_output_file}
+ }
set _output_file {}
}
}