Method of walking-up a call stack for a client/server program that uses remote procedure call
First Claim
1. A method for debugging a distributed computer program comprising a client program executing on a first portion of a distributed data processing system and a server program executing on a second portion of the distributed data processing system, said method comprising the steps of:
- (a) determining a first call stack on the first portion of the distributed data processing system of the client program;
(b) determining a second call stack on the second portion of the distributed data processing system of the server program by evaluating remote procedure call (RPC) run-time data structures;
(c) appending the first call stack and second call stack together on the first portion of the distributed data processing system to form a single distributed call stack;
(d) displaying on the first portion of the distributed data processing system the single distributed call stack;
(e) setting a current context to a context where a breakpoint occurs;
(f) walking up a call stack of the current context;
(g) for each routine in the current context call stack, determining if it is a server dispatch routine, andif it'"'"'s not a server dispatch routine, outputting the program name and continuing up the current context call stack, andif it is a server dispatch routine, obtaining a context of a client dispatched by the server dispatch routine, and setting the current context to the context of the dispatched client;
(h) walking up a call stack of the current context of the dispatched client; and
(i) for each routine in the call stack of the current context of the dispatched client, determining if it is a client call, and if it is a client call, looping back to step (f).
0 Assignments
0 Petitions
Accused Products
Abstract
When displaying the caller stack of a distributed client/server program that uses Remote Procedure Calls (RPC), the user is provided the capability of viewing the RPC calls in the same manner as normal procedure calls. When a breakpoint is encountered in an RPC server program while using a debugger for distributed programs, the call stacks for the client and server program are appended together into a single distributed call stack. In the case of nested RPC calls (e.g. program A executes an RPC call to program B which executes an RPC call to C and so on) all of the call stacks are appended together in the order they were created. The distributed call stack may span many programs, threads of execution, and computing machines. The distributed call stack may be used to select a routine from the call stack when setting a context for a tool that displays program state information. For example, when the user selects a particular routine from the distributed call stack, the source listing, variables that are currently in scope, and thread executing the routine may be shown in various display windows.
48 Citations
4 Claims
-
1. A method for debugging a distributed computer program comprising a client program executing on a first portion of a distributed data processing system and a server program executing on a second portion of the distributed data processing system, said method comprising the steps of:
-
(a) determining a first call stack on the first portion of the distributed data processing system of the client program; (b) determining a second call stack on the second portion of the distributed data processing system of the server program by evaluating remote procedure call (RPC) run-time data structures; (c) appending the first call stack and second call stack together on the first portion of the distributed data processing system to form a single distributed call stack; (d) displaying on the first portion of the distributed data processing system the single distributed call stack; (e) setting a current context to a context where a breakpoint occurs; (f) walking up a call stack of the current context; (g) for each routine in the current context call stack, determining if it is a server dispatch routine, and if it'"'"'s not a server dispatch routine, outputting the program name and continuing up the current context call stack, and if it is a server dispatch routine, obtaining a context of a client dispatched by the server dispatch routine, and setting the current context to the context of the dispatched client; (h) walking up a call stack of the current context of the dispatched client; and (i) for each routine in the call stack of the current context of the dispatched client, determining if it is a client call, and if it is a client call, looping back to step (f).
-
-
2. A method for debugging a distributed computer program executing on a distributed data processing system, said method comprising the steps of:
-
(a) encountering a breakpoint in the distributed computer program; (b) stopping all threads which comprise the distributed computer program; (c) setting a current context to a context of a routine where the breakpoint occurred; (d) walking up the call stack; (e) for each routine in the call stack, determining if it is a server dispatch routine; (f) for each routine, if it'"'"'s not a server dispatch routine, outputting the program name and continuing up the call stack; (g) for each routine, if it is a server dispatch routine, obtaining a context of a client; (h) setting the current context to context of the client; (i) walking up the client call stack; (j) for each routine, determining if it is a client call; and (k) for each routine, if it is a client call, looping back to step (d).
-
-
3. A distributed data processing system for debugging a distributed computer program comprising a client program executing on a first portion of the distributed data processing system and a server program executing on a second portion of the distributed data processing system, said distributed data processing system comprising:
-
(a) means for determining a first call stack on the first portion of the distributed data processing system of the client program; (b) means for determining a second call stack on the second portion of the distributed data processing system of the server program by evaluating remote procedure call (RPC) run-time data structures; (c) means for appending the first call stack and second call stack together on the first portion of the distributed data processing system to form a single distributed call stack; (d) means for displaying on the first portion of the distributed data processing system the single distributed call stack; (e) means for setting a current context to a context where a breakpoint occurs; (f) means for walking up a call stack of the current context; (g) means for determining for each routine in the current context call stack, if it is a server dispatch routine, and if it'"'"'s not a server dispatch routine, means for outputting the program name and continuing up the current context call stack, and if it is a server dispatch routine, means for obtaining a context of a client dispatched by the server dispatch routine, and setting the current context to the context of the dispatched client; (h) means for walking up a call stack of the current context of the dispatched client; and (i) means for determining for each routine in the call stack of the current context of the dispatched client, if it is a client call, and if it is a client call, means for looping back to means (f).
-
-
4. A distributed data processing system for debugging a distributed computer program, said system comprising:
-
(a) means for encountering a breakpoint in the distributed computer program; (b) means for stopping all threads which comprise the distributed computer program; (c) means for setting a current context to a context of a routine where the breakpoint occurred; (d) means for walking up the call stack; (e) means for determining for each routine in the call stack, if it is a server dispatch routine; (f) means for outputting the program name for each routine, if it'"'"'s not a server dispatch routine, and continuing up the call stack; (g) means for obtaining a context of a client for each routine, if it is a server dispatch routine; (h) means for setting the current context to context of the client; (i) means for walking up the client call stack; (j) means for determining for each routine, if it is a client call; and (k) means for looping back to means (d) for each routine, if it is a client call.
-
Specification