From 4bbcdb5618deec0f541579591c7af3ccf05c3303 Mon Sep 17 00:00:00 2001 From: Paul Koning Date: Mon, 10 Oct 2022 13:38:09 -0400 Subject: [PATCH] PDP11: Fix PC breakpoint check Don't modify the CPU state when checking for physical address match on PC address breakpoints. Reported and verified by Lars. --- PDP11/pdp11_cpu.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/PDP11/pdp11_cpu.c b/PDP11/pdp11_cpu.c index 72f953a5..1f8adca9 100644 --- a/PDP11/pdp11_cpu.c +++ b/PDP11/pdp11_cpu.c @@ -347,6 +347,7 @@ int32 relocW (int32 addr); void relocR_test (int32 va, int32 apridx); void relocW_test (int32 va, int32 apridx); int32 clean_MMR1 (int32 mmr1); +int32 relocC (int32 va, int32 sw); t_bool PLF_test (int32 va, int32 apr); void reloc_abort (int32 err, int32 apridx); int32 ReadE (int32 addr); @@ -948,7 +949,7 @@ while (reason == 0) { inst_psw = get_PSW (); saved_sim_interval = sim_interval; if (BPT_SUMM_PC) { /* possible breakpoint */ - t_addr pa = relocR (PC | isenable); /* relocate PC */ + t_addr pa = relocC (PC, 0); /* relocate PC */ if (sim_brk_test (PC, BPT_PCVIR) || /* Normal PC breakpoint? */ sim_brk_test (pa, BPT_PCPHY)) /* Physical Address breakpoint? */ ABORT (ABRT_BKPT); /* stop simulation */