mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2024-12-05 00:04:22 +08:00
1d506c26d9
This commit is the result of the following actions: - Running gdb/copyright.py to update all of the copyright headers to include 2024, - Manually updating a few files the copyright.py script told me to update, these files had copyright headers embedded within the file, - Regenerating gdbsupport/Makefile.in to refresh it's copyright date, - Using grep to find other files that still mentioned 2023. If these files were updated last year from 2022 to 2023 then I've updated them this year to 2024. I'm sure I've probably missed some dates. Feel free to fix them up as you spot them.
64 lines
2.1 KiB
Plaintext
64 lines
2.1 KiB
Plaintext
# Copyright (C) 2015-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 to see that GDB reports the correct function name when stopping
|
|
# in a function with several assembly-defined labels; see the test
|
|
# case asmlabel.c.
|
|
#
|
|
# When setting and then continuing to a breakpoint at either location
|
|
# L1 or L2 - again, see the code - we want to make sure that GDB
|
|
# correctly reports that it's in main, like this:
|
|
#
|
|
# Breakpoint 2, main (argc=1, argv=0x7fffffffe408) at asmlabel.c:26
|
|
# 26 v = 1; /* set L1 breakpoint here */
|
|
#
|
|
# This test case was written to test for a bug in which GDB printed
|
|
# the following instead:
|
|
#
|
|
# Breakpoint 2, L1 () at asmlabel.c:26
|
|
# 26 v = 1; /* set L1 breakpoint here */
|
|
#
|
|
|
|
standard_testfile
|
|
|
|
if {[prepare_for_testing "failed to prepare" $testfile $srcfile debug]} {
|
|
return -1
|
|
}
|
|
|
|
if ![runto_main] {
|
|
return 0
|
|
}
|
|
|
|
set L1_bploc [gdb_get_line_number "set L1 breakpoint here" $srcfile]
|
|
set L2_bploc [gdb_get_line_number "set L2 breakpoint here" $srcfile]
|
|
|
|
gdb_test "break $srcfile:$L1_bploc" \
|
|
"Breakpoint.*at.* file .*$srcfile, line $L1_bploc\\." \
|
|
"breakpoint at L1"
|
|
|
|
gdb_test "break $L2_bploc" \
|
|
"Breakpoint.*at.* file .*$srcfile, line $L2_bploc\\." \
|
|
"breakpoint at L2"
|
|
|
|
gdb_test "continue" \
|
|
"Continuing.*Breakpoint \[0-9\]+, main .* at .*$srcfile:$L1_bploc.*" \
|
|
"continue to L1"
|
|
|
|
gdb_test "continue" \
|
|
"Continuing.*Breakpoint \[0-9\]+, main .* at .*$srcfile:$L2_bploc.*" \
|
|
"continue to L2"
|
|
|
|
gdb_test "print v" "= 1" "check value of v at L2"
|