IP Library Granted Patent US 7,865,883
Granted Patent B1
US 7,865,883 · App. 09/438,205 · Granted Jan 4, 2011

Parallel and asynchronous debugger and debugging method for multi-threaded programs

Assignee: Oracle America, Inc.
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 7,865,883
App. No.
09/438,205
Granted
Jan 4, 2011
Kind
B1
Abstract

A debugger for aiding in the debugging of multi-threaded program, in response to an event such as, for example, a breakpoint in a thread which has caused an operating system to stop execution of all threads, identifies the thread which contained the breakpoint. After identifying the thread which contained the breakpoint, the debugger enables the operating system to resume execution of the other threads, that is, the threads which did not contain the breakpoint. By allowing the other threads, that is, the threads which did not contain the breakpoint, to continue execution, the debugger's impact on program execution is substantially reduced, particularly for programs which contain a large number of threads.

Claims (54)

1. A computer-readable storage medium, the computer readable storage medium having stored thereon instructions executable to cause one or more processors to:

execute, on a first processor, two or more threads associated with a program,

in response to a breakpoint event in connection with a breakpoint in a first thread which has caused an operating system to stop execution of the two or more threads associated with the program,

identify, by a debugger, the first thread as containing the breakpoint,

transfer control of the two or more threads associated with the program from the operating system to the debugger,

enable others of the two or more threads to resume executing by passing control of the others of the two or more threads back to the operating system, wherein the others of the two or more threads do not contain the breakpoint instruction, and

simultaneously execute the first thread under control of the debugger, wherein the debugger controls subsequent processing operations in connection with the first thread by receiving commands from a user, and

wherein the commands direct the debugger to step through the first thread.

2. The computer-readable storage medium of claim 1 , further comprising instructions executable to cause the one or more processors to:

initialize an execution environment, the operating system, and the debugger.

3. The computer-readable storage medium of claim 2 , further comprising instructions executable to cause the one or more processors to:

initialize the program; and

in response to a first request from the program, create, under control of the debugger, a second thread among the one or more threads.

4. The computer-readable storage medium of claim 3 , further comprising instructions executable to cause the one or more processors to:

in response to a second request from the program, delete, under the control of the debugger, the second thread.

5. The computer-readable storage medium of claim 3 , wherein the first thread is executed in a first address space and the second thread is executed in a second address space.

6. The computer-readable storage medium of claim 3 , wherein the first thread is executed by the first processor and the second thread is executed by a second processor among the one or more processors.

7. The computer-readable storage medium of claim 6 , further comprising instructions executable to cause the one or more processors to:

display information generated by the first thread and the second thread.

8. A method, comprising:

executing, on a first processor, two or more threads associated with a program;

responsive to the first processor executing a breakpoint instruction, stopping execution of the two or more threads associated with the program;

transferring control of the two or more threads associated with the program from an operating system to a debugger;

identifying as containing the breakpoint instruction, by the debugger, a first thread from among the two or more threads associated with the program;

resuming execution of other threads from among the two or more threads associated with the program by passing control of the other threads back to the operating system, wherein the other threads do not contain the breakpoint instruction; and

simultaneously executing the first thread under control of the debugger, wherein the debugger controls subsequent processing operations in connection with the first thread by receiving commands from a user, and

wherein the commands direct the debugger to step through the first thread.

9. The method of claim 8 , further comprising:

initializing an execution environment, the operating system, and the debugger.

10. The method of claim 9 , further comprising:

initializing the program; and

in response to a first request from the program, the debugger creating a second thread under control of the debugger among the two or more threads.

11. The method of claim 10 , further comprising:

in response to a second request from the program, the debugger deleting the second thread.

12. The method of claim 11 , wherein the first thread is executed in a first address space and the second thread is executed in a second address space.

13. The method of claim 11 , wherein the first thread is executed by the first processor and the second thread is executed by a second processor.

14. The method of claim 13 , further comprising displaying information generated by the first thread and the second thread.

15. A system, the system comprising:

one or more processors;

a memory storing program instructions, wherein the program instructions are executable to cause the one or more processors to execute a method comprising:

executing, on a first processor among the one or more processors, two or more threads associated with a program;

responsive to the first processor executing a breakpoint instruction, stopping execution of the two or more threads associated with the program;

transferring control of the two or more threads associated with the program from an operating system to a debugger;

identifying as containing the breakpoint instruction, by the debugger, a first thread from among the two or more threads associated with the program;

resuming execution of other threads from among the two or more threads associated with the program by passing control of the other threads back to the operating system, wherein the other threads do not contain the breakpoint instruction; and

simultaneously executing the first thread under control of the debugger, wherein the debugger controls subsequent processing operations in connection with the first thread by receiving commands from a user, and

wherein the commands direct the debugger to step through the first thread.

16. The system of claim 15 , wherein the method further comprises initializing an execution environment, the operating system, and the debugger.

17. The system of claim 16 , wherein the method further comprises initializing the program; and

in response to a first request from the program, the debugger creating a second thread under control of the debugger among the two or more threads.

18. The system of claim 17 , wherein the method further comprises

in response to a second request from the program, the debugger deleting the second thread.

19. The system of claim 18 , wherein the first thread is executed in a first address space and the second thread is executed in a second address space.

20. The system of claim 18 , wherein the first thread is executed by the first processor and the second thread is executed by a second processor.

Assignments (2)
MERGER AND CHANGE OF NAME Recorded Dec 16, 2015
From: ORACLE USA, INC.; SUN MICROSYSTEMS, INC.; ORACLE AMERICA, INC.
To: ORACLE AMERICA, INC.
Reel/Frame 037306/0556 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Feb 11, 2002
From: SISTARE, STEVEN J.; PLAUGER, DAVID
To: SUN MICROSYSTEMS, INC.
Reel/Frame 012589/0378 →