]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blame - gdb/testsuite/gdb.arch/i386-size-overlap.exp
Make tui_register_info::highlight private
[thirdparty/binutils-gdb.git] / gdb / testsuite / gdb.arch / i386-size-overlap.exp
CommitLineData
1d506c26 1# Copyright 2007-2024 Free Software Foundation, Inc.
f7a6bb70
DJ
2
3# This program is free software; you can redistribute it and/or modify
4# it under the terms of the GNU General Public License as published by
e22f8b7c 5# the Free Software Foundation; either version 3 of the License, or
f7a6bb70
DJ
6# (at your option) any later version.
7#
8# This program is distributed in the hope that it will be useful,
9# but WITHOUT ANY WARRANTY; without even the implied warranty of
10# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11# GNU General Public License for more details.
12#
13# You should have received a copy of the GNU General Public License
e22f8b7c 14# along with this program. If not, see <http://www.gnu.org/licenses/>.
f7a6bb70
DJ
15
16# This file is part of the gdb testsuite.
17
f7a6bb70
DJ
18# Test that GDB can handle overlapping sizes of symbols.
19
18d2b876 20require is_x86_like_target
f7a6bb70 21
de5f37e1 22standard_testfile
f7a6bb70
DJ
23
24# some targets have leading underscores on assembly symbols.
ee5683ab 25set additional_flags [gdb_target_symbol_prefix_flags]
f7a6bb70
DJ
26
27if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" \
28 executable [list debug $additional_flags]] != "" } {
5b362f04 29 untested "failed to compile"
f7a6bb70
DJ
30 return -1
31}
32
6dbbae3b 33clean_restart $binfile
f7a6bb70
DJ
34
35# We use gdb_run_cmd so this stands a chance to work for remote
36# targets too.
37gdb_run_cmd
fa43b1d7 38gdb_test "" "Program received signal SIGTRAP.*" "run past main"
f7a6bb70
DJ
39
40set message "backtrace shows the outer function"
41gdb_test_multiple "backtrace 10" $message {
42 -re "#1\[ \t]*$hex in inner.*$gdb_prompt $" {
43 fail $message
44 }
45 -re "#1\[ \t]*$hex in main.*$gdb_prompt $" {
46 pass $message
47 }
48}