Exemplo n.º 1
0
void
elf32_dump_thread(struct thread *td, void *dst, size_t *off)
{
#ifdef CPU_ENABLE_SSE
	void *buf;
#endif
	size_t len;

	len = 0;
#ifdef CPU_ENABLE_SSE
	if (use_xsave) {
		if (dst != NULL) {
			npxgetregs(td);
			len += elf32_populate_note(NT_X86_XSTATE,
			    get_pcb_user_save_td(td), dst,
			    cpu_max_ext_state_size, &buf);
			*(uint64_t *)((char *)buf + X86_XSTATE_XCR0_OFFSET) =
			    xsave_mask;
		} else
			len += elf32_populate_note(NT_X86_XSTATE, NULL, NULL,
			    cpu_max_ext_state_size, NULL);
	}
#endif
	*off = len;
}
Exemplo n.º 2
0
void
elf32_dump_thread(struct thread *td, void *dst, size_t *off)
{
#ifdef VFP
	mcontext_vfp_t vfp;

	if (dst != NULL) {
		get_vfpcontext(td, &vfp);
		*off = elf32_populate_note(NT_ARM_VFP, &vfp, dst, sizeof(vfp),
		    NULL);
	} else
		*off = elf32_populate_note(NT_ARM_VFP, NULL, NULL, sizeof(vfp),
		    NULL);
#endif
}