From 0ab4b22a01ac6044c4e323e423755d1171f20ec6 Mon Sep 17 00:00:00 2001 From: Tom de Vries Date: Fri, 15 Aug 2025 14:48:10 +0200 Subject: [PATCH] [gdb/testsuite] Add Term::_esc_0x28_B and Term::_esc_0x28_0 Add support for: - Designate G0 Character Set, USASCII ESC ( B - Designate G0 Character Set, DEC Special Character and Line Drawing Set ESC ( 0 --- gdb/testsuite/lib/tuiterm.exp | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/gdb/testsuite/lib/tuiterm.exp b/gdb/testsuite/lib/tuiterm.exp index aac3526d70d..005583db93f 100644 --- a/gdb/testsuite/lib/tuiterm.exp +++ b/gdb/testsuite/lib/tuiterm.exp @@ -172,6 +172,20 @@ proc Term::_ctl_0x0d {} { } } +# Designate G0 Character Set, USASCII (ESC ( B) +# +# https://invisible-island.net/xterm/ctlseqs/ctlseqs.html (see "ESC ( C", case C = B) +proc Term::_esc_0x28_B {} { + _log "ignored: G0: USASCII" +} + +# Designate G0 Character Set, DEC Special Character and Line Drawing Set (ESC ( 0) +# +# https://invisible-island.net/xterm/ctlseqs/ctlseqs.html (see "ESC ( C", case C = 0) +proc Term::_esc_0x28_0 {} { + _log "ignored: G0: DEC Special Character and Line Drawing Set" +} + # Insert Character. # # https://vt100.net/docs/vt510-rm/ICH.html @@ -978,6 +992,12 @@ proc Term::accept_gdb_output { } { _log "wait_for: unsupported escape" error "unsupported escape" } + -re "^\x1b(\[\\(\])(\[a-zA-Z\])" { + scan $expect_out(1,string) %c val + set hexval [format "%02x" $val] + set cmd $expect_out(2,string) + eval _esc_0x${hexval}_$cmd + } -re "^\x1b\\\[(\\??)(\[0-9;\]*)(\[a-zA-Z@`\])" { set prefix $expect_out(1,string) set cmd $expect_out(3,string) -- 2.47.3