Exemple #1
0
kdp_error_t
kdp_machine_read_regs(
    __unused unsigned int cpu,
    unsigned int flavor,
    char *data,
    int *size
)
{
    static x86_float_state64_t  null_fpstate;

    switch (flavor) {

    case x86_THREAD_STATE64:
	dprintf(("kdp_readregs THREAD_STATE64\n"));
	kdp_getstate((x86_thread_state64_t *)data);
	*size = sizeof (x86_thread_state64_t);
	return KDPERR_NO_ERROR;
	
    case x86_FLOAT_STATE64:
	dprintf(("kdp_readregs THREAD_FPSTATE64\n"));
	*(x86_float_state64_t *)data = null_fpstate;
	*size = sizeof (x86_float_state64_t);
	return KDPERR_NO_ERROR;
	
    default:
	dprintf(("kdp_readregs bad flavor %d\n", flavor));
	*size = 0;
	return KDPERR_BADFLAVOR;
    }
}
Exemple #2
0
kdp_error_t
kdp_machine_read_regs(
    __unused unsigned int cpu,
    __unused unsigned int flavor,
    char *data,
    __unused int *size
)
{
    static arm_vfp_state_t  null_fpstate;

    switch (flavor) {

    case ARM_THREAD_STATE:
	dprintf(("kdp_readregs THREAD_STATE\n"));
	kdp_getstate((arm_thread_state_t *)data);
	*size = sizeof (arm_thread_state_t);
	return KDPERR_NO_ERROR;
	
    case ARM_VFP_STATE:
	dprintf(("kdp_readregs THREAD_FPSTATE\n"));
	*(arm_vfp_state_t *)data = null_fpstate;
	*size = sizeof (arm_vfp_state_t);
	return KDPERR_NO_ERROR;
	
    default:
	dprintf(("kdp_readregs bad flavor %d, probably not implented yet\n", flavor));
	*size = 0;
	return KDPERR_BADFLAVOR;
    }
}