Method and system for debugging a program from within a thread of execution of the program
First Claim
1. A computer-implemented method for debugging a program on a computer, the program including at least one object and executing within a process defined within a memory, the computer-implemented method comprising:
- loading a debugger into a thread of execution of the program being debugged;
running the debugger in the thread of execution being debugged to debug the program;
calling an interface of the object via the debugger;
creating a socket for communicating with the debugger;
sending commands through the socket to the debugger for conversion into function calls to the object interface;
establishing communication with a console module located outside of the process;
receiving a command from the console module; and
converting the command into functions calls to the object interface.
1 Assignment
0 Petitions
Accused Products
Abstract
In a method and system for debugging a program, a debugging module is loaded into a normal thread of execution of the program. A user may then send commands to the debugger module from a command console module operating in a safe separate process. The debugger module receives the commands and converts them into function calls to objects that are accessible by the program. This allows the user to interact manually with the objects and achieve substantially the same responses from the object as the program itself would have obtained during its normal execution. Thus the user can effectively debug the program without having to know the internal structure of any of its constituent objects.
-
Citations
11 Claims
-
1. A computer-implemented method for debugging a program on a computer, the program including at least one object and executing within a process defined within a memory, the computer-implemented method comprising:
-
loading a debugger into a thread of execution of the program being debugged; running the debugger in the thread of execution being debugged to debug the program; calling an interface of the object via the debugger; creating a socket for communicating with the debugger; sending commands through the socket to the debugger for conversion into function calls to the object interface; establishing communication with a console module located outside of the process; receiving a command from the console module; and converting the command into functions calls to the object interface. - View Dependent Claims (2, 3, 4, 5, 6)
-
-
7. A computer-implemented method for debugging a program on a computer, the program executing within a process defined within a memory, the computer-implemented method comprising:
-
halting a thread of execution of the program being debugged, wherein the thread is associated with context data describing context of the thread; obtaining a pointer to an interface of an object of the program from the context data; referencing the pointer to make function calls manually to the object interface from within the context of the thread being debugged; establishing communication with a console module located outside of the process, the establishing comprising creating a socket within the context of the thread and communicating with the console module via the socket; receiving a command from the console module; and converting the command into functions calls to the object interface. - View Dependent Claims (8, 9)
-
-
10. Stored on a computer having a memory, a system for communicating with an object that is accessible by a program having a thread of execution within the memory, the thread being associated with context data for describing a context of the thread, the system comprising:
-
a debugger module of a plurality of debugger modules running on the thread of execution on which the object is accessible to the program, the thread of execution on which the object is accessible to the program having the context of the thread of the program being debugged; a socket accessible by the debugger module for sending and receiving messages; a console module operating outside of the context of the thread for receiving a command from a user and sending the command to the debugger module via the socket, wherein the debugger module;
(i) receives the command on the thread of execution on which the object is accessible to the program;
(ii) converts the command into a function call to the object; and
(iii) invokes the function call on the thread of execution on which the object is accessible to the program; anda multiplexor module for multiplexing commands from the console module to each of the plurality of debugger modules. - View Dependent Claims (11)
-
Specification