static int debug_mmu_mode;
static bool break_if_enforcer;
static uaecptr debug_pc;
-
+static bool debug_float;
static int trace_cycles;
static int last_hpos1, last_hpos2;
static int last_vpos1, last_vpos2;
_T(" wd [<0-1>] Enable illegal access logger. 1 = enable break.\n")
_T(" L <file> <addr> [<n>] Load a block of Amiga memory.\n")
_T(" S <file> <addr> <n> Save a block of Amiga memory.\n")
- _T(" s \"<string>\"/<values> [<addr>] [<length>]\n")
+ _T(" s \"<string>\"/<values> [<addr>] [<endaddr-1>]\n")
_T(" Search for string/bytes.\n")
_T(" T or Tt Show exec tasks and their PCs.\n")
_T(" Td,Tl,Tr,Tp,Ts,TS,Ti,TO,TM,Tf Show devs, libs, resources, ports, semaphores,\n")
_T(" v [-2 to -5] = enable visual DMA debugger.\n")
_T(" vh [<ratio> <lines>] \"Heat map\"\n")
_T(" I <custom event> Send custom event string\n")
- _T(" ?<value> Hex ($, 0x)/Bin (%)/Dec (!) converter and calculator. Floating point is partially supported.\n")
+ _T(" ?<value> Hex ($, 0x)/Bin (%)/Dec (!) converter and calculator. \"?.\" to include also floating point formats.\n")
#ifdef _WIN32
_T(" x Close debugger.\n")
_T(" xx Switch between console and GUI debugger.\n")
int v = calc(form, &out, tmp, sizeof(tmp) / sizeof(TCHAR));
if (v > 0) {
*val = (uae_u32)out;
+ *valx80 = doubletof80(out);
if (size && *size == 0) {
uae_s32 v = (uae_s32)(*val);
if (v > 255 || v < -127) {
return;
}
- uae_u64 df = floatx80_to_float64(xf, &st);
- uae_u32 sf = floatx80_to_float32(xf, &st);
-
int i, j;
for (i = 0, j = 0; i < 32; i++) {
s[j++] = (v & (1 << (31 - i))) ? '1' : '0';
}
}
s[j] = 0;
- console_out_f(_T("$%08X = %%%s = %u = %d ($%08X.S = $%08X%08X.D = $%04X.%08X%08X.X = %f)\n"), v, s, v, (uae_s32)v,
- sf, (uae_u32)(df >> 32), (uae_u32)df, (uae_u32)(xf.high), (uae_u32)(xf.low >> 32), (uae_u32)xf.low,
- f80todouble(xf));
+ if (debug_float) {
+ uae_u64 df = floatx80_to_float64(xf, &st);
+ uae_u32 sf = floatx80_to_float32(xf, &st);
+ console_out_f(_T("$%08X = %%%s = %u = %d ($%08X.S = $%08X%08X.D = $%04X.%08X%08X.X = %f)\n"), v, s, v, (uae_s32)v,
+ sf, (uae_u32)(df >> 32), (uae_u32)df, (uae_u32)(xf.high), (uae_u32)(xf.low >> 32), (uae_u32)xf.low,
+ f80todouble(xf));
+ } else {
+ console_out_f(_T("$%08X = %%%s = %u = %d\n"), v, s, v, (uae_s32)v);
+ }
}
static bool isrom(uaecptr addr)
endaddr = readhex(cc, NULL);
}
}
- console_out_f (_T("Searching from %08X to %08X..\n"), addr + 1, endaddr);
+ console_out_f (_T("Searching from %08X to %08X..\n"), addr + 1, endaddr - 1);
nextaddr_init(addr);
bool out = false;
while ((addr = nextaddr(addr, endaddr, NULL, true, &out)) != 0xffffffff) {
break;
case 'h':
case '?':
- if (more_params (&inptr))
- converter (&inptr);
- else
+ if (more_params(&inptr)) {
+ if (peekchar(&inptr) == '.') {
+ debug_float = !debug_float;
+ } else {
+ converter(&inptr);
+ }
+ } else {
debug_help ();
+ }
break;
}
return false;