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
74 lines
3.0 KiB
Plaintext
74 lines
3.0 KiB
Plaintext
# Copyright 2010-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/>.
|
|
|
|
# This file is part of the gdb testsuite.
|
|
|
|
require allow_cplus_tests
|
|
|
|
standard_testfile .cc
|
|
|
|
if {[prepare_for_testing "failed to prepare" $testfile $srcfile {debug c++}]} {
|
|
return -1
|
|
}
|
|
|
|
if {![runto_main]} {
|
|
return
|
|
}
|
|
|
|
gdb_breakpoint [gdb_get_line_number "breakpoint 1"]
|
|
gdb_continue_to_breakpoint "first breakpoint"
|
|
|
|
# In PR 11226, we failed to print x correctly in the "print *this"
|
|
# case.
|
|
gdb_test "print *this" " = {<mc::Base> = {x = 2}, _vptr.Middle = ${hex}( <\[^>]*>)?, y = 3}"
|
|
gdb_test "print x" " = 2" "print x in get_y"
|
|
|
|
gdb_breakpoint [gdb_get_line_number "breakpoint 2"]
|
|
gdb_continue_to_breakpoint "second breakpoint"
|
|
|
|
# In PR 11226, we could not find x here.
|
|
gdb_test "print x" " = 2" "print x in get_z"
|
|
|
|
gdb_breakpoint [gdb_get_line_number "breakpoint 3"]
|
|
gdb_continue_to_breakpoint "third breakpoint"
|
|
|
|
# In PR 9629, we failed to print v correctly here.
|
|
gdb_test "print *(D *) e" " = {<C> = {v = 11}, _vptr.D = ${hex}( <\[^>]*>)?}"
|
|
|
|
# A regression test reported to Red Hat bugzilla, see:
|
|
# https://bugzilla.redhat.com/show_bug.cgi?id=560741
|
|
gdb_test_no_output "set print object on"
|
|
gdb_test "print/x b->mA" " = 0xaaaaaaaa"
|
|
|
|
# A regression test reported to Red Hat bugzilla, see:
|
|
# https://bugzilla.redhat.com/show_bug.cgi?id=606660
|
|
# `set print object on' is expected.
|
|
gdb_test "print rtti_data" " = .*, data = 1\}"
|
|
|
|
# Printing a pointer into a virtual base of a larger object used to do
|
|
# pointer adjusment directly into the value being printed, in-place
|
|
# (and did it wrong, too). Print the pointer, and then access the
|
|
# value history to check the pointer value is not changed. If it had
|
|
# been changed, then we'd not be able to find the real type anymore.
|
|
gdb_test "print virtual_middle_b" \
|
|
" = \\(Virtual \\*\\) $hex <virtual_o>" \
|
|
"print pointer to virtual base at non-zero offset of larger object"
|
|
gdb_test "print $" \
|
|
" = \\(Virtual \\*\\) $hex <virtual_o>" \
|
|
"print same pointer from history value"
|
|
gdb_test "print *$$" \
|
|
" = \\(Virtual\\) {<VirtualMiddleA> = {<VirtualBase> = {_vptr.VirtualBase = ${hex}( <\[^>]*>)?, x = 0}, _vptr.VirtualMiddleA = ${hex}( <\[^>]*>)?, y = \\{0 <repeats 300 times>\\}}, <VirtualMiddleB> = {_vptr.VirtualMiddleB = ${hex}( <\[^>]*>)?, y = 0}, _vptr.Virtual = ${hex}( <\[^>]*>)?, z = 0}" \
|
|
"print whole pointed-to object, starting from the virtual base pointer"
|