With test-case gdb.base/until-trailing-insns.exp and Tcl 9.0, I run into:
...
ERROR: tcl error sourcing gdb.base/until-trailing-insns.exp.
ERROR: tcl error code TCL LOOKUP VARNAME Dwarf::_line_unit_version
ERROR: can't read "Dwarf::_line_unit_version": no such variable
while executing
"if { $Dwarf::_line_unit_version >= 5 } {
return [expr {[llength $_line_include_dirs] - 1}]
} else {
return [llength $_line_include_dirs]
..."
(procedure "include_dir" line 5)
...
Fix this by dropping the Dwarf prefix.
Approved-By: Tom Tromey <tom@tromey.com>
Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=33948
variable _line_include_dirs
lappend _line_include_dirs $dirname
- if { $Dwarf::_line_unit_version >= 5 } {
+ variable _line_unit_version
+ if { $_line_unit_version >= 5 } {
return [expr {[llength $_line_include_dirs] - 1}]
} else {
return [llength $_line_include_dirs]
lappend _line_file_names $filename $diridx
set nr_filenames [expr {[llength $_line_file_names] / 2}]
- if { $Dwarf::_line_unit_version >= 5 } {
+ variable _line_unit_version
+ if { $_line_unit_version >= 5 } {
return [expr {$nr_filenames - 1}]
} else {
return $nr_filenames