Changeset 5274


Ignore:
Timestamp:
Sep 27, 2006, 4:41:23 AM (18 years ago)
Author:
Gary Byers
Message:

Decode and handle UUO_ERROR_DEBUG_TRAP_WITH_STRING.

Location:
trunk/ccl/lisp-kernel
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/ccl/lisp-kernel/x86-exceptions.c

    r5240 r5274  
    628628
    629629#endif
     630
     631void
     632get_lisp_string(LispObj lisp_string, char *c_string, natural max)
     633{
     634  lisp_char_code *src = (lisp_char_code *)  (ptr_from_lispobj(lisp_string + misc_data_offset));
     635  natural i, n = header_element_count(header_of(lisp_string));
     636
     637  if (n > max) {
     638    n = max;
     639  }
     640
     641  for (i = 0; i < n; i++) {
     642    c_string[i] = 0xff & (src[i]);
     643  }
     644  c_string[n] = 0;
     645}
    630646
    631647Boolean
     
    661677          xpPC(context) = (natural) (program_counter+1);
    662678          lisp_Debugger(context, info, debug_entry_dbg, "Lisp Breakpoint");
     679          return true;
     680
     681        case UUO_DEBUG_TRAP_WITH_STRING:
     682          xpPC(context) = (natural) (program_counter+1);
     683          {
     684            char msg[512];
     685
     686            get_lisp_string(xpGPR(context,Iarg_z),msg, sizeof(msg)-1);
     687            lisp_Debugger(context, info, debug_entry_dbg, msg);
     688          }
    663689          return true;
    664690         
  • trunk/ccl/lisp-kernel/x86-exceptions.h

    r5033 r5274  
    9292#define UUO_ALLOC_TRAP 0xc5
    9393#define UUO_DEBUG_TRAP 0xca
     94#define UUO_DEBUG_TRAP_WITH_STRING 0xcd
    9495
    9596#define XUUO_OPCODE_0 0x0f
Note: See TracChangeset for help on using the changeset viewer.