RE: [PATCH] gdb/amdgpu: Handle SIGABRT with a higher priority than SIGTRAP
"Aktemur, Baris" <[email protected]>
| Newsgroups | gmane.comp.gdb.patches |
|---|---|
| Message-ID | <DM4PR12MB647068F649B6D5E408C80105F8D22@DM4PR12MB6470.namprd12.prod.outlook.com> |
AMD General
> diff --git a/gdb/testsuite/gdb.rocm/step-abort.exp b/gdb/testsuite/gdb.rocm/step-
> abort.exp
> new file mode 100644
> index 00000000000..a385bc435e4
> --- /dev/null
> +++ b/gdb/testsuite/gdb.rocm/step-abort.exp
> @@ -0,0 +1,72 @@
> +# Copyright 2026 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/>.
> +
> +# This test ensures that we receive SIGABRT when we step over an abort
> +# instruction.
> +
> +load_lib rocm.exp
> +
> +standard_testfile .cpp
> +
> +require allow_hipcc_tests
> +
> +# We want to have a small kernel as we are going to single step all the way
> +# to our abort instruction (s_trap 2). Using -O1 allows the compiler to inline
> +# the sleep and abort instructions.
> +if {[build_executable "failed to prepare" $testfile $srcfile {hip additional_flags=-
> O1}]} {
> + return
> +}
> +
> +proc do_test {} {
> + clean_restart
> + gdb_load $::binfile
I forgot to mention a nit. This can be a single line:
clean_restart $::testfile
Regards,
-Baris