# Copyright 1997-2024 Free Software Foundation, Inc. # Copyright (C) 2021-2024 Advanced Micro Devices, Inc. All rights reserved. # 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 . # This is a test of gdb's ability to follow a process through a # Unix exec() system call. # Until "catch exec" is implemented on other targets... # load_lib rocm.exp require allow_hip_tests if { ![istarget "*-linux*"] } then { continue } standard_testfile .c set testfile2 "bit-extract" set srcfile2 ${testfile2}.cpp set binfile2 [standard_output_file ${testfile2}] if {[prepare_for_testing "failed to prepare ${testfile2}" $testfile2 $srcfile2 {debug hip}]} { return -1 } if {[prepare_for_testing "failed to prepare ${testfile}" $testfile $srcfile {debug}]} { return -1 } with_rocm_gpu_lock { if ![runto_main] { fail "can't run to main" return -1 } delete_breakpoints # Set breakpoing in device code. gdb_breakpoint "bit_extract_kernel" "allow-pending" gdb_continue_to_breakpoint "bit_extract_kernel" }