mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2025-02-23 13:21:43 +08:00
This commit brings all the changes made by running gdb/copyright.py as per GDB's Start of New Year Procedure. For the avoidance of doubt, all changes in this commits were performed by the script.
57 lines
2.0 KiB
Plaintext
57 lines
2.0 KiB
Plaintext
# Copyright (C) 2011-2022 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/>.
|
|
|
|
load_lib gdb-python.exp
|
|
|
|
standard_testfile
|
|
|
|
if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } {
|
|
return -1
|
|
}
|
|
|
|
# Skip all tests if Python scripting is not enabled.
|
|
if { [skip_python_tests] } { continue }
|
|
|
|
if ![runto_main] then {
|
|
return 0
|
|
}
|
|
|
|
gdb_breakpoint [gdb_get_line_number "break-here"]
|
|
gdb_continue_to_breakpoint "Block break here."
|
|
|
|
gdb_test "info frame" "inlined into frame 1\r\n.*"
|
|
|
|
gdb_test "up" "#1 g .*"
|
|
|
|
gdb_test "python print (gdb.selected_frame().read_var('l'))" "\r\n42"
|
|
|
|
# A regression test for having a backtrace limit that forces unwinding
|
|
# to stop after an inline frame. GDB needs to compute the frame_id of
|
|
# the inline frame, which requires unwinding past all the inline
|
|
# frames to the real stack frame, even if that means bypassing the
|
|
# user visible backtrace limit. See PR backtrace/15558.
|
|
#
|
|
# Set the limit, and run to an inline function. It's important that
|
|
# the frame cache is flushed somehow after setting the limit, to force
|
|
# frame id recomputation.
|
|
gdb_test_no_output "set backtrace limit 1"
|
|
gdb_continue_to_breakpoint "Block break here again."
|
|
|
|
gdb_test "python print (gdb.newest_frame())" ".*"
|
|
|
|
# Regression test to verify that Frame.function works properly for
|
|
# inline frames.
|
|
gdb_test "python print (gdb.newest_frame().function())" "f(\\(\\))?"
|