摘要:
A method, computer-readable storage medium, and computer system are provided. In an embodiment, in response to a command that requests setting a breakpoint at a line in a module, a determination is made whether a snapshot instruction exists before a machine instruction that implements a source statement at the line. If the snapshot instruction exists before the machine instruction that implements the source statement at the line, the breakpoint is set at the machine instruction that implements the source statement at the line. If the snapshot instruction does not exist before the machine instruction that implements the source statement at the line, the module is recompiled to add the snapshot instruction before the machine instruction that implements the source statement.
摘要:
In an embodiment, in response to reading a declaration of a function that specifies a name of the function and a type of memory on which the function operates, the name of the function, a pointer to the function, and the type are saved to a template. In response to reading a call statement that specifies the name of the function and an identifier of an object, first code is generated. The first code, when executed, reads the pointer to the function from a virtual function table pointed to by the object, finds an entry in the virtual function table that represents the function, and reads the pointer from the entry in the virtual function table. The call statement, when executed, requests a call of the function. Second code is generated that, when executed, calls the function using the pointer read from the virtual function table.
摘要:
Compiling source code includes receiving, by an optimizing compiler from a debugger, a variable value modification profile that specifies locations in the source code at which variable values modified during a debug session; compiling the source code, including: inserting snapshots at one or more of the locations in the source code at which variable values were modified, each snapshot including a breakpoint; and only for each snapshot at a location in the source code at which variable values were modified: inserting, between the breakpoint and remaining source code at the location of the snapshot, a module of computer program instructions that when executed retrieves a current value of a variable and stores the current value in a register; and recording the location of each inserted snapshot; and providing, to the debugger by the optimizing compiler, the recorded locations of each inserted snapshot along with the compiled source code.
摘要:
In an embodiment, a first execution path in a program is determined that has been executed a largest number of times, as compared to at least one other path in the program. Swapped instructions are replaced in the program with breakpoints, wherein the swapped instructions are not on the first execution path. The breakpoints that are not on the first execution path and that are contiguous to each other are replaced in the program with a control word.
摘要:
In a distributed system that includes a debug server and debug clients coupled for data communications through a data communications network, where the debug server includes a debug administrator, a message router, a back-end debugger, and a debuggee, collaborative software debugging includes receiving application-level messages, including receiving, from a requesting debug client, a request to establish a dynamic breakpoint at location in source code; routing the application-level messages among the debug clients, the debug administrator, and the back-end debugger, including providing distributed control of the back-end debugger, sending to the debug administrator an instruction to register the dynamic breakpoint, and sending to the back-end debugger a command to establish the dynamic breakpoint; establishing the dynamic breakpoint; registering the requesting debug client's dynamic breakpoint; and returning, by the debug server to the debug clients in response to the application-level messages routed to the back-end debugger, client-specific debug results.
摘要:
In a distributed system that includes a debug server and debug clients coupled for data communications, where the debug server includes a debug administrator, a message router, a back-end debugger, and a debuggee, collaborative software debugging includes receiving a number of application-level messages including a request to resume execution of the debuggee; routing the messages by the message router, providing distributed control of the back-end debugger to the debug clients, including: polling one or more debug clients for approval to resume execution of the debuggee and resuming execution of the debuggee only if a number of debug clients providing approval to resume execution of the debuggee exceeds a predefined threshold, and returning, by the debug server to the debug clients in response to the application-level messages routed to the back-end debugger, client-specific debug results.
摘要:
A method, system and program product for monitoring changes to a variable within a critical section of a threaded program. The method includes establishing, using a debugging tool, a watch for monitoring changes to a variable that occur outside of the critical section and executing a portion of the threaded program with a debugger. Further, the method includes determining, using the tool, whether or not a thread has executed a start breakpoint set for the critical section, if the thread has executed the start breakpoint set, determining whether or not the thread has executed an end breakpoint set for the critical section, and if the thread has not executed the end breakpoint set, displaying any watches triggered responsive to updates to the variable that occur outside of the critical section, such that, only updates to the variable that occur outside of the critical section will trigger the displaying.
摘要:
A method, computer-readable storage medium, and computer system are provided. In an embodiment, a command is received that specifies a debug compile option and requests a compile of a module into object code. If the debug compile option specifies a first debug compile option, snapshot instructions are inserted immediately prior to each machine instruction in the object code at which a breakpoint was previously set. If the debug compile option specifies the first debug compile option, snapshot instructions are inserted immediately prior to each machine instruction in the object code that implements a control flow statement.
摘要:
User-specific software debugging with user-specific step commands that includes: receiving a command to step execution to a source code module associated with a user; identifying routines in a call stack associated with the user; inserting, for each identified routine, a breakpoint at each source code line of the routine; inserting, for each source code module associated with the user and not in the call stack, a breakpoint at an entry point of the source code module; and executing the debuggee until the debuggee encounters one of the inserted breakpoints thereby halting execution of the debuggee. User-specific debugging with user-specific Dynamically Linked Library (DLL) load processing modes including: receiving a selection of a user-specific DLL processing mode; upon loading a DLL, retrieving a user identification; determining whether the DLL is associated with the user; and processing the DLL in accordance with user specific DLL processing mode only if the DLL is associated with the user.
摘要:
A debugger includes a thread holding mechanism that analyzes the code being executed by multiple threads, and delays holding each thread that is currently executing system code external to the program until the thread is no longer executing the system code external to the program, or until some threshold is exceeded. Delaying holding of a thread that is executing system code external to the program avoids potential conditions that could lock up the debugger.