From 1e18375f41a36c1f3a341e442d7332db6e52ff48 Mon Sep 17 00:00:00 2001
From: ram <ram>
Date: Wed, 20 Jun 1990 15:41:18 +0000
Subject: [PATCH] Added a hack to prevent DEBUG-FUNCTION-FROM-PC by being
 confused by the internal error return PCs on the RT (which point after the
 last instruction in the error code, which may be in the next block's
 elsewhere code.)  This situation is truly ambiguous, but by resolving in
 favor of the previous block we do much better.

---
 code/debug-int.lisp | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/code/debug-int.lisp b/code/debug-int.lisp
index 485cde3e5..dc3086442 100644
--- a/code/debug-int.lisp
+++ b/code/debug-int.lisp
@@ -792,6 +792,10 @@
 	    (loop
 	      (when (or (= i len)
 			(< pc (if elsewhere-p
+				  #+rt-target
+				  (1+ (c::compiled-debug-function-elsewhere-pc
+				       (svref function-map (1+ i))))
+				  #-rt-target
 				  (c::compiled-debug-function-elsewhere-pc
 				   (svref function-map (1+ i)))
 				  (svref function-map i))))
-- 
GitLab