US2005273765A1PendingUtilityA1

Object-oriented creation breakpoints

Assignee: IBMPriority: Nov 30, 2001Filed: Aug 5, 2005Published: Dec 8, 2005
Est. expiryNov 30, 2021(expired)· nominal 20-yr term from priority
G06F 11/3644
48
PatentIndex Score
0
Cited by
0
References
0
Claims

Abstract

A computer system, program product and method debug an object-oriented computer program by tracking the creation of objects by a plurality of creators (e.g., constructor methods) of a selected class. A user need not separately track each creator. Instead, a debugger identifies each creator and associates breakpoints with all or a user-specified subset of creators to facilitate tracking. Any of the breakpoints may then trigger a halting of execution during debugging. Moreover, in some instances it may be desirable to track the number of creations by all or the subset of the creators for the selected class during program execution until a user-specified condition is satisfied, whereupon program execution is terminated and debugging information is provided to the user.

Claims

exact text as granted — not AI-modified
1 . A computer-implemented method of debugging an object-oriented computer program, the method comprising: 
 in response to user input, setting a creation breakpoint for a class defined in the object-oriented computer program, wherein setting the creation breakpoint includes: 
 identifying a plurality of creators for the class;  
 setting a plurality of breakpoints on the identified creators;  
 adding an entry for the creation breakpoint in a breakpoint data structure;  
 storing breakpoint information for each of the plurality of breakpoints in the breakpoint data structure; and  
 associating the breakpoint information for each of the plurality of breakpoints with the entry in the breakpoint data structure for the creation breakpoint to associate each of the plurality of breakpoints with the creation breakpoint;  
   determining that the creation breakpoint has been hit during debugging by detecting hitting of any of the plurality of breakpoints, wherein the creation breakpoint is determined to be hit only in response to detecting hitting of a breakpoint set on an identified creator for the class; and    halting execution of the object-oriented computer program during debugging in response to determining that the creation breakpoint has been hit.    
     
     
         2 . The method of  claim 1 , wherein identifying the plurality of creators includes identifying every creator for the class.  
     
     
         3 . The method of  claim 1 , further comprising, after identifying the plurality of creators, displaying a list of the identified creators and receiving user input to select a subset of identified creators, wherein the plurality of breakpoints are set on only the subset of the identified creators.  
     
     
         4 . The method of  claim 1 , wherein the plurality of breakpoints are collectively set on all of the identified creators in response to the user input.  
     
     
         5 . The method of  claim 1 , wherein setting the plurality of breakpoints includes setting each breakpoint from the plurality of breakpoints on a statement in one of the identified creators.  
     
     
         6 . The method of  claim 5 , wherein setting each breakpoint includes inserting debugging program code in the creator on which such breakpoint is set.  
     
     
         7 . The method of  claim 1 , further comprising tracking a total number of hits to the plurality of breakpoints, wherein halting execution of the object-oriented computer program during debugging in response to determining that the creation breakpoint has been hit includes: 
 determining whether the total number of hits meets a condition in response to hitting any of the plurality of breakpoints, wherein the condition is the total number of hits meeting or exceeding a threshold, and wherein the total number of hits includes at least one hit from at least two different breakpoints; and    halting execution of the object-oriented computer program if the total number of hits meets the condition.    
     
     
         8 . The method of  claim 1 , wherein each creator comprises a constructor method defined in the class.  
     
     
         9 . The method of  claim 1 , further comprising collectively removing the creation breakpoint and the plurality of breakpoints in response to user input.  
     
     
         10 . The method of  claim 1 , wherein storing breakpoint information for each of the plurality of breakpoints in the breakpoint data structure comprises adding an entry for each breakpoint to a creator list associated with the creation breakpoint.  
     
     
         11 . An apparatus, comprising: 
 a memory within which resides at least a portion of an object-oriented computer program; and    program code configured to debug the object-oriented computer program by: 
 in response to user input, setting a creation breakpoint for a class defined in the object-oriented computer program, wherein setting the creation breakpoint includes: 
 identifying a plurality of creators for the class;  
 setting a plurality of breakpoints on the identified creators;  
 adding an entry for the creation breakpoint in a breakpoint data structure;  
 storing breakpoint information for each of the plurality of breakpoints in the breakpoint data structure; and  
 associating the breakpoint information for each of the plurality of breakpoints with the entry in the breakpoint data structure for the creation breakpoint to associate each of the plurality of breakpoints with the creation breakpoint;  
 
 determining that the creation breakpoint has been hit during debugging by detecting hitting of any of the plurality of breakpoints, wherein the creation breakpoint is determined to be hit only in response to detecting hitting of a breakpoint set on an identified creator for the class; and  
 halting execution of the object-oriented computer program during debugging in response to determining that the creation breakpoint has been hit.  
   
     
     
         12 . The apparatus of  claim 11 , wherein the program code is configured to identify the plurality of creators by identifying every creator for the class.  
     
     
         13 . The apparatus of  claim 11 , wherein the program code is further configured to, after identifying the plurality of creators, display a list of the identified creators and receive user input to select a subset of identified creators, wherein the plurality of breakpoints are set on only the subset of the identified creators.  
     
     
         14 . The apparatus of  claim 11 , wherein the plurality of breakpoints are collectively set on all of the identified creators in response to the user input.  
     
     
         15 . The apparatus of  claim 11 , wherein the program code is configured to set the plurality of breakpoints by setting each breakpoint from the plurality of breakpoints on a statement in one of the identified creators.  
     
     
         16 . The apparatus of  claim 11 , wherein the program code is configured to track a total number of hits to the plurality of breakpoints, determine whether the total number of hits meets a condition in response to hitting any of the plurality of breakpoints, and halt execution of the object-oriented computer program if the total number of hits meets the condition, wherein the condition is the total number of hits meeting or exceeding a threshold, and wherein the total number of hits includes at least one hit from at least two different breakpoints.  
     
     
         17 . The apparatus of  claim 11 , wherein the program code is further configured to collectively remove the creation breakpoint and the plurality of breakpoints in response to user input.  
     
     
         18 . The apparatus of  claim 11 , wherein the program code is further configured to store breakpoint information for each of the plurality of breakpoints in the breakpoint data structure by adding an entry for each breakpoint to a creator list associated with the creation breakpoint  
     
     
         19 . A program product, comprising: 
 program code configured to debug an object-oriented computer program by: 
 in response to user input, setting a creation breakpoint for a class defined in the object-oriented computer program, wherein setting the creation breakpoint includes: 
 identifying a plurality of creators for the class;  
 setting a plurality of breakpoints on the identified creators;  
 adding an entry for the creation breakpoint in a breakpoint data structure;  
 storing breakpoint information for each of the plurality of breakpoints in the breakpoint data structure; and  
 associating the breakpoint information for each of the plurality of breakpoints with the entry in the breakpoint data structure for the creation breakpoint to associate each of the plurality of breakpoints with the creation breakpoint;  
 
 determining that the creation breakpoint has been hit during debugging by detecting hitting of any of the plurality of breakpoints, wherein the creation breakpoint is determined to be hit only in response to detecting hitting of a breakpoint set on an identified creator for the class; and  
 halting execution of the object-oriented computer program during debugging in response to determining that the creation breakpoint has been hit; and  
   a signal bearing medium bearing the program code.    
     
     
         20 . The program product of  claim 19 , wherein the signal bearing medium includes at least one of a transmission medium and a recordable medium.

Join the waitlist — get patent alerts

Track US2005273765A1 — get alerts on status changes and closely related new filings.

We store only your email — no account needed. See our privacy policy.