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
76 lines
2.7 KiB
Plaintext
76 lines
2.7 KiB
Plaintext
# Copyright 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/>.
|
|
|
|
# Test some code which relies on GDB interpreting the DW_AT_entry_pc
|
|
# correctly in order to place the breakpoints. This was tested with
|
|
# versions of GCC between 8.4 and 14.2 and in all cases the entry_pc
|
|
# was required.
|
|
#
|
|
# Testing with Clang 9.0.1 and 15.0.2 seemed to indicate that the
|
|
# Clang generated code didn't depend on the entry_pc being parsed.
|
|
|
|
# Older versions of GCC, those prior to the -gstatement-frontiers work
|
|
# added in 8.x, would generate DW_AT_entry_pc values pointing to the
|
|
# first instruction of an inlined function. This first instruction
|
|
# could then be reordered such that the first instruction might be
|
|
# executed even when the actual call to the inline function ended up
|
|
# being skipped. GDB can then hit a breakpoint for a function that
|
|
# ends up never being called.
|
|
#
|
|
# This test is specifically testing that GDB correctly handles the
|
|
# case where DW_AT_entry_pc is not the first instruction of an inlined
|
|
# function, as can be the case in gcc 8.x with the
|
|
# -gstatement-frontiers work in place.
|
|
require {expr ![is_c_compiler_gcc] || [supports_statement_frontiers]}
|
|
|
|
standard_testfile
|
|
|
|
set options {debug optimize=-O2}
|
|
lappend_include_file options $srcdir/lib/attributes.h
|
|
if { [supports_statement_frontiers] } {
|
|
lappend options additional_flags=-gstatement-frontiers
|
|
}
|
|
|
|
if { [prepare_for_testing "failed to prepare" $binfile $srcfile $options] } {
|
|
return
|
|
}
|
|
|
|
if ![runto_main] {
|
|
return
|
|
}
|
|
|
|
# This test makes use of inline functions.
|
|
get_debug_format
|
|
if { [skip_inline_frame_tests] } {
|
|
untested "skipping inline frame tests"
|
|
return
|
|
}
|
|
|
|
gdb_breakpoint "bar"
|
|
set bp_bar_num [get_integer_valueof "\$bpnum" "*UNKNOWN*" \
|
|
"get number of bar breakpoint"]
|
|
|
|
gdb_breakpoint "foo"
|
|
set bp_foo_num [get_integer_valueof "\$bpnum" "*UNKNOWN*" \
|
|
"get number of foo breakpoint"]
|
|
|
|
gdb_test "continue" \
|
|
"Breakpoint ${bp_bar_num}(?:\\.$decimal)?, bar .*" "continue to bar"
|
|
|
|
gdb_test "continue" \
|
|
"Breakpoint ${bp_foo_num}(?:\\.$decimal)?, foo .*" "continue to foo"
|
|
|
|
gdb_continue_to_end
|