diff options
Diffstat (limited to 'gdb/testsuite/gdb.base/default.exp')
-rw-r--r-- | gdb/testsuite/gdb.base/default.exp | 55 |
1 files changed, 47 insertions, 8 deletions
diff --git a/gdb/testsuite/gdb.base/default.exp b/gdb/testsuite/gdb.base/default.exp index 01e3cc1..b5e64c2 100644 --- a/gdb/testsuite/gdb.base/default.exp +++ b/gdb/testsuite/gdb.base/default.exp @@ -759,7 +759,6 @@ set show_conv_list \ {$_probe_arg10 = <error: No frame selected>} \ {$_probe_arg11 = <error: No frame selected>} \ {$_cimag = <internal function _cimag>} \ - {$_colorsupport = "monochrome"} \ {$_creal = <internal function _creal>} \ {$_isvoid = <internal function _isvoid>} \ {$_shell = <internal function _shell>} \ @@ -767,11 +766,9 @@ set show_conv_list \ {$_gdb_maint_setting = <internal function _gdb_maint_setting>} \ {$_gdb_setting_str = <internal function _gdb_setting_str>} \ {$_gdb_setting = <internal function _gdb_setting>} \ - {$_gdb_major = 17} \ - {$_gdb_minor = 1} \ {$_shell_exitsignal = void} \ {$_shell_exitcode = 0} \ - {$_active_linker_namespaces = 1} \ + {$_linker_namespace_count = 0} \ {$_linker_namespace = <error: No registers.>}\ } if [allow_python_tests] { @@ -788,10 +785,52 @@ if [allow_python_tests] { {$_any_caller_matches = <internal function _any_caller_matches>} \ } } -gdb_test_list_exact "show convenience" "show convenience" \ - "\[^\r\n\]+\[\r\n\]+" \ - "\[^\r\n\]+" \ - $show_conv_list + +set lines [gdb_get_lines_no_pass "show convenience"] +set matches 0 +set all_found 1 +foreach s $show_conv_list { + if {  $lines] } { + verbose -log "didn't match: '$s'" + set all_found 0 + break + } + incr matches +} + +set re_var [string_to_regexp {$_colorsupport}] +if { [is_remote host] } { + set re_val {[^\r\n]+} +} else { + set re_val [string_to_regexp {"monochrome"}] +} +if { [regexp "$re_var = $re_val" $lines] } { + incr matches +} else { + set all_found 0 +} + +set re_vars \ + [list \ + [string_to_regexp {$_gdb_major}] \ + [string_to_regexp {$_gdb_minor}]] +foreach re_var $re_vars { + if { [regexp "$re_var = $decimal" $lines] } { + incr matches + } else { + set all_found 0 + } +} + +if { [regexp [string_to_regexp {$_tlb = void}] $lines] } { + incr matches +} else { + # Convenience variable _tlb is added only if support for windows targets + # is enabled. Don't complain if it's missing. +} + +gdb_assert { $all_found && $matches == [count_newlines $lines] } \ + "show convenience" #test show directories gdb_test "show directories" "Source directories searched: .cdir\[:;\].cwd" |