]> rtime.felk.cvut.cz Git - l4.git/blob - l4/pkg/libvcpu/lib/src/ARCH-x86/arch.cc
update
[l4.git] / l4 / pkg / libvcpu / lib / src / ARCH-x86 / 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 #include <stdio.h>
21
22 void l4vcpu_print_state_arch(l4_vcpu_state_t *vcpu,
23                              const char *prefix) L4_NOTHROW
24 {
25   printf("%sip=%08lx sp=%08lx trapno=%08lx\n",
26          prefix, vcpu->r.ip, vcpu->r.sp, vcpu->r.trapno);
27   printf("%sax=%08lx dx=%08lx bx=%08lx cx=%08lx\n",
28          prefix, vcpu->r.ax, vcpu->r.dx, vcpu->r.bx, vcpu->r.cx);
29   printf("%ssi=%08lx di=%08lx bp=%08lx flags=%08lx\n",
30          prefix, vcpu->r.si, vcpu->r.di, vcpu->r.bp, vcpu->r.flags);
31   printf("%sds=%08lx es=%08lx gs=%08lx fs=%08lx\n",
32          prefix, vcpu->r.ds, vcpu->r.es, vcpu->r.gs, vcpu->r.fs);
33 }