mirror of
https://github.com/ksherlock/mpw.git
synced 2025-01-09 13:30:34 +00:00
display trap name for GetToolTrap, etc.
This commit is contained in:
parent
d043ff9d9c
commit
2bb2bd4326
@ -47,6 +47,7 @@
|
||||
|
||||
#include <macos/sysequ.h>
|
||||
#include <macos/errors.h>
|
||||
#include <macos/traps.h>
|
||||
|
||||
#include "os.h"
|
||||
#include "os_internal.h"
|
||||
@ -1042,7 +1043,10 @@ namespace OS
|
||||
*
|
||||
*/
|
||||
uint16_t trapNumber = cpuGetDReg(0);
|
||||
Log("%04x GetToolTrapAddress($%04x)\n", trap, trapNumber);
|
||||
const char *trapName = TrapName(trapNumber | 0xa800);
|
||||
if (!trapName) trapName = "Unknown";
|
||||
|
||||
Log("%04x GetToolTrapAddress($%04x %s)\n", trap, trapNumber, trapName);
|
||||
|
||||
cpuSetAReg(0, 0);
|
||||
return MacOS::dsCoreErr;
|
||||
@ -1066,9 +1070,11 @@ namespace OS
|
||||
|
||||
uint16_t trapNumber = cpuGetDReg(0);
|
||||
uint32_t trapAddress = cpuGetAReg(0);
|
||||
const char *trapName = TrapName(trapNumber | 0xa800);
|
||||
if (!trapName) trapName = "Unknown";
|
||||
|
||||
Log("%04x SetToolTrapAddress($%08x, $%04x)\n",
|
||||
trap, trapAddress, trapNumber);
|
||||
Log("%04x SetToolTrapAddress($%08x, $%04x %s)\n",
|
||||
trap, trapAddress, trapNumber, trapName);
|
||||
|
||||
|
||||
return MacOS::dsCoreErr;
|
||||
@ -1085,7 +1091,10 @@ namespace OS
|
||||
*
|
||||
*/
|
||||
uint16_t trapNumber = cpuGetDReg(0);
|
||||
Log("%04x GetOSTrapAddress($%04x)\n", trap, trapNumber);
|
||||
const char *trapName = TrapName(trapNumber | 0xa000);
|
||||
if (!trapName) trapName = "Unknown";
|
||||
|
||||
Log("%04x GetOSTrapAddress($%04x %s)\n", trap, trapNumber, trapName);
|
||||
|
||||
cpuSetAReg(0, 0);
|
||||
return MacOS::dsCoreErr;
|
||||
@ -1287,4 +1296,4 @@ namespace OS
|
||||
return MacOS::noErr;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user