| 308 | } |
| 309 | |
| 310 | static void debugreportalloc(struct debugmemallocs *a) |
| 311 | { |
| 312 | uae_u32 off = debugmem_bank.start; |
| 313 | if (a->type == DEBUGALLOC_HUNK) { |
| 314 | console_out_f(_T("Segment %d: %08x %08x - %08x (%d)"), |
| 315 | a->id, a->idtype, a->start + off, a->start + off + a->size - 1, a->size); |
| 316 | if (a->name) { |
| 317 | console_out_f(_T(" %s"), a->name); |
| 318 | } |
| 319 | console_out_f(_T("\n")); |
| 320 | } else if (a->type == DEBUGALLOC_ALLOCMEM) { |
| 321 | console_out_f(_T("AllocMem ID=%4d: %08x %08x - %08x (%d) AllocFlags: %08x PC: %08x\n"), |
| 322 | a->id, a->idtype, a->start + off, a->start + off + a->size - 1, a->size, a->data, a->pc); |
| 323 | } else if (a->type == DEBUGALLOC_ALLOCVEC) { |
| 324 | console_out_f(_T("AllocVec ID=%4d: %08x %08x - %08x (%d) AllocFlags: %08x PC: %08x\n"), |
| 325 | a->id, a->idtype, a->start + off, a->start + off + a->size - 1, a->size, a->data, a->pc); |
| 326 | } else if (a->type == DEBUGALLOC_SEG) { |
| 327 | static int lastsegment; |
| 328 | struct debugsegtracker *sg = NULL; |
| 329 | const TCHAR *name = _T("<unknown>"); |
| 330 | for (int i = 0; i < MAX_DEBUGSEGS; i++) { |
| 331 | sg = dsegt[(i + lastsegment) % MAX_DEBUGSEGS]; |
| 332 | if (sg->allocid == a->parentid) { |
| 333 | name = sg->name; |
| 334 | lastsegment = i; |
| 335 | break; |
| 336 | } |
| 337 | } |
| 338 | console_out_f(_T("Segment %d (%s): %08x %08x - %08x (%d)\n"), |
| 339 | a->internalid, name, a->idtype, a->start, a->start + a->size - 1, a->size); |
| 340 | } |
| 341 | } |
| 342 | |
| 343 | static void debugreport(struct debugmemdata *dm, uaecptr addr, int rwi, int size, const TCHAR *msg) |
| 344 | { |
no test coverage detected