A portion of the disclosure of this patent document contains material which is subject to copyright protection. The copyright owner has no objection to the facsimile reproduction by anyone of the patent document of the patent disclosure, as it appears in the Patent and Trademark Office patent file or records, but otherwise reserves all copyright rights whatsoever.
The present invention relates to the debugging of software and software components.
Most real-world software systems of any significant complexity are written in more than one programming language. For example, an environment may be implemented in JAVA™ while an interpreted language may be running on top of JAVA™ and need to be debugged. This situation creates significant difficulties for software developers attempting to debug these systems. This problem is complicated by the fact that there is no standardization in terms of internal structures, such as stack frames, between different programming languages. For example, it is not uncommon for a developer to see stack information not directly related to the software being debugged when encountering a stack frame for one language, when using a debugger intended for another language. As another example, when using a debugger intended for the JAVA™ language, a JAVA™ stack will not include the stack for XScript (a JavaScript variant with native support for extensible markup language (XML)), and can sometimes show the set of Java classes that implement the XScript engine (these are part of the environment, but not the software the developer is working on). One multi-language debugger, described in JAVA™ Specification Request (JSR) 45, can only be used to debug languages that are easily transformed into Java and then compiled. This and most other multi-language debuggers won't work with languages such as XScript where the language will be run by an interpreter or the language can not be mapped directly to JAVA™ because the language has a different data structure. Thus, creating debugging tools that can be applied to software applied to more than one programming language, and running in the same environment, has proved to be extremely difficult.
Methods for a debugging environment that can be used by software developers working on multi-language systems. The techniques used create a debugging environment that can be uniform across languages, and can seamlessly perform debugging between one or more languages in a multi-language environment. Such a system can have a number of attributes intended to help developers facing debugging problems in multi-language environments.
Systems and methods in accordance with embodiments of the present invention provide a debugging environment that can be used by software developers working on multi-language systems. The techniques used create a debugging environment that can be uniform across languages, and can seamlessly perform debugging between one or more languages in a multi-language environment. Such a system can have a number of attributes intended to help developers facing debugging problems in multi-language environments including:
Each language integrated into a multi-language debugger can include specific support for the stack frame structures and variable representations used in that language. Each new language added to the multi-language debugger can extend the system in at least one of 3 areas:
Throughout the following discussion, an example is developed using the JAVA™ language. It will be understood that the invention is equally applicable to any programming language. This example is presented for illustrative purposes only and is not meant to limit the scope, functionality or spirit of any particular embodiment of the invention.
Architectural Overview
Some embodiments will be comprised of one or more functional components or modules. It will be understood that any particular embodiment of the invention may not require all of the components listed, may use additional components, or may use an entirely different organization without changing the functionality, scope or spirit. Components used in some embodiments can include:
In some embodiments, when the runtime-messaging infrastructure is started in non-production (debug) mode, a script controller for the debug process is started. This object inspects the system for script engines, and loads them and their configuration information.
In some embodiments when the runtime-messaging infrastructure starts a debugging session, it will send a message to the proxy. Typically, this message includes a list of languages and language configuration information for the languages supported by the multi-language debugger. In some embodiments, when debugging begins, the debug proxy will talk to the script controller for control flow (e.g. step, continue, pause), and will operate directly on the script engines for debugging information (e.g. stack frames, variable inspection, expressions).
In some embodiments, after the script engines have all registered themselves, the script debug controller waits until debugging is started. This process is depicted in
In some embodiments, when a breakpoint is hit, or a step is finished in communications with the script engine will be to the script debug controller. As an example, with JAVA™ code, all communications with the script engines will be through JDI calls to the script debug controller.
For some embodiments, the first breakpoint hit in the underling language can behave like a normal break. The following process may then occur:
In some embodiments, the following process may occur if the current stack frame is set to a frame controlled by a script engine:
Stepping Through Code
Some embodiments can step though code using a mechanism analogous to that used in an ordinary (without multi-language support) debugger, except that the debugger will inform the script debug controller when a step is about to begin. In this way, any script engine that is started, and script engines that return from calling into the underling language (e.g. JAVA™) will be able to stop appropriately. In some cases, script implementation classes are placed into the excludes-filter during a step request.
Continuing
In some embodiments this operation behaves like a continue in an ordinary (not multi-language) debugger.
Script Breakpoint Hit
In some embodiments, when a script breakpoint is hit the following actions can occur:
In some embodiments, when the user hits Pause, the thread will be paused. The debugger can then look to see if the stack is currently in scripting or the underling language (e.g. JAVA™) code. One of the following actions may then be taken:
In some embodiments, when a pause is called on a script language while it is waiting on some synchronization object, it will be treated as a normal thread in the underling language (e.g. JAVA™), which can prevent deadlock scenanos.
Breakpoints
In some embodiments, information in breakpoint packets can use a suitable extension or other indicator to identify the language type being executed. In some cases, the absence of the extension can indicate the underling language (e.g. JAVA™) is being used. If a breakpoint is not in the underling language the following actions may be taken:
It should be noted, that depending on the details of the embodiment, any language may be able to support a sub-set of the available breakpoint types for any given language. Returning a true or false to a query for that type can indicate the support for a particular breakpoint type. For example, a true or false can be returned for a method, featureEnabled() (or some other suitable name), when called with a variable indicating the break point type, such as, SOURCE_BREAKPOINT_SUPPORT, METHOD_BREAKPOINT_SUPPORT, or WATCH_POINT_SUPPORT
The following examples show sets of interface definitions for two embodiments, developed using the JAVA™ language. It will be understood that the invention is equally applicable to any programming language. This example is presented for illustrative purposes only and is not meant to limit the scope, functionality or spirit of any particular embodiment of the invention.
The foregoing description of preferred embodiments of the present invention has been provided for the purposes of illustration and description. It is not intended to be exhaustive or to limit the invention to the precise forms disclosed. Many modifications and variations will be apparent to one of ordinary skill in the art. The embodiments were chosen and described in order to best explain the principles of the invention and its practical application, thereby enabling others skilled in the art to understand the invention for various embodiments and with various modifications that are suited to the particular use contemplated. It is intended that the scope of the invention be defined by the following claims and their equivalence.
The present application claims the benefit of priority under 35 U.S.C. § 119(3) to: U.S. Provisional Application entitled “Systems and Methods for Multi-Language Debugging,” patent application No. 60/450,014, filed on Feb. 26, 2003, which application is incorporated herein by reference.
Number | Name | Date | Kind |
---|---|---|---|
5321841 | East et al. | Jun 1994 | A |
5469562 | Saether | Nov 1995 | A |
5604860 | McLaughlin | Feb 1997 | A |
5630131 | Palevich | May 1997 | A |
5748975 | Van DeVanter | May 1998 | A |
5801958 | Dangelo et al. | Sep 1998 | A |
5835769 | Jervis et al. | Nov 1998 | A |
5836014 | Faiman | Nov 1998 | A |
5845121 | Carter | Dec 1998 | A |
5867822 | Sankar | Feb 1999 | A |
5944794 | Okamoto | Aug 1999 | A |
5961593 | Gabber et al. | Oct 1999 | A |
5966535 | Benedikt et al. | Oct 1999 | A |
6012083 | Savitzky | Jan 2000 | A |
6016495 | McKeehan | Jan 2000 | A |
6018730 | Nichols | Jan 2000 | A |
6023578 | Birsan | Feb 2000 | A |
6028997 | Leymann et al. | Feb 2000 | A |
6029000 | Woolsey et al. | Feb 2000 | A |
6044217 | Brealey et al. | Mar 2000 | A |
6067623 | Blakley, III et al. | May 2000 | A |
6070184 | Blount | May 2000 | A |
6092102 | Wagner | Jul 2000 | A |
6119149 | Notani | Sep 2000 | A |
6141701 | Whitney | Oct 2000 | A |
6212546 | Starkovich | Apr 2001 | B1 |
6222533 | Notani | Apr 2001 | B1 |
6226675 | Meltzer et al. | May 2001 | B1 |
6230287 | Pinard et al. | May 2001 | B1 |
6243737 | Flanagan | Jun 2001 | B1 |
6292932 | Baisley | Sep 2001 | B1 |
6330569 | Baisley | Dec 2001 | B1 |
6334114 | Jacobs | Dec 2001 | B1 |
6338064 | Ault et al. | Jan 2002 | B1 |
6343265 | Glebov | Jan 2002 | B1 |
6353923 | Bogle et al. | Mar 2002 | B1 |
6360358 | Elsbree | Mar 2002 | B1 |
6377939 | Young | Apr 2002 | B1 |
6408311 | Baisley | Jun 2002 | B1 |
6411698 | Bauer | Jun 2002 | B1 |
6445711 | Scheel | Sep 2002 | B1 |
6470364 | Prinzing | Oct 2002 | B1 |
6560769 | Moore | May 2003 | B1 |
6567738 | Gopp | May 2003 | B2 |
6584454 | Hummel | Jun 2003 | B1 |
6594693 | Borwankar | Jul 2003 | B1 |
6594700 | Graham | Jul 2003 | B1 |
6604198 | Beckman et al. | Aug 2003 | B1 |
6609115 | Mehring | Aug 2003 | B1 |
6615258 | Barry | Sep 2003 | B1 |
6636491 | Kari | Oct 2003 | B1 |
6637020 | Hammond | Oct 2003 | B1 |
6643652 | Helgeson | Nov 2003 | B2 |
6654932 | Bahrs | Nov 2003 | B1 |
6678518 | Eerola | Jan 2004 | B2 |
6687702 | Vaitheeswaran | Feb 2004 | B2 |
6687848 | Najmi | Feb 2004 | B1 |
6721779 | Maffeis | Apr 2004 | B1 |
6732237 | Jacobs et al. | May 2004 | B1 |
6748420 | Quatrano | Jun 2004 | B1 |
6757689 | Battas | Jun 2004 | B2 |
6789054 | Makhlouf | Sep 2004 | B1 |
6795967 | Evans et al. | Sep 2004 | B1 |
6802000 | Greene et al. | Oct 2004 | B1 |
6804686 | Stone et al. | Oct 2004 | B1 |
6823495 | Vedula | Nov 2004 | B1 |
6832238 | Sharma | Dec 2004 | B1 |
6847981 | Song | Jan 2005 | B2 |
6850979 | Saulpaugh | Feb 2005 | B1 |
6889244 | Gaither | May 2005 | B1 |
6915519 | Williamson | Jul 2005 | B2 |
6918084 | Slaughter | Jul 2005 | B1 |
6950872 | Todd | Sep 2005 | B2 |
6959307 | Apte | Oct 2005 | B2 |
6963914 | Breitbart | Nov 2005 | B1 |
6976086 | Sadeghi | Dec 2005 | B2 |
7017146 | Dellarocas | Mar 2006 | B2 |
7051072 | Stewart | May 2006 | B2 |
7051316 | Charisius | May 2006 | B2 |
7054858 | Sutherland | May 2006 | B2 |
7062718 | Kodosky | Jun 2006 | B2 |
7072934 | Helgeson | Jul 2006 | B2 |
7076772 | Zatloukal | Jul 2006 | B2 |
7096422 | Rothschiller | Aug 2006 | B2 |
7107578 | Alpern | Sep 2006 | B1 |
7111243 | Ballard | Sep 2006 | B1 |
7117504 | Smith | Oct 2006 | B2 |
7127704 | Van De Vanter | Oct 2006 | B2 |
7143186 | Stewart | Nov 2006 | B2 |
20020004848 | Sudarshan | Jan 2002 | A1 |
20020010781 | Tuatini | Jan 2002 | A1 |
20020010803 | Oberstein | Jan 2002 | A1 |
20020016759 | Macready et al. | Feb 2002 | A1 |
20020035604 | Cohen | Mar 2002 | A1 |
20020078365 | Burnett et al. | Jun 2002 | A1 |
20020083075 | Brummel | Jun 2002 | A1 |
20020111922 | Young | Aug 2002 | A1 |
20020120685 | Srivastava | Aug 2002 | A1 |
20020143960 | Goren | Oct 2002 | A1 |
20020152106 | Stoxen | Oct 2002 | A1 |
20020161826 | Arteaga | Oct 2002 | A1 |
20020165936 | Alston et al. | Nov 2002 | A1 |
20020174178 | Stawikowski | Nov 2002 | A1 |
20020174241 | Beged-Dov | Nov 2002 | A1 |
20020184610 | Chong | Dec 2002 | A1 |
20020194244 | Raventos | Dec 2002 | A1 |
20020194267 | Flesner | Dec 2002 | A1 |
20020194495 | Gladstone | Dec 2002 | A1 |
20030004746 | Kheirolomoom | Jan 2003 | A1 |
20030005181 | Bau, III et al. | Jan 2003 | A1 |
20030014439 | Boughannam | Jan 2003 | A1 |
20030018661 | Darugar | Jan 2003 | A1 |
20030018665 | Dovin et al. | Jan 2003 | A1 |
20030018832 | Amirisetty | Jan 2003 | A1 |
20030028579 | Kulkami | Feb 2003 | A1 |
20030041198 | Exton et al. | Feb 2003 | A1 |
20030043191 | Tinsley | Mar 2003 | A1 |
20030046591 | Asghari-Kamrani | Mar 2003 | A1 |
20030051066 | Pace | Mar 2003 | A1 |
20030055868 | Fletcher | Mar 2003 | A1 |
20030055878 | Fletcher | Mar 2003 | A1 |
20030074217 | Beisiegel | Apr 2003 | A1 |
20030079029 | Garimella | Apr 2003 | A1 |
20030084203 | Yoshida | May 2003 | A1 |
20030110117 | Saidenberg et al. | Jun 2003 | A1 |
20030110446 | Nemer | Jun 2003 | A1 |
20030126136 | Omoigui | Jul 2003 | A1 |
20030149791 | Kane | Aug 2003 | A1 |
20030167358 | Marvin | Sep 2003 | A1 |
20030196168 | Hu | Oct 2003 | A1 |
20040019645 | Goodman | Jan 2004 | A1 |
20040078373 | Ghoneimy | Apr 2004 | A1 |
20040133660 | Junghuber et al. | Jul 2004 | A1 |
20040148336 | Hubbard | Jul 2004 | A1 |
20040204976 | Oyama | Oct 2004 | A1 |
20040216086 | Bau | Oct 2004 | A1 |
20040225995 | Marvin et al. | Nov 2004 | A1 |
20040260715 | Mongeon | Dec 2004 | A1 |
20050050068 | Vaschillo | Mar 2005 | A1 |
20050278585 | Spencer | Dec 2005 | A1 |
20060064677 | Bickson et al. | Mar 2006 | A1 |
20060206856 | Breeden | Sep 2006 | A1 |
20060234678 | Juitt | Oct 2006 | A1 |
20070038500 | Hammitt | Feb 2007 | A1 |
Number | Date | Country |
---|---|---|
WO 9923558 | May 1999 | WO |
Number | Date | Country | |
---|---|---|---|
20050034104 A1 | Feb 2005 | US |
Number | Date | Country | |
---|---|---|---|
60450014 | Feb 2003 | US |