]> git.proxmox.com Git - mirror_qemu.git/blame - linux-user/qemu.h
basic clone() support
[mirror_qemu.git] / linux-user / qemu.h
CommitLineData
31e31b8a
FB
1#ifndef GEMU_H
2#define GEMU_H
3
4#include "thunk.h"
5
01ffc75b 6struct target_pt_regs {
31e31b8a
FB
7 long ebx;
8 long ecx;
9 long edx;
10 long esi;
11 long edi;
12 long ebp;
13 long eax;
14 int xds;
15 int xes;
16 long orig_eax;
17 long eip;
18 int xcs;
19 long eflags;
20 long esp;
21 int xss;
22};
23
24/* This struct is used to hold certain information about the image.
25 * Basically, it replicates in user space what would be certain
26 * task_struct fields in the kernel
27 */
28struct image_info {
29 unsigned long start_code;
30 unsigned long end_code;
31 unsigned long end_data;
32 unsigned long start_brk;
33 unsigned long brk;
34 unsigned long start_mmap;
35 unsigned long mmap;
36 unsigned long rss;
37 unsigned long start_stack;
38 unsigned long arg_start;
39 unsigned long arg_end;
40 unsigned long env_start;
41 unsigned long env_end;
42 unsigned long entry;
43 int personality;
44};
45
46int elf_exec(const char * filename, char ** argv, char ** envp,
01ffc75b 47 struct target_pt_regs * regs, struct image_info *infop);
31e31b8a
FB
48
49void target_set_brk(char *new_brk);
50void syscall_init(void);
6dbad63e 51long do_syscall(void *cpu_env, int num, long arg1, long arg2, long arg3,
31e31b8a
FB
52 long arg4, long arg5, long arg6);
53void gemu_log(const char *fmt, ...) __attribute__((format(printf,1,2)));
1b6b029e
FB
54struct CPUX86State;
55void cpu_loop(struct CPUX86State *env);
31e31b8a
FB
56
57#endif