// For attaching the debugger
extern Int VGA_(ptrace_setregs_from_tst) ( Int pid, ThreadArchState* arch );
-// Making coredumps
-extern void VGA_(fill_elfregs_from_tst) ( struct vki_user_regs_struct* regs,
- ThreadArchState* arch );
-extern void VGA_(fill_elffpregs_from_tst) ( vki_elf_fpregset_t* fpu,
- const ThreadArchState* arch );
-extern void VGA_(fill_elffpxregs_from_tst) ( vki_elf_fpxregset_t* xfpu,
- const ThreadArchState* arch );
-
// Signal stuff
extern void VGA_(push_signal_frame) ( ThreadId tid, Addr sp_top_of_frame,
const vki_siginfo_t *siginfo,
VG_(sigprocmask)(VKI_SIG_SETMASK, &origmask, NULL);
}
+// Core dumping is disabled until someone can work out how to abstract out
+// the arch-specific and word-size-specific parts neatly.
+#if 0
/*
Dump core
VG_(close)(core_fd);
}
+#endif
/*
Perform the default action of a signal. Returns if the default
VG_(start_debugger)( tid );
}
+ // See comment above about this temporary disabling of core dumps.
+ #if 0
if (core) {
static struct vki_rlimit zero = { 0, 0 };
/* make sure we don't get a confusing kernel-generated coredump */
VG_(setrlimit)(VKI_RLIMIT_CORE, &zero);
}
+ #endif
VG_(scheduler_handle_fatal_signal)( sigNo );
}
/*--- Making coredumps ---*/
/*------------------------------------------------------------*/
+// Nb: these functions do *not* represent the right way to abstract out the
+// arch-specific parts of coredumps. Some rethinking is required.
+#if 0
void VGA_(fill_elfregs_from_tst)(struct vki_user_regs_struct* regs,
ThreadArchState* arch)
{
regs->gs = arch->vex.guest_GS;
}
-#if 0
static void fill_fpu(vki_elf_fpregset_t *fpu, const Char *from)
{
if (VG_(have_ssestate)) {
} else
VG_(memcpy)(fpu, from, sizeof(*fpu));
}
-#endif
void VGA_(fill_elffpregs_from_BB)( vki_elf_fpregset_t* fpu )
{
- //fill_fpu(fpu, (const Char *)&VG_(baseBlock)[VGOFF_(m_ssestate)]);
+ fill_fpu(fpu, (const Char *)&VG_(baseBlock)[VGOFF_(m_ssestate)]);
}
void VGA_(fill_elffpregs_from_tst)( vki_elf_fpregset_t* fpu,
const ThreadArchState* arch)
{
- //fill_fpu(fpu, (const Char *)&arch->m_sse);
+ fill_fpu(fpu, (const Char *)&arch->m_sse);
}
void VGA_(fill_elffpxregs_from_BB) ( vki_elf_fpxregset_t* xfpu )
{
- //VG_(memcpy)(xfpu, &VG_(baseBlock)[VGOFF_(m_ssestate)], sizeof(*xfpu));
+ VG_(memcpy)(xfpu, &VG_(baseBlock)[VGOFF_(m_ssestate)], sizeof(*xfpu));
}
void VGA_(fill_elffpxregs_from_tst) ( vki_elf_fpxregset_t* xfpu,
const ThreadArchState* arch )
{
- //VG_(memcpy)(xfpu, arch->m_sse, sizeof(*xfpu));
+ VG_(memcpy)(xfpu, arch->m_sse, sizeof(*xfpu));
}
+#endif
/*--------------------------------------------------------------------*/
/*--- end ---*/