1. Field of the Invention
The present invention relates to a thread debugging device, a thread debugging method and an information storage medium for debugging at least one thread among a plurality of threads which are executed in association with each other on a computer.
2. Description of the Related Art
A debugger is a computer program for supporting the location of failures (bugs) in computer programs. Using a debugger allows a user to arbitrarily set a breakpoint in a source program whereby execution of the program can be interrupted at a point corresponding to the breakpoint and execution of the interrupted program can be restarted. Further, using a debugger also allows a user to execute a program by a predetermined processing amount (for example, commands corresponding to one step of a source program) and to verify data contents stored in a register or memory during execution or interruption of the program.
In particular, a debugger using the GNU source-level debugger (GDB) makes it possible to arbitrarily specify all or some of a plurality of threads or processes to be executed on a computer, to interrupt or restart execution of the specified threads or processes or to perform execution thereof by a predetermined processing amount (see the following reference).
Richard Stallman, Roland Pesch, Stan Shebs, et.al., “Debugging with GDB” [online], Mar. 2000, [retrieved on Sep. 22, 2005] Retrieved from the Internet: <URL:http://www.asahi-net.or.jp/˜wg5 k-ickw/html/online/gdb-5.0/gdb-ja_toc.html>.
However, when the aforementioned prior art technique is applied to a part of a group of threads which operate in association with each other, some disadvantage may arise. Specifically, when only some of threads to be debugged are executed among the plurality of thread groups which operate in association with each other, the execution environment of the thread to be debugged becomes significantly different from its original execution environment. This is because since the threads not to be debugged are not executed, reference of the data in a memory shared by these threads becomes impossible, or a hardware resource shared by the threads is not mapped and therefore an address space itself to be referenced by the thread to be debugged becomes different from the original one.
On the other hand, since debugging is carried out in an execution environment similar to the original execution environment, when a group of threads which operate in association with each other operates around the same time, any of the threads except the thread to be debugged access a hardware resource such as a memory on a computer, as a result of which, for example, a variable that is referenced in common is rewritten. Therefore, for example, if a user tries to prove the details of processing for only the thread to be debugged after a certain point, an operation by only the thread to be debugged cannot be traced.
The present invention has been made in view of the aforementioned circumstances, and an object of the invention is to provide a thread debugging device, a thread debugging method and an information storage medium which can provide reliable debugging when at least one thread among a plurality of threads which are adapted to operate in association with each other is debugged.