display trap name for GetToolTrap, etc.

This commit is contained in:
Kelvin Sherlock 2014-12-05 14:32:18 -05:00
parent d043ff9d9c
commit 2bb2bd4326

View File

@ -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;
}
}
}