arm-singlestep.exp revision 19e74b5815987bb4260351bc1e5ef4a1ea08b1b4
1# This file is part of ltrace.
2# Copyright (C) 2013 Petr Machata, Red Hat Inc.
3#
4# This program is free software; you can redistribute it and/or
5# modify it under the terms of the GNU General Public License as
6# published by the Free Software Foundation; either version 2 of the
7# License, or (at your option) any later version.
8#
9# This program is distributed in the hope that it will be useful, but
10# WITHOUT ANY WARRANTY; without even the implied warranty of
11# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
12# General Public License for more details.
13#
14# You should have received a copy of the GNU General Public License
15# along with this program; if not, write to the Free Software
16# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
17# 02110-1301 USA
18
19if {![istarget arm*-*]} {
20    unsupported "arm-specific test"
21    return
22}
23
24set exe [ltraceCompile {} [ltraceSource c {
25    int puc(void) { return 0; }
26
27    int bar(void);
28    int baz(void);
29    __asm__ ("	.type   bar, %function\n"
30	     "bar:		\n"
31	     "	b puc	\n"
32	     "	.type   baz, %function\n"
33	     "baz:		\n"
34	     "	b puc	\n");
35
36    int main(void) { return bar() + baz(); }
37}]]
38
39ltraceMatch [ltraceRun -L -xbar+baz $exe] {
40    {{bar} == 1}
41    {{baz} == 1}
42}
43
44ltraceDone
45