Re: [PATCH 6/7] [gdb/testsuite] Use TERM=ansiw in tuiterm for bsd

Tom de Vries
2025-07-24T09:48:12Z

On 7/23/25 20:34, Tom Tromey wrote:
>>>>>> "Tom" == Tom de Vries <tdevries@suse.de> writes:
>
> Tom> So I went looking for an alternative to TERM=ansi on freebsd, and came across
> Tom> TERM=ansiw. Using this didn't work out of the box, but with the fixes in
> Tom> this series it now does.
>
> Tom> I also briefly looked at TERM=ansis, which is interesting because it's
> Tom> available on both linux and freebsd, but ansiw is a better choice for now.
>
> I wonder if we should just give in and switch to xterm.
>

I've filed a PR ( https://sourceware.org/bugzilla/show_bug.cgi?id=33206 ).

> Tom> proc _have_bw {} {
> Tom> + if { [string equal $Term::_TERM "ansiw"] } {
> Tom> + return 1
> Tom> + }
> Tom> return 0
>
> This can be just return [string ... ]
>

Thanks for the review, fixed and pushed.

> It seems like it could just as easily check $env(TERM) and avoid another
> variable as well.

Say we add this to gdb.tui.basic.exp:
...
+puts "$env(TERM)"
Term::clean_restart 24 80 $testfile
+puts "$env(TERM)"
...
and run the test-case, we get:
...
dumb
dumb
...

So that wouldn't work. The env(TERM) var is only set for the duration of
starting gdb.

Thanks,
- Tom