1 # Copyright 2006, 2007 Free Software Foundation, Inc.
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.
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.
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.
17 # Test ARM/Thumb prologue analyzer.
19 if {![istarget arm*-*]} then {
20 verbose "Skipping ARM prologue tests."
24 set testfile "thumb-prologue"
25 set srcfile ${testfile}.c
26 set binfile ${objdir}/${subdir}/${testfile}
28 # Don't use "debug", so that we don't have line information for the assembly
30 if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {"additional_flags=-mthumb"}] != "" } {
31 untested "ARM prologue tests"
38 gdb_reinitialize_dir $srcdir/$subdir
42 # Run to `main' where we begin our tests.
45 if ![runto_main] then {
46 untested "ARM prologue tests"
50 # Testcase for TPCS prologue.
52 gdb_test "continue" "Program received signal SIG.*" "continue to TPCS"
54 gdb_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.*" \
58 gdb_test "info frame" \
59 ".*Saved registers:.*r7 at.*r10 at.*r11 at.*lr at.*pc at .*" \
60 "saved registers in TPCS"