1 # Copyright 2021-2024 Free Software Foundation, Inc. 2 3 # This file is part of GDB. 4 5 # This program is free software; you can redistribute it and/or modify 6 # it under the terms of the GNU General Public License as published by 7 # the Free Software Foundation; either version 3 of the License, or 8 # (at your option) any later version. 9 10 # This program is distributed in the hope that it will be useful, 11 # but WITHOUT ANY WARRANTY; without even the implied warranty of 12 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 # GNU General Public License for more details. 14 15 # You should have received a copy of the GNU General Public License 16 # along with this program. If not, see <http://www.gnu.org/licenses/>. 17 18 # Test that when "amdgpu precise-memory" is off, hitting a SIGSEGV shows a 19 # warning about the stop location maybe being inaccurate. 20 21 load_lib rocm.exp 22 23 require allow_hipcc_tests 24 25 standard_testfile .cpp 26 27 if {[build_executable "failed to prepare" $testfile $srcfile {debug hip}]} { 28 return 29 } 30 31 proc do_test { } { 32 clean_restart $::binfile 33 34 with_rocm_gpu_lock { 35 if ![runto_main] { 36 return 37 } 38 39 gdb_test_no_output "set amdgpu precise-memory off" 40 gdb_test "continue" \ 41 "SIGSEGV, Segmentation fault.*Warning: precise memory violation signal reporting is not enabled.*" 42 } 43 } 44 45 do_test 46