Raymond Toy pushed to branch issue-97-define-ud2-inst at cmucl / cmucl
Commits:
-
7a5d8ab5
by Raymond Toy at 2021-03-20T09:12:14-07:00
-
b972a606
by Raymond Toy at 2021-03-20T09:13:12-07:00
-
ba580ebe
by Raymond Toy at 2021-03-20T09:22:24-07:00
-
d9cbe149
by Raymond Toy at 2021-03-20T09:24:56-07:00
4 changed files:
Changes:
... | ... | @@ -247,13 +247,13 @@ |
247 | 247 |
(vector (make-array length :element-type '(unsigned-byte 8))))
|
248 | 248 |
(declare (type (unsigned-byte 8) length)
|
249 | 249 |
(type (simple-array (unsigned-byte 8) (*)) vector))
|
250 |
+ #+nil
|
|
250 | 251 |
(format t "internal-error-args scp ~A: pc ~X len ~D~%" scp pc length)
|
251 | 252 |
;; Grab the bytes after length byte, which
|
252 | 253 |
(copy-from-system-area pc (* vm:byte-bits 4)
|
253 | 254 |
vector (* vm:word-bits
|
254 | 255 |
vm:vector-data-offset)
|
255 | 256 |
(* length vm:byte-bits))
|
256 |
- (format t " vector ~A~%" vector)
|
|
257 | 257 |
(let* ((index 0)
|
258 | 258 |
(error-number (c::read-var-integer vector index)))
|
259 | 259 |
(collect ((sc-offsets))
|
... | ... | @@ -2099,20 +2099,9 @@ |
2099 | 2099 |
(sc-offsets)
|
2100 | 2100 |
(lengths))))))))
|
2101 | 2101 |
|
2102 |
-#+nil
|
|
2103 |
-(defmacro break-cases (breaknum &body cases)
|
|
2104 |
- (let ((bn-temp (gensym)))
|
|
2105 |
- (collect ((clauses))
|
|
2106 |
- (dolist (case cases)
|
|
2107 |
- (clauses `((= ,bn-temp ,(car case)) ,@(cdr case))))
|
|
2108 |
- `(let ((,bn-temp ,breaknum))
|
|
2109 |
- (cond ,@(clauses))))))
|
|
2110 |
- |
|
2111 | 2102 |
(defun break-control (chunk inst stream dstate)
|
2112 |
- #+nil(declare (ignore inst))
|
|
2103 |
+ (declare (ignore inst))
|
|
2113 | 2104 |
(flet ((nt (x) (if stream (disassem:note x dstate))))
|
2114 |
- (format t "break-control: inst = ~A code = ~A~%" inst (break-code chunk dstate))
|
|
2115 |
- (describe inst)
|
|
2116 | 2105 |
(case (break-code chunk dstate)
|
2117 | 2106 |
(#.vm:error-trap
|
2118 | 2107 |
(nt "Error trap")
|
... | ... | @@ -142,7 +142,7 @@ arch_skip_instruction(os_context_t * context) |
142 | 142 |
{
|
143 | 143 |
int vlen, code;
|
144 | 144 |
|
145 |
- DPRINTF(1, (stderr, "[arch_skip_inst at %lx>]\n", SC_PC(context)));
|
|
145 |
+ DPRINTF(0, (stderr, "[arch_skip_inst at %lx>]\n", SC_PC(context)));
|
|
146 | 146 |
|
147 | 147 |
/* Get and skip the lisp error code. */
|
148 | 148 |
char* pc = (char *) SC_PC(context);
|
... | ... | @@ -180,7 +180,7 @@ arch_skip_instruction(os_context_t * context) |
180 | 180 |
break;
|
181 | 181 |
}
|
182 | 182 |
|
183 |
- DPRINTF(1, (stderr, "[arch_skip_inst resuming at %lx>]\n", SC_PC(context)));
|
|
183 |
+ DPRINTF(0, (stderr, "[arch_skip_inst resuming at %lx>]\n", SC_PC(context)));
|
|
184 | 184 |
}
|
185 | 185 |
|
186 | 186 |
unsigned char *
|
... | ... | @@ -300,7 +300,7 @@ sigill_handler(HANDLER_ARGS) |
300 | 300 |
{
|
301 | 301 |
unsigned int trap;
|
302 | 302 |
os_context_t* os_context = (os_context_t *) context;
|
303 |
-#if 1
|
|
303 |
+#if 0
|
|
304 | 304 |
#if 0
|
305 | 305 |
fprintf(stderr, "x86sigtrap: %8x %x\n",
|
306 | 306 |
SC_PC(os_os_context), *(unsigned char *) (SC_PC(os_context) - 1));
|
... | ... | @@ -374,14 +374,18 @@ sigill_handler(HANDLER_ARGS) |
374 | 374 |
* arguments to follow.
|
375 | 375 |
*/
|
376 | 376 |
|
377 |
+#if 0
|
|
377 | 378 |
fprintf(stderr, "pc %x\n", *(unsigned short *)SC_PC(context));
|
379 |
+#endif
|
|
378 | 380 |
if (*(unsigned short *) SC_PC(context) == 0x0b0f) {
|
379 | 381 |
trap = *(((char *)SC_PC(context)) + 2);
|
380 | 382 |
} else {
|
381 | 383 |
abort();
|
382 | 384 |
}
|
383 | 385 |
|
386 |
+#if 0
|
|
384 | 387 |
fprintf(stderr, "code = %x\n", trap);
|
388 |
+#endif
|
|
385 | 389 |
|
386 | 390 |
switch (trap) {
|
387 | 391 |
case trap_PendingInterrupt:
|
... | ... | @@ -302,7 +302,7 @@ ENDFUNC(do_pending_interrupt) |
302 | 302 |
|
303 | 303 |
#ifdef trap_DynamicSpaceOverflowError
|
304 | 304 |
FUNCDEF(do_dynamic_space_overflow_error)
|
305 |
- INT3
|
|
305 |
+ ud2
|
|
306 | 306 |
.byte trap_DynamicSpaceOverflowError
|
307 | 307 |
ret
|
308 | 308 |
ENDFUNC(do_dynamic_space_overflow_error)
|
... | ... | @@ -310,7 +310,7 @@ ENDFUNC(do_dynamic_space_overflow_error) |
310 | 310 |
|
311 | 311 |
#ifdef trap_DynamicSpaceOverflowWarning
|
312 | 312 |
FUNCDEF(do_dynamic_space_overflow_warning)
|
313 |
- INT3
|
|
313 |
+ ud2
|
|
314 | 314 |
.byte trap_DynamicSpaceOverflowWarning
|
315 | 315 |
ret
|
316 | 316 |
ENDFUNC(do_dynamic_space_overflow_warning)
|
... | ... | @@ -493,7 +493,7 @@ FUNCDEF(undefined_foreign_symbol_trap) |
493 | 493 |
movl 8(%ebp),%eax
|
494 | 494 |
|
495 | 495 |
/* Now trap to Lisp */
|
496 |
- INT3
|
|
496 |
+ ud2
|
|
497 | 497 |
.byte trap_Error
|
498 | 498 |
/* Number of argument bytes */
|
499 | 499 |
.byte 2
|