From fee476d2fc5ef6f6f0d38f69ebd524292b6345fb Mon Sep 17 00:00:00 2001 From: Tom de Vries Date: Fri, 8 Aug 2025 13:51:00 +0200 Subject: [gdb/testsuite] Initial TERM=ansis support in tuiterm While investigating using TERM=ansiw for freebsd, I also came across TERM=ansis which unlike ansiw is present on both linux and freebsd. Add initial support for TERM=ansi in tuiterm: - handle ansis in Term::_have_bw - add Term::_csi_x to support (well, ignore) DECREQTPARM (Request Terminal Parameters) This is sufficient to make the TUI testsuite pass on x86_64-freebsd. --- gdb/testsuite/lib/tuiterm.exp | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'gdb') diff --git a/gdb/testsuite/lib/tuiterm.exp b/gdb/testsuite/lib/tuiterm.exp index 1e18a7a..f4a8702 100644 --- a/gdb/testsuite/lib/tuiterm.exp +++ b/gdb/testsuite/lib/tuiterm.exp @@ -92,7 +92,9 @@ namespace eval Term { # Return 1 if tuiterm has the bw/auto_left_margin enabled. proc _have_bw {} { - return [string equal $Term::_TERM "ansiw"] + return [expr \ + [string equal $Term::_TERM "ansiw"] \ + || [string equal $Term::_TERM "ansis"]] } # Backspace. @@ -701,6 +703,14 @@ namespace eval Term { } } + # Request Terminal Parameters (DECREQTPARM) + # + # https://invisible-island.net/xterm/ctlseqs/ctlseqs.html + # https://vt100.net/docs/vt100-ug/chapter3.html + proc _csi_x {} { + # Ignore. + } + # Insert string at the cursor location. proc _insert {str} { _log_cur "Inserted string '$str'" { -- cgit v1.1