MCPcopy Create free account
hub / github.com/BlitterStudio/amiberry / illg_debug_do

Function illg_debug_do

src/debug.cpp:3974–4008  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3972}
3973
3974static void illg_debug_do (uaecptr addr, int rwi, int size, uae_u32 val)
3975{
3976 uae_u8 mask;
3977 uae_u32 pc = m68k_getpc ();
3978 int i;
3979
3980 for (i = size - 1; i >= 0; i--) {
3981 uae_u8 v = val >> (i * 8);
3982 uae_u32 ad = addr + i;
3983 if (ad >= 0x01000000)
3984 mask = illghdebug[ad >> 16];
3985 else
3986 mask = illgdebug[ad];
3987 if ((mask & 3) == 3)
3988 return;
3989 if (mask & 0x80) {
3990 illg_debug_check (ad, rwi, size, val);
3991 } else if ((mask & 3) == 0) {
3992 if (rwi & 2)
3993 console_out_f (_T("W: %08X=%02X PC=%08X\n"), ad, v, pc);
3994 else if (rwi & 1)
3995 console_out_f (_T("R: %08X PC=%08X\n"), ad, pc);
3996 if (illgdebug_break)
3997 activate_debugger_new();
3998 } else if (!(mask & 1) && (rwi & 1)) {
3999 console_out_f (_T("RO: %08X=%02X PC=%08X\n"), ad, v, pc);
4000 if (illgdebug_break)
4001 activate_debugger_new();
4002 } else if (!(mask & 2) && (rwi & 2)) {
4003 console_out_f (_T("WO: %08X PC=%08X\n"), ad, pc);
4004 if (illgdebug_break)
4005 activate_debugger_new();
4006 }
4007 }
4008}
4009
4010static int debug_mem_off (uaecptr *addrp)
4011{

Callers 1

memwatch_funcFunction · 0.85

Calls 4

m68k_getpcFunction · 0.85
illg_debug_checkFunction · 0.85
activate_debugger_newFunction · 0.85
console_out_fFunction · 0.50

Tested by

no test coverage detected