diff options
author | Tom de Vries <tdevries@suse.de> | 2021-08-27 16:38:53 +0200 |
---|---|---|
committer | Tom de Vries <tdevries@suse.de> | 2021-08-27 16:38:53 +0200 |
commit | 698c974ffc97f845f65d2e93d31bdbb1b24d6caf (patch) | |
tree | 89f00383fa6bd96cc6a2ba1a1a541a9a4b8a7371 /gdb/dwarf2/index-write.c | |
parent | 77d63f99d67dd89cbcc99e9013dc0fc02930e026 (diff) | |
download | binutils-698c974ffc97f845f65d2e93d31bdbb1b24d6caf.zip binutils-698c974ffc97f845f65d2e93d31bdbb1b24d6caf.tar.gz binutils-698c974ffc97f845f65d2e93d31bdbb1b24d6caf.tar.bz2 |
[gdb/testsuite] Add label option to proc cu
We can use current dwarf assembly infrastructure to declare a label that marks
the start of the CU header:
...
declare_labels header_start_cu_a
_section ".debug_info"
header_start_cu_a : cu {} {
}
_section ".debug_info"
header_start_cu_b : cu {} {
}
...
on the condition that we switch to the .debug_info section before, which makes
this style of use fragile.
Another way to achieve the same is to use the label as generated by the cu
proc itself:
...
variable _cu_label
cu {} {
}
set header_start_cu_a $_cu_label
cu {} {
}
set header_start_cu_b $_cu_label
...
but again that seems fragile given that adding a new CU inbetween will
silently result in the wrong value for the label.
Add a label option to proc cu such that we can simply do:
...
cu { label header_start_cu_a } {
}
cu { label header_start_cu_b } {
}
...
Tested on x86_64-linux.
Diffstat (limited to 'gdb/dwarf2/index-write.c')
0 files changed, 0 insertions, 0 deletions