Re: [PATCH 3/7] [gdb/testsuite] Log on return in Term::_log_cur

Tom de Vries
2025-07-24T07:19:13Z

On 7/23/25 20:28, Tom Tromey wrote:
>>>>>> "Tom" == Tom de Vries <tdevries@suse.de> writes:
>
> Tom> + set code [catch {uplevel $body} result]
>
> Tom> + if { $code == 1 } {
> Tom> + global errorInfo errorCode
> Tom> + return -code $code -errorinfo $errorInfo -errorcode $errorCode $result
> Tom> + } else {
> Tom> + return -code $code $result
> Tom> + }
>
> I suspect this could be:
>
> catch {uplevel $body} result options
>
> and then just
>
> return -options $options $result

Hi Tom,

thanks for the review.

You're right, if we can assume tcl 8.5 or later.

It's not clear what the currently supported minimal version is, so I
filed a PR about this (
https://sourceware.org/bugzilla/show_bug.cgi?id=33205 ), but probably
it's 8.4 (with the exception of ada testing, which needs 8.5 since 2015,
gdb 7.11).

I've committed this as is.

Thanks,
- Tom