mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-23 03:29:47 +08:00
gdb/testsuite: add some logging in Term::_check_box
I was diagnosing some problem with a TUI test case, which lead me to improve the logging of _check_box a bit. It did help me, so I think it would be nice to have it upstream. gdb/testsuite/ChangeLog: * lib/tuiterm.exp (Term) <_check_box>: Improve logging. Change-Id: I887e83c02507d6c59c991e17f795c844ed63bacf
This commit is contained in:
@ -1,3 +1,7 @@
|
|||||||
|
2021-06-09 Simon Marchi <simon.marchi@polymtl.ca>
|
||||||
|
|
||||||
|
* lib/tuiterm.exp (Term) <_check_box>: Improve logging.
|
||||||
|
|
||||||
2021-06-08 Lancelot Six <lsix@lancelotsix.com>
|
2021-06-08 Lancelot Six <lsix@lancelotsix.com>
|
||||||
|
|
||||||
* gdb.base/premature-dummy-frame-removal.py (TestUnwinder): Use
|
* gdb.base/premature-dummy-frame-removal.py (TestUnwinder): Use
|
||||||
|
@ -729,17 +729,26 @@ namespace eval Term {
|
|||||||
set x2 [expr {$x + $width - 1}]
|
set x2 [expr {$x + $width - 1}]
|
||||||
set y2 [expr {$y + $height - 1}]
|
set y2 [expr {$y + $height - 1}]
|
||||||
|
|
||||||
if {[get_char $x $y] != "+"} {
|
verbose -log "_check_box x=$x, y=$y, x2=$x2, y2=$y2, width=$width, height=$height"
|
||||||
return "ul corner"
|
|
||||||
|
set c [get_char $x $y]
|
||||||
|
if {$c != "+"} {
|
||||||
|
return "ul corner is $c, not +"
|
||||||
}
|
}
|
||||||
if {[get_char $x $y2] != "+"} {
|
|
||||||
return "ll corner"
|
set c [get_char $x $y2]
|
||||||
|
if {$c != "+"} {
|
||||||
|
return "ll corner is $c, not +"
|
||||||
}
|
}
|
||||||
if {[get_char $x2 $y] != "+"} {
|
|
||||||
return "ur corner"
|
set c [get_char $x2 $y]
|
||||||
|
if {$c != "+"} {
|
||||||
|
return "ur corner is $c, not +"
|
||||||
}
|
}
|
||||||
if {[get_char $x2 $y2] != "+"} {
|
|
||||||
return "lr corner"
|
set c [get_char $x2 $y2]
|
||||||
|
if {$c != "+"} {
|
||||||
|
return "lr corner is $c, not +"
|
||||||
}
|
}
|
||||||
|
|
||||||
# Note we do not check the full horizonal borders of the box.
|
# Note we do not check the full horizonal borders of the box.
|
||||||
@ -747,21 +756,26 @@ namespace eval Term {
|
|||||||
# it is overlapped by some other border. However, at most a
|
# it is overlapped by some other border. However, at most a
|
||||||
# title should appear as '+-VERY LONG TITLE-+', so we can
|
# title should appear as '+-VERY LONG TITLE-+', so we can
|
||||||
# check for the '+-' on the left, and '-+' on the right.
|
# check for the '+-' on the left, and '-+' on the right.
|
||||||
if {[get_char [expr {$x + 1}] $y] != "-"} {
|
set c [get_char [expr {$x + 1}] $y]
|
||||||
return "ul title padding"
|
if {$c != "-"} {
|
||||||
|
return "ul title padding is $c, not -"
|
||||||
}
|
}
|
||||||
|
|
||||||
if {[get_char [expr {$x2 - 1}] $y] != "-"} {
|
set c [get_char [expr {$x2 - 1}] $y]
|
||||||
return "ul title padding"
|
if {$c != "-"} {
|
||||||
|
return "ul title padding is $c, not -"
|
||||||
}
|
}
|
||||||
|
|
||||||
# Now check the vertical borders.
|
# Now check the vertical borders.
|
||||||
for {set i [expr {$y + 1}]} {$i < $y2 - 1} {incr i} {
|
for {set i [expr {$y + 1}]} {$i < $y2 - 1} {incr i} {
|
||||||
if {[get_char $x $i] != "|"} {
|
set c [get_char $x $i]
|
||||||
return "left side $i"
|
if {$c != "|"} {
|
||||||
|
return "left side $i is $c, not |"
|
||||||
}
|
}
|
||||||
if {[get_char $x2 $i] != "|"} {
|
|
||||||
return "right side $i"
|
set c [get_char $x2 $i]
|
||||||
|
if {$c != "|"} {
|
||||||
|
return "right side $i is $c, not |"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user