diff options
author | Mika Westerberg <mika.westerberg@iki.fi> | 2009-04-07 09:57:11 +0300 |
---|---|---|
committer | Riku Voipio <riku.voipio@nokia.com> | 2009-06-16 16:56:28 +0300 |
commit | edf8e2af1453ce56c72b2f25a745e3734177a05d (patch) | |
tree | 367df4d32d3d75137076cd38738199d4d5b27901 /linux-user/qemu.h | |
parent | 88a8c98455cc28ef27f92fd0c6845cedf86d21fc (diff) | |
download | qemu-edf8e2af1453ce56c72b2f25a745e3734177a05d.tar.gz qemu-edf8e2af1453ce56c72b2f25a745e3734177a05d.tar.bz2 qemu-edf8e2af1453ce56c72b2f25a745e3734177a05d.zip |
linux-user: implemented ELF coredump support for ARM target
When target process is killed with signal (such signal that
should dump core) a coredump file is created. This file is
similar than coredump generated by Linux (there are few exceptions
though).
Riku Voipio: added support for rlimit
Signed-off-by: Mika Westerberg <mika.westerberg@iki.fi>
Signed-off-by: Riku Voipio <riku.voipio@iki.fi>
Diffstat (limited to 'linux-user/qemu.h')
-rw-r--r-- | linux-user/qemu.h | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/linux-user/qemu.h b/linux-user/qemu.h index d83a2a4b3d..e04a31c69c 100644 --- a/linux-user/qemu.h +++ b/linux-user/qemu.h @@ -18,6 +18,7 @@ #include "syscall.h" #include "target_signal.h" #include "gdbstub.h" +#include "sys-queue.h" #if defined(USE_NPTL) #define THREAD __thread @@ -44,6 +45,9 @@ struct image_info { abi_ulong entry; abi_ulong code_offset; abi_ulong data_offset; + abi_ulong saved_auxv; + abi_ulong arg_start; + abi_ulong arg_end; char **host_argv; int personality; }; @@ -87,7 +91,7 @@ struct emulated_sigtable { /* NOTE: we force a big alignment so that the stack stored after is aligned too */ typedef struct TaskState { - struct TaskState *next; + pid_t ts_tid; /* tid (or pid) of this task */ #ifdef TARGET_ARM /* FPA state */ FPA11 fpa; @@ -114,6 +118,7 @@ typedef struct TaskState { #endif int used; /* non zero if used */ struct image_info *info; + struct linux_binprm *bprm; struct emulated_sigtable sigtab[TARGET_NSIG]; struct sigqueue sigqueue_table[MAX_SIGQUEUE_SIZE]; /* siginfo queue */ @@ -125,6 +130,8 @@ typedef struct TaskState { extern char *exec_path; void init_task_state(TaskState *ts); +void task_settid(TaskState *); +void stop_all_tasks(void); extern const char *qemu_uname_release; /* ??? See if we can avoid exposing so much of the loader internals. */ @@ -149,13 +156,15 @@ struct linux_binprm { char **argv; char **envp; char * filename; /* Name of binary */ + int (*core_dump)(int, const CPUState *); /* coredump routine */ }; void do_init_thread(struct target_pt_regs *regs, struct image_info *infop); abi_ulong loader_build_argptr(int envc, int argc, abi_ulong sp, abi_ulong stringp, int push_ptr); int loader_exec(const char * filename, char ** argv, char ** envp, - struct target_pt_regs * regs, struct image_info *infop); + struct target_pt_regs * regs, struct image_info *infop, + struct linux_binprm *); int load_elf_binary(struct linux_binprm * bprm, struct target_pt_regs * regs, struct image_info * info); |