[f]truncate64 support
[qemu] / linux-user / qemu.h
index be95ff9..f385a1c 100644 (file)
@@ -1,5 +1,5 @@
-#ifndef GEMU_H
-#define GEMU_H
+#ifndef QEMU_H
+#define QEMU_H
 
 #include "thunk.h"
 
@@ -9,6 +9,7 @@
 
 #include "cpu.h"
 #include "syscall.h"
+#include "gdbstub.h"
 
 /* This struct is used to hold certain information about the image.
  * Basically, it replicates in user space what would be certain
@@ -52,8 +53,6 @@ struct vm86_saved_state {
 #ifdef TARGET_ARM
 /* FPU emulator */
 #include "nwfpe/fpa11.h"
-#undef put_user
-#undef get_user
 #endif
 
 /* NOTE: we force a big alignment so that the stack stored after is
@@ -63,6 +62,11 @@ typedef struct TaskState {
 #ifdef TARGET_ARM
     /* FPA state */
     FPA11 fpa;
+    /* Extra fields for semihosted binaries.  */
+    uint32_t stack_base;
+    uint32_t heap_base;
+    uint32_t heap_limit;
+    int swi_errno;
 #endif
 #ifdef TARGET_I386
     struct target_vm86plus_struct *target_v86;
@@ -81,6 +85,7 @@ int elf_exec(const char * filename, char ** argv, char ** envp,
              struct target_pt_regs * regs, struct image_info *infop);
 
 void target_set_brk(char *new_brk);
+long do_brk(char *new_brk);
 void syscall_init(void);
 long do_syscall(void *cpu_env, int num, long arg1, long arg2, long arg3, 
                 long arg4, long arg5, long arg6);
@@ -155,16 +160,16 @@ int target_msync(unsigned long start, unsigned long len, int flags);
     int size = sizeof(*ptr);\
     switch(size) {\
     case 1:\
-        x = (typeof(*ptr))ldub(ptr);\
+        x = (typeof(*ptr))ldub((void *)ptr);\
         break;\
     case 2:\
-        x = (typeof(*ptr))lduw(ptr);\
+        x = (typeof(*ptr))lduw((void *)ptr);\
         break;\
     case 4:\
-        x = (typeof(*ptr))ldl(ptr);\
+        x = (typeof(*ptr))ldl((void *)ptr);\
         break;\
     case 8:\
-        x = (typeof(*ptr))ldq(ptr);\
+        x = (typeof(*ptr))ldq((void *)ptr);\
         break;\
     default:\
         abort();\
@@ -238,4 +243,4 @@ static inline unsigned long clear_user(void *dst, unsigned long size)
         return size;
 }
 
-#endif
+#endif /* QEMU_H */