]> rtime.felk.cvut.cz Git - l4.git/blob - l4/pkg/libvcpu/lib/src/ARCH-arm/arch.cc
update
[l4.git] / l4 / pkg / libvcpu / lib / src / ARCH-arm / arch.cc
1 /*
2  * (c) 2010 Adam Lackorzynski <adam@os.inf.tu-dresden.de>
3  *     economic rights: Technische Universität Dresden (Germany)
4  *
5  * This file is part of TUD:OS and distributed under the terms of the
6  * GNU General Public License 2.
7  * Please see the COPYING-GPL-2 file for details.
8  *
9  * As a special exception, you may use this file as part of a free software
10  * library without restriction.  Specifically, if other files instantiate
11  * templates or use macros or inline functions from this file, or you compile
12  * this file and link it with other files to produce an executable, this
13  * file does not by itself cause the resulting executable to be covered by
14  * the GNU General Public License.  This exception does not however
15  * invalidate any other reasons why the executable file might be covered by
16  * the GNU General Public License.
17  */
18
19 #include <l4/vcpu/vcpu.h>
20
21 #include <stdio.h>
22
23 void l4vcpu_print_state_arch(l4_vcpu_state_t *vcpu,
24                              const char *prefix) L4_NOTHROW
25 {
26   printf("%svcpu=%p ip=%08lx  sp=%08lx err=%08lx label=%08lx\n",
27          prefix, vcpu, vcpu->r.ip, vcpu->r.sp, vcpu->r.err, vcpu->i.label);
28   printf("%s r0=%08lx  r1=%08lx  r2=%08lx  r3=%08lx\n",
29          prefix, vcpu->r.r[0], vcpu->r.r[1], vcpu->r.r[2], vcpu->r.r[3]);
30   printf("%s r4=%08lx  r5=%08lx  r6=%08lx  r7=%08lx\n",
31          prefix, vcpu->r.r[4], vcpu->r.r[5], vcpu->r.r[6], vcpu->r.r[7]);
32   printf("%s r8=%08lx  r9=%08lx r10=%08lx r11=%08lx\n",
33          prefix, vcpu->r.r[8], vcpu->r.r[9], vcpu->r.r[10], vcpu->r.r[11]);
34   printf("%sr12=%08lx  lr=%08lx flags=%08lx\n",
35          prefix, vcpu->r.r[12], vcpu->r.lr, vcpu->r.flags);
36 }