Patent Publication Number: US-5835699-A

Title: Breakpoint setting/deleting system using a symbolic debugger in a digital data processing system

Description:
This application is a continuation, of application Ser. No. 08/037,121, filed Mar. 25, 1993, now abandoned. 
    
    
     BACKGROUND OF THE INVENTION 
     1. Field of the Invention 
     The present invention relates generally to a breakpoint setting/deleting system and more specifically to such a system using a symbolic debugger. Still more specifically, the present invention is concerned with an object program which can be written using so-called &#34;function overloading&#34;. According to the present invention, breakpoints can easily be set to (or deleted from) the encoded overloaded functions within an executable file as compared with prior art techniques. 
     2. Description of Related Art 
     As is well known in the art, a symbolic debugger allows symbolic representation of variables or locations. 
     On the other hand, the &#34;overloading of functions&#34; is now a common technique of providing type-safe linkage when programing using the C++ language (for example). With &#34;function overloading&#34;, a plurality of instances of functions with the same name appear in a source code. However, only one instance of a function with any given name should exist in an executable file. This can be done by encoding the signature of a function (its argument(s) for example) within the executable file. 
     The detailed explanation of the &#34;overloading of functions&#34; and the &#34;type-safe linkage&#34; is given in a book entitled &#34;The Annotated C++ Reference Manual&#34; by Margaret A. Ellis and Bjarne Stroustrup (AT&amp;T Bell Telephone Laboratories, Incorporated, 1990), and thus further descriptions thereof will be omitted for the sake of brevity. 
     Further, as is well known, a breakpoint is a symbol inserted into a program which stops its execution at that point to allow registers, variables, memory locations, etc. to be examined. A breakpoint is used when debugging a program. 
     According to a known technique, when a programmer wishes to set breakpoints to (or delete same from) the overloaded functions which have been encoded into corresponding symbols and located in a executable file, the programmer must first know what symbols the original (viz., source-level) overloaded functions have been encoded into. Subsequently, the programmer enters the encoded function name to which a breakpoint is to be set (or from which a breakpoint is deleted). 
     Merely for the sake of simplifying the descriptions, only breakpoint setting may be referred to hereinafter. 
     In more specific terms, every time a programmer sets breakpoints to the functions in a source code (or source program), the programmer must identify the corresponding encoded function names. Since the overloaded functions in a source code (viz., source-level overloaded functions) are encoded into very similar or analogous function names, the programmer should always exercise considerable care that he or she does not make a mistake when entering the encoded function name using a console. Further, the above mentioned prior art problem is also liable to induce mistakes when the programmer checks the outputs of the console which indicate the breakpoints attached to the analogous encoded function names. 
     It is therefore highly desirable if a breakpoint can be set or deleted using source-level (viz., original) function names instead of the error-prone encoded function names. 
     SUMMARY OF THE INVENTION 
     In view of the above drawback it is an object of the present invention to provide breakpoint a setting/deleting system wherein a function name lookup table is generated such as to include the original overloaded function names and the corresponding encoded function names. 
     Another object of the present invention is to provide breakpoint setting/deleting system wherein a programmer can set breakpoints using an original function name. 
     In brief, the above objects are achieved by a breakpoint setting/deleting system wherein encoded function names are first retrieved from a given executable file which has bean stored in a memory. A decoder is supplied with the retrieved encoded function names and then decodes same into corresponding source-level function names and signatures thereof. Subsequently, a function name lookup table is generated which shows a relationship between the encoded function names and the decoded source-level function names and signature thereof. A breakpoint setting/deleting instruction, which is applied to the system, includes a source-level function name and a signature thereof to which a breakpoint is to be set. A set of the source-level function name and the signature thereof, which are included in the breakpoint setting/deleting instruction, is used to retrieve the corresponding encoded function name from the function name lookup table. Thereafter, a breakpoint is set to the encoded function name obtained from the lookup table. 
     More specifically an aspect of the present invention resides in a breakpoint setting/deleting system comprising: first means for retrieving encoded function names from a given executable file stored in a memory; second means arranged to receive the encoded function names from the first means and to decode the encoded function names into corresponding source-level function names and signatures thereof; third means arranged to receive the encoded function names and the source-level function names and signatures thereof, the third means generating a function name lookup table which shows a relationship between the encoded function names and the source-level function names and signature thereof; fourth means for decoding a breakpoint setting/deleting instruction which is applied thereto and which includes a source-level function name and a signature thereof to which a breakpoint is to be set; fifth means coupled to receive the breakpoint setting/deleting instruction which has been decoded by the fourth means, the fifth means retrieving an encoded function name specified by the source-level function name and signature thereof using the function name lookup table; and sixth means coupled to the fifth means, the sixth means setting/deleting a breakpoint to the encoded function name retrieved by the fifth means. 
    
    
     BRIEF DESCRIPTION OF THE DRAWINGS 
     The features and advantages of the present invention will become more clearly appreciated from the following description taken in conjunction with the accompanying drawings in which: 
     FIG. 1 is a block diagram showing a breakpoint setting/deleting system using a symbolic debugger according to the present invention; and 
     FIG. 2 is a function name lookup table which characterizes the present invention. 
    
    
     DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS 
     A preferred embodiment of the present invention will be discussed with reference to FIGS. 1 and 2. 
     As shown in FIG. 1, a symbolic debugger 10 is provided such as to be associated or operatively coupled with a console 12 and a suitable memory 14 which includes a plurality of executable files. 
     Merely for the convenience of descriptions it in assumed that: 
     (a) source programs have been translated, using a suitable compiler, into corresponding executable files which are stored in the memory 14; 
     (b) a breakpoint setting/deleting program is now executed; 
     (c) a given executable file has been selected by the breakpoint setting/deleting program. 
     That is, a plurality of instances of functions with the same name in the source program have been encoded using the above-mentioned function overloading. 
     As mentioned in the opening paragraphs, only one instance of a function with any given name can appear in the executable file, and this can be done by encoding the signature of a function within the function name in the executable file. 
     When a given executable file is selected by the breakpoint setting/deleting program, the encoded function names included in the executable file are retrieved from the file (see block 16). Merely by way of example, five encoded function names retrieved from the selected executable file, are illustrated in FIG. 2. Following this, a decoder 18 decodes the encoded function names fed by a function name retrieving means 16. The decoded function names, which are listed in FIG. 2, exactly correspond to the original (viz., source-level) ones. 
     A generator 20 receives the decoded function names from the decoder 18 and the corresponding encoded function names from the retrieving means 16. 
     Thereafter, the generator 20 generates a function name lookup table which is shown in FIG. 2. More specifically, the table shows a relationship between the encoded function names retrieved from the executable file and the corresponding decoded function names accompanied by the signatures (arguments in the illustrated case) thereof. The lookup table thus generated is stored in a memory 22. 
     When a programmer wishes to set a breakpoint at a given function name in a source program, the programmer enters, using the console 12, the original (viz., source-level) function name plus its argument(s) into the symbolic debugger 10. It should be noted that according to the present invention, the programmer is not required to enter an encoded function name for the breakpoint setting or deleting as in the prior art. 
     An instruction analyzer 24 selects or detects the breakpoint setting/deleting instruction applied thereto. The selected instruction, which includes the original function name plus its argument(s), is then used to retrieve the corresponding encoded function name from the lookup table. That is, an encoded function retrieving means 26 is supplied with the breakpoint setting/deleting instruction and then has access to the function name lookup table stored in the memory 22 using the original function name plus its argument(s). Thus, an encoded function name, which is specified by the original function name entered using the console 12, is retrieved from the lookup table. 
     The encoded function name thus obtained is applied to a breakpoint setting/deleting section 28 wherein a breakpoint is attached to the encoded function name or deleted therefrom. The breakpoint setting/deleting techniques are well known in the art and disclosed, by way of example, in a manual entitled &#34;EWS-UX/V (Rel 4.0) Programer&#39;s Guide: Compiler System and Debugging&#34;, Chapter 5.8, pages 5-41 et seq., published 1991 by NEC corporation, and also a manual entitled &#34;EWS-UX/V Program Development Support Tools&#34;, Section 6, published 1990 by the same entity. Thus, further descriptions of the breakpoint setting/deleting will be omitted for the sake of brevity. 
     The breakpoint setting section 28 is arranged to output a signal R which indicates a breakpoint netting/deleting result (viz., &#34;Yes,&#34; or &#34;No&#34;). The console 12 receives the signal R by which the programmer is able to determine whether or not a breakpoint has been correctly set to (or deleted from) the encoded function name which corresponds to the function name entered via the console 12. 
     Although not show in FIG. 1, the breakpoint setting/deleting section 28 may be arranged such as to update the breakpoint setting/deleting in the executable file in the memory 14. 
     It will be understood that the above disclosure is representative of only one possible application of the present invention and that the concept on which the invention is based can be applied to a variety of arrangements/applications. Further, even though the use of a plurality of membership functions has been mentioned it will be understood that the use of a single membership is not excluded from the scope of the invention.