Debugger: Fill in segment in debugger entry

This commit is contained in:
Vicki Pfau 2023-05-28 21:11:48 -07:00
parent b94cd7f1dc
commit a161dfeb31
3 changed files with 3 additions and 0 deletions

View File

@ -61,6 +61,7 @@ enum mDebuggerEntryReason {
struct mDebuggerModule;
struct mDebuggerEntryInfo {
uint32_t address;
int segment;
union {
struct {
uint32_t oldValue;

View File

@ -54,6 +54,7 @@ static void SM83DebuggerCheckBreakpoints(struct mDebuggerPlatform* d) {
}
struct mDebuggerEntryInfo info = {
.address = breakpoint->address,
.segment = debugger->cpu->memory.currentSegment(debugger->cpu, breakpoint->address),
.pointId = breakpoint->id,
.target = TableLookup(&d->p->pointOwner, breakpoint->id)
};

View File

@ -62,6 +62,7 @@ static bool _checkWatchpoints(struct SM83Debugger* debugger, uint16_t address, s
info->type.wp.oldValue = oldValue;
info->type.wp.newValue = newValue;
info->address = address;
info->segment = debugger->originalMemory.currentSegment(debugger->cpu, address);
info->type.wp.watchType = watchpoint->type;
info->type.wp.accessType = type;
info->pointId = watchpoint->id;