/[cmucl]/src/lisp/breakpoint.c
ViewVC logotype

Diff of /src/lisp/breakpoint.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.15 by rtoy, Thu Mar 17 23:13:55 2005 UTC revision 1.16 by rtoy, Fri Mar 18 05:30:50 2005 UTC
# Line 119  static int compute_offset(os_context_t * Line 119  static int compute_offset(os_context_t *
119              int offset = pc - code_start;              int offset = pc - code_start;
120              if (offset >= codeptr->code_size) {              if (offset >= codeptr->code_size) {
121                if (function_end) {                if (function_end) {
122  #ifdef sparc  #if defined(sparc) || defined(DARWIN)
123                  /*                  /*
124                   * We're in a function end breakpoint.  Compute the                   * We're in a function end breakpoint.  Compute the
125                   * offset from the (known) breakpoint location and the                   * offset from the (known) breakpoint location and the
# Line 203  void *handle_function_end_breakpoint(int Line 203  void *handle_function_end_breakpoint(int
203      code = find_code(scp);      code = find_code(scp);
204      codeptr = (struct code *)PTR(code);      codeptr = (struct code *)PTR(code);
205      offset = compute_offset(scp, code, 1);      offset = compute_offset(scp, code, 1);
206    #if 0
207        printf("handle_function_end:\n");
208        printf(" code    = 0x%08x\n", code);
209        printf(" codeptr = %p\n", codeptr);
210        printf(" offset  = %d\n", fixnum_value(offset));
211        fflush(stdout);
212    #endif
213    
214      if (offset < 0)      if (offset < 0)
215        {        {
# Line 213  void *handle_function_end_breakpoint(int Line 220  void *handle_function_end_breakpoint(int
220           * appropriately so the breakpoint handler can do the right           * appropriately so the breakpoint handler can do the right
221           * thing.           * thing.
222           */           */
223          unsigned long pc;          unsigned int pc;
224    
225          pc = SC_PC(scp);          pc = SC_PC(scp);
226    
# Line 228  void *handle_function_end_breakpoint(int Line 235  void *handle_function_end_breakpoint(int
235          code -= sizeof(struct code) + BOGUS_LRA_CONSTANTS*sizeof(lispobj);          code -= sizeof(struct code) + BOGUS_LRA_CONSTANTS*sizeof(lispobj);
236          code += type_OtherPointer;          code += type_OtherPointer;
237          codeptr = (struct code *) PTR(code);          codeptr = (struct code *) PTR(code);
238    #if 0
239            printf("  pc   = 0x%08x\n", pc);
240            printf("  code    = 0x%08x\n", code);
241            printf("  codeptr = %p\n", codeptr);
242            fflush(stdout);
243    #endif
244        }        }
245    
246      funcall3(SymbolFunction(HANDLE_BREAKPOINT),      funcall3(SymbolFunction(HANDLE_BREAKPOINT),

Legend:
Removed from v.1.15  
changed lines
  Added in v.1.16

  ViewVC Help
Powered by ViewVC 1.1.5