summaryrefslogtreecommitdiff
path: root/linux-user
diff options
context:
space:
mode:
authorEdgar E. Iglesias <edgar.iglesias@gmail.com>2010-05-19 15:09:28 +0200
committerEdgar E. Iglesias <edgar.iglesias@gmail.com>2010-05-19 15:09:28 +0200
commite4cbd44d8e86c7fb605f92b05fd9ae6b9e393c56 (patch)
treeff220ac59a13d4125fb8762865327e49891991cf /linux-user
parent4ab50ccf6124eb2920262445e8ce0b2e95a2c13b (diff)
downloadqemu-e4cbd44d8e86c7fb605f92b05fd9ae6b9e393c56.tar.gz
qemu-e4cbd44d8e86c7fb605f92b05fd9ae6b9e393c56.tar.bz2
qemu-e4cbd44d8e86c7fb605f92b05fd9ae6b9e393c56.zip
microblaze: Add linux-user core dumping support.
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
Diffstat (limited to 'linux-user')
-rw-r--r--linux-user/elfload.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/linux-user/elfload.c b/linux-user/elfload.c
index 4ef77bcd2d..6bc51da957 100644
--- a/linux-user/elfload.c
+++ b/linux-user/elfload.c
@@ -644,6 +644,24 @@ static inline void init_thread(struct target_pt_regs *regs, struct image_info *i
#define ELF_EXEC_PAGESIZE 4096
+#define USE_ELF_CORE_DUMP
+#define ELF_NREG 38
+typedef target_elf_greg_t target_elf_gregset_t[ELF_NREG];
+
+/* See linux kernel: arch/mips/kernel/process.c:elf_dump_regs. */
+static void elf_core_copy_regs(target_elf_gregset_t *regs, const CPUState *env)
+{
+ int i, pos = 0;
+
+ for (i = 0; i < 32; i++) {
+ (*regs)[pos++] = tswapl(env->regs[i]);
+ }
+
+ for (i = 0; i < 6; i++) {
+ (*regs)[pos++] = tswapl(env->sregs[i]);
+ }
+}
+
#endif /* TARGET_MICROBLAZE */
#ifdef TARGET_SH4