2 * Copyright 2007, François Revol, revol@free.fr.
3 * Distributed under the terms of the MIT License.
5 * Copyright 2005, Axel Dörfler, axeld@pinc-softare.de
6 * Distributed under the terms of the MIT License.
13 #include <arch/user_debugger.h>
16 #warning M68K: WRITEME
18 arch_clear_team_debug_info(struct arch_team_debug_info
*info
)
24 arch_destroy_team_debug_info(struct arch_team_debug_info
*info
)
26 arch_clear_team_debug_info(info
);
31 arch_clear_thread_debug_info(struct arch_thread_debug_info
*info
)
37 arch_destroy_thread_debug_info(struct arch_thread_debug_info
*info
)
39 arch_clear_thread_debug_info(info
);
44 arch_update_thread_single_step()
46 if (struct iframe
* frame
= m68k_get_user_iframe()) {
47 Thread
* thread
= thread_get_current_thread();
49 // set/clear T1 in SR depending on if single stepping is desired
55 // note 060 and 020(?) only have T1 bit,
56 // but this should be compatible as well.
57 if (thread
->debug_info
.flags
& B_THREAD_DEBUG_SINGLE_STEP
) {
58 frame
->cpu
.sr
&= ~(M68K_SR_T_MASK
);
59 frame
->cpu
.sr
|= (1 << M68K_SR_T1
);
61 frame
->cpu
.sr
&= ~(M68K_SR_T_MASK
);
68 arch_set_debug_cpu_state(const debug_cpu_state
*cpuState
)
74 arch_get_debug_cpu_state(debug_cpu_state
*cpuState
)
80 arch_get_thread_debug_cpu_state(Thread
* thread
, debug_cpu_state
* cpuState
)
87 arch_set_breakpoint(void *address
)
94 arch_clear_breakpoint(void *address
)
101 arch_set_watchpoint(void *address
, uint32 type
, int32 length
)
108 arch_clear_watchpoint(void *address
)
114 arch_has_breakpoints(struct arch_team_debug_info
*info
)