]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blame - gdb/testsuite/gdb.arch/thumb-prologue.exp
Copyright updates for 2007.
[thirdparty/binutils-gdb.git] / gdb / testsuite / gdb.arch / thumb-prologue.exp
CommitLineData
6aba47ca 1# Copyright 2006, 2007 Free Software Foundation, Inc.
29d73ae4
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
5# the Free Software Foundation; either version 2 of the License, or
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
14# along with this program; if not, write to the Free Software
15# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
16
17# Test ARM/Thumb prologue analyzer.
18
19if {![istarget arm*-*]} then {
20 verbose "Skipping ARM prologue tests."
21 return
22}
23
24set testfile "thumb-prologue"
25set srcfile ${testfile}.c
26set binfile ${objdir}/${subdir}/${testfile}
27
28# Don't use "debug", so that we don't have line information for the assembly
29# fragments.
30if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {"additional_flags=-mthumb"}] != "" } {
31 untested "ARM prologue tests"
32 return -1
33}
34
35
36gdb_exit
37gdb_start
38gdb_reinitialize_dir $srcdir/$subdir
39gdb_load ${binfile}
40
41#
42# Run to `main' where we begin our tests.
43#
44
45if ![runto_main] then {
46 untested "ARM prologue tests"
47 return -1
48}
49
50# Testcase for TPCS prologue.
51
52gdb_test "continue" "Program received signal SIG.*" "continue to TPCS"
53
54gdb_test "backtrace 10" \
55 "#0\[ \t\]*$hex in tpcs_frame_1 .*\r\n#1\[ \t\]*$hex in tpcs_frame .*\r\n#2\[ \t\]*$hex in main.*" \
56 "backtrace in TPCS"
57
58gdb_test "info frame" \
59 ".*Saved registers:.*r7 at.*r10 at.*r11 at.*lr at.*pc at .*" \
60 "saved registers in TPCS"