×

Debugging techniques in a multithreaded environment

  • US 6,480,818 B1
  • Filed: 11/13/1998
  • Issued: 11/12/2002
  • Est. Priority Date: 11/13/1998
  • Status: Expired due to Term
First Claim
Patent Images

1. A method for debugging a task executing on a computer system with a processor having multiple streams for executing threads of the task, the method comprising:

  • executing a debugger nub of a specialized type using one thread of the task, the specialized type of the debugger nub chosen based on a type of the task, the debugger nub thread having a breakpoint handler distinct from breakpoint handlers of the other task threads;

    when the debugger nub thread receives a request from a debugger to set a breakpoint at a specified location in the task, performing the request in a specialized manner determined by the specialized type by, identifying an executable instruction at the specified location;

    generating a group of instructions for emulating the identified instruction out-of-line at a location other than the specified location;

    loading the generated group of instructions into the other location; and

    replacing the identified instruction at the specified location with an inserted instruction that when executed will create a break;

    when a thread other than the debugger nub thread encounters the inserted instruction, executing the identified instruction by, transferring control of execution for the thread to the breakpoint handler for the thread;

    notifying the debugger nub of the encounter with the inserted instruction so that the debugger nub can notify the debugger of the encounter; and

    after receiving an indication from the debugger via the debugger nub to resume execution, executing the group of instructions loaded at the other location;

    when the debugger nub thread encounters the inserted instruction, executing the identified instruction by, transferring control of execution for the nub thread to the breakpoint handler for the nub thread; and

    without notifying the debugger of the encounter and without receiving an indication from the debugger to resume execution, executing the group of instructions loaded at the other location; and

    when the debugger nub thread receives a request from another thread to perform an action for the another thread, masking exceptions that occur during performing of the action so that execution of the debugger nub is not halted and so that the debugger nub can notify the debugger of the exceptions.

View all claims
  • 4 Assignments
Timeline View
Assignment View
    ×
    ×