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
172 lines
4.4 KiB
Plaintext
172 lines
4.4 KiB
Plaintext
# Copyright 2021-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/>.
|
|
|
|
# Check that the ".debug_ranges entry has start address of zero" complaint
|
|
# is triggered for a loaded shared lib.
|
|
|
|
load_lib dwarf.exp
|
|
|
|
# This test can only be run on targets which support DWARF-2 and use gas.
|
|
require dwarf2_support allow_shlib_tests
|
|
|
|
standard_testfile .c -shlib.c -dw.S
|
|
|
|
# Test for presence of complaint, with the lib relocated.
|
|
|
|
proc_with_prefix test_relocated { exec_path lib_path complaint_re readnow_p } {
|
|
clean_restart $exec_path
|
|
gdb_load_shlib $lib_path
|
|
|
|
if { ![runto_main] } {
|
|
return
|
|
}
|
|
|
|
gdb_test_no_output "nosharedlibrary"
|
|
|
|
# Test for presence of complaint.
|
|
with_complaints 1 {
|
|
set have_complaint 0
|
|
gdb_test_multiple "maint with dwarf synchronous on -- sharedlibrary [file tail $lib_path]" "load shared library" {
|
|
-re -wrap $complaint_re {
|
|
set have_complaint 1
|
|
}
|
|
-re -wrap "" {
|
|
}
|
|
}
|
|
|
|
# The complaint won't be seen if an index is in use.
|
|
if {[have_index $lib_path] == ""} {
|
|
gdb_assert { $have_complaint } "complaint"
|
|
}
|
|
|
|
if { ! $readnow_p } {
|
|
gdb_test "maint expand-symtabs $::srcfile2" $complaint_re \
|
|
"complaint when expanding symtab"
|
|
}
|
|
}
|
|
}
|
|
|
|
# Test for presence of complaint, with the lib unrelocated.
|
|
|
|
proc_with_prefix test_unrelocated { exec_path lib_path complaint_re readnow_p } {
|
|
clean_restart
|
|
gdb_test_no_output "maint set dwarf synchronous on"
|
|
|
|
with_complaints 1 {
|
|
gdb_load $lib_path
|
|
set have_complaint [regexp $complaint_re.* $::gdb_file_cmd_msg]
|
|
|
|
# The complaint won't be seen if an index is in use.
|
|
if {[have_index $lib_path] == ""} {
|
|
gdb_assert { $have_complaint } "complaint"
|
|
}
|
|
|
|
gdb_test_no_output "maint set dwarf synchronous off"
|
|
|
|
if { ! $readnow_p } {
|
|
gdb_test "maint expand-symtabs $::srcfile2" $complaint_re \
|
|
"complaint when expanding symtab"
|
|
}
|
|
}
|
|
}
|
|
|
|
# Test with both a .debug_ranges section (DWARF 4) and a .debug_rnglists
|
|
# section (DWARF 5).
|
|
|
|
foreach_with_prefix ranges_sect {ranges rnglists} {
|
|
set asm_file [standard_output_file ${ranges_sect}-$srcfile3]
|
|
|
|
if { $ranges_sect == "ranges" } {
|
|
Dwarf::assemble $asm_file {
|
|
global srcdir subdir srcfile2
|
|
declare_labels ranges_label
|
|
|
|
cu {} {
|
|
compile_unit {
|
|
{language @DW_LANG_C}
|
|
{name $srcfile2}
|
|
{ranges ${ranges_label} DW_FORM_sec_offset}
|
|
} {
|
|
subprogram {
|
|
{external 1 flag}
|
|
{name foo}
|
|
}
|
|
}
|
|
}
|
|
|
|
ranges {is_64 [is_64_target]} {
|
|
ranges_label: sequence {
|
|
base 0
|
|
range 0 1
|
|
}
|
|
}
|
|
}
|
|
} elseif { $ranges_sect == "rnglists" } {
|
|
Dwarf::assemble $asm_file {
|
|
global srcdir subdir srcfile2
|
|
declare_labels rnglists_label
|
|
|
|
cu {
|
|
version 5
|
|
} {
|
|
compile_unit {
|
|
{language @DW_LANG_C}
|
|
{name $srcfile2}
|
|
{ranges ${rnglists_label} DW_FORM_sec_offset}
|
|
} {
|
|
subprogram {
|
|
{external 1 flag}
|
|
{name foo}
|
|
}
|
|
}
|
|
}
|
|
|
|
rnglists {} {
|
|
table {} {
|
|
rnglists_label: list_ {
|
|
start_end 0 1
|
|
}
|
|
}
|
|
}
|
|
}
|
|
} else {
|
|
error "invalid ranges section kind"
|
|
}
|
|
|
|
set lib_path [standard_output_file shr1-${ranges_sect}.sl]
|
|
set lib_sources [list ${srcdir}/${subdir}/$srcfile2 $asm_file]
|
|
if { [gdb_compile_shlib $lib_sources $lib_path {nodebug}] != "" } {
|
|
untested "failed to compile"
|
|
return
|
|
}
|
|
|
|
set exec_sources ${srcdir}/${subdir}/${srcfile}
|
|
set exec_path ${binfile}-${ranges_sect}
|
|
set exec_opts [list debug shlib=${lib_path}]
|
|
if { [gdb_compile $exec_sources $exec_path executable $exec_opts] != ""} {
|
|
untested "failed to compile"
|
|
return
|
|
}
|
|
|
|
set complaint_re ".debug_${ranges_sect} entry has start address of zero"
|
|
set complaint_re \
|
|
"During symbol reading: $complaint_re \\\[in module \[^\r\n\]*\\\]"
|
|
|
|
set readnow_p [readnow]
|
|
|
|
test_relocated $exec_path $lib_path $complaint_re $readnow_p
|
|
test_unrelocated $exec_path $lib_path $complaint_re $readnow_p
|
|
}
|