Files
TheRock/debug-tools/rocgdb/source/gdb/testsuite/gdb.base/langs.exp
T
derek.holloway 7502bf64a4
CodeQL / Analyze (actions) (push) Canceled after 0s
CodeQL / Analyze (python) (push) Canceled after 0s
pre-commit / pre-commit (push) Canceled after 0s
Multi-Arch CI / setup (push) Canceled after 0s
Publish build_manylinux_x86_64 images / publish_build_manylinux_x86_64 (push) Canceled after 0s
Setup (Multi-Arch) / setup (push) Canceled after 0s
Multi-Arch CI / Linux::${{ fromJSON(needs.setup.outputs.linux_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubi10 image / publish_no_rocm_image_ubi10 (push) Canceled after 0s
Multi-Arch CI / Windows::${{ fromJSON(needs.setup.outputs.windows_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Multi-Arch CI / Manifest Diff (push) Canceled after 0s
TheRock Manifest Diff Report / Generate Manifest Diff Report (push) Canceled after 0s
Multi-Arch CI / CI Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_ocl_rt images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_rocgdb images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Unit Tests / Unit Tests :: ubuntu-24.04 (push) Canceled after 0s
Unit Tests / Unit Tests :: windows-2022 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_media (push) Canceled after 0s
Unit Tests / Unit Tests Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_openmpi (push) Canceled after 0s
Flatten subprojects into a single base monorepo
2026-09-02 16:34:47 -07:00

124 lines
4.0 KiB
Plaintext

# Copyright (C) 1997-2024 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
standard_testfile langs0.c langs1.c langs2.c
if [is_remote host] {
remote_download host ${srcdir}/${subdir}/langs1.f
remote_download host ${srcdir}/${subdir}/langs2.cxx
}
if {[prepare_for_testing "failed to prepare" ${testfile} \
[list $srcfile $srcfile2 $srcfile3] {debug}]} {
return -1
}
set oldtimeout $timeout
set timeout 10
# Some tests require GCC.
set gcc_compiled [is_c_compiler_gcc]
gdb_test_multiple "b -qualified langs0" "break on nonexistent function" {
-re "Function \"langs0\" not defined\..*Make breakpoint pending on future shared library load.*y or .n.. $" {
gdb_test "n" "" "break on nonexistent function"
}
-re "Breakpoint .* (deferred).*$gdb_prompt $" {
pass "break on nonexistent function"
}
}
# TODO: Since there variables are now constants, we can cleanup the test,
# remove some dead code.
set isfixed 0
set foo_func foo__Fi
set do_func langs0__2do
if {[runto csub]} {
if { !$isfixed } { set lang c }
gdb_test "show language" "currently $lang\".*" \
"show language at csub"
gdb_test "bt" "#0.*csub.*#1.*(foo|$foo_func) \\(.*#2.*cppsub_ .*#3.*fsub.*#4.*$do_func \\(.*#5 \[0-9a-fx\]* in main.*" "backtrace"
if { !$isfixed } { set lang c\\+\\+; set ext cxx }
if {!$gcc_compiled} { setup_xfail "rs6000-*-*" }
gdb_test "up" ".* in (foo|$foo_func).* at .*langs2\\.$ext.*return csub \\(.*" \
"up to foo"
gdb_test "show language" "currently $lang.*" \
"show language at foo"
if {!$gcc_compiled} { setup_xfail "rs6000-*-*" }
gdb_test "up" ".* in cppsub_ .* at .*langs2\\.$ext.*return foo \\(.*" \
"up to cppsub_"
gdb_test "show language" "currently $lang.*" \
"show language at cppsub_"
if { !$isfixed } { set lang fortran }
if {!$gcc_compiled} { setup_xfail "rs6000-*-*" }
gdb_test "up" ".* in fsub.* at .*langs1\\.f.*" \
"up to fsub"
gdb_test "show language" "currently $lang.*" \
"show language at fsub"
if { !$isfixed } { set lang c }
gdb_test "up" ".* in $do_func .* at .*langs0\\.c.*return fsub.*" \
"up to langs0__2do"
gdb_test "show language" "currently $lang\".*" \
"show language at langs0__2do"
gdb_test "up" ".* in main .* at .*langs0\\.c.*if \\(langs0__2do \\(.*" \
"up to main"
gdb_test "show language" "currently $lang\".*" \
"show language at main"
if [target_info exists gdb,noresults] { return }
gdb_continue_to_end "first session"
}
clean_restart $binfile
# Try exercising the "minimal" language a bit...
if {[runto csub]} {
# Also test warn-language-frame-mismatch.
gdb_test_no_output "set warn-language-frame-mismatch off"
gdb_test_no_output "set lang minimal" "set lang to minimal"
gdb_test "print x" " = 5000" "print parameter value"
# Ensure this at least does not crash.
gdb_test_no_output "set language unknown"
gdb_test "print x" \
"expression parsing not implemented for language .Unknown." \
"expression parsing does not crash for unknown"
gdb_test_no_output "set lang auto" \
"set lang back to auto for verbose test"
gdb_test_no_output "set verbose on"
if { !$isfixed } { set lang c\\+\\+; set ext cxx }
if {!$gcc_compiled} { setup_xfail "rs6000-*-*" }
gdb_test "up" \
".* in (foo|$foo_func).* at .*langs2\\.$ext.*return csub \\(.*Current language: auto.*" \
"up to foo when verbose"
}
set timeout $oldtimeout