DEBUGGING SYSTEM
Background This invention relates to system debugging software. Developers write system debugging software to detect system hardware and software problems. Debugger software retrieves and displays information about the state of a system (e.g. hardware register values) and enables a developer to set the system to a specified state. Since systems include different hardware and software elements, developers often write dedicated debugger software from scratch for different systems and individual system elements.
For example, a telecommunications terminal, such as the Litespan™- 2000 Access Network Unit made by DSC™ Communications Corp., includes many different hardware and software elements. A telecommunications terminal connects subscriber lines, such as POTS (Plain Old Telephone Service) and ISDN (Integrated Services Digital Network) lines, to telecommunications exchanges and other telecommunications equipment. Different hardware and software elements handle the subscriber lines, terminal processing, and transmission lines. DSC™ Communications Corp. programmed dedicated debugger software for many of these different elements.
Summary
In general, in one aspect, a method of debugging a system includes maintaining a list of debugging function providers, receiving input from a console, and routing the console input to one of the debugging function providers. Embodiments of the method may include the following features. The method may also include receiving information from debugging function providers for console display. The debugging function providers can be
implemented in object-oriented software. The method may be used to debug a telecommunications terminal. The debugging function providers may request addition to the list of debugging function providers. The list may be displayed on a console for operator selection. The debugger function providers may supply a list of debugging functions or submenus. The debugging functions may access both hardware and software system elements.
In general, in another embodiment, a method of debugging a system includes sending information from debugging function providers to a set of main debugging routines for display on a console. In general, in another embodiment, a system for debugging includes a console, one or more debugging function providers, and a set of main debugging routines that maintain a list of debugging function providers and carry information between the console and the debugging function providers.
Embodiments of the system for debugging may include the following features. The set of main debug routines and debugging function providers may communicate using a client/server message system. The set of main debug routines and debugging function providers may both reside on a single card such as an X2M card.
In general, in another aspect, a method of developing debug tools for debugging respective hardware and software elements under control of a user interaction with a console includes providing a common debug task that controls the console to provide a user interface that enables the user to interact with other debug objects and maintains a common programming interface for interaction with all of the debug objects, and generating debug objects for the respective system elements, each of the debug objects providing debug functions for the respective elements and functions that interact with the common debug task via the common programming interface.
Advantages may include one or more of the following.
The main debug task along with a set of console functions provide common console input/output (I/O) support for all debug objects. This reduces the amount of programming needed to create a debug object and thus reduces the development time needed to write new debugger software. The main debug task also provides a menu of debug objects to allow a console operator to switch between different debug objects during a debugging session. This enables the console operator to see the interaction between the different system elements as they are being debugged.
Other features and advantages will become apparent from the following description, including the drawings and the claims.
Drawing Descriptions Fig. 1 is a diagram of a console connected to hardware. Fig. 2 is a diagram of a console, a main debug task, and a list of debug objects. Fig. 3 is a diagram of a menu hierarchy.
Fig. 4 is a debugging session flowchart.
Detailed Description Referring to Fig. 1, a console 10 is connected to a system 12. A developer uses the console 10 to view and change the state of the connected system 12. The system shown is a Litespan™-120 telecommunications terminal 12 made by DSC™ Communications Corp. The terminal 12 provides slots that accept different hardware cards (United States Serial No. 08/970,183 filed November 14, 1997, entitled "Telecommunications Terrninar describes a telecommunications terminal that accepts different hardware cards. The terminal 12 connects each inserted card to other inserted cards via a bus (not shown). The different cards include different components and perform different functions. For example, a Bandwidth Allocator, Processor, and Transmission (BPT) card 14 performs terminal management functions in addition to
multiplexing and demultiplexing telecommunications signals. A Channel Unit (CU) card 16 handles subscriber line signals. Many cards, including CU 16 and BPT 14, contain processors. An X2M card (a card capable of serving several El channels and running N5.1 protocol software) possesses strong processing capability.
Referring to Fig. 2, the debugging system includes object-oriented software instructions for console functions 19, a main debug task 18, and debug objects 20 and 22. The console functions 19 include routines that handle I/O for a variety of consoles (e.g. dedicated serial or ethernet). The main debug task 18 serves as an intermediary for passing information and commands between the console functions 10 and the debug objects 20 and 22 that provide debugging functions.
Each debug object 20 and 22 derives from a common base class (CDebug) that includes predefined characteristics. Derivation from a common base class speeds debug object 20 and 22 development. Each debug object 20 and 22 can be further programmed to perform specialized debugging functions with respect to associated hardware and software elements 24, 26. For example, one debug object 20 might access hardware registers on a POTS CU card, another debug object 22 might access memory on an ISDN CU card. Yet another debug object (not shown) might access information from software running on the system (e.g. queues, event flags, and history logs).
Though the functions provided by debug objects vary, each debug object 20 and 22 includes a PrintMenu function 26 and a HandleNewInput function 28. The PrintMenu function 26 produces menu information that allows the console operator to control debug objects 20 and 22. The PrintMenu function 26 sends this menu information to the main debug task 18 for processing with other menu information to generate menus that are displayed on the console 10.
The HandleNewInput function 28 handles console 10 input routed to the debug object 20 by the main debug task 18. For example, based on console operator input, the main debug task 18 might send to a debug object's HandleNewInput function 28 a message to execute the debug object's 20 third menu choice (not shown). The HandleNewInput function 30 calls the function corresponding to the menu choice. Each debug object 20 and 22 also includes a Constructor 24 that, upon instantiation, sends a request to the main debug task to add the debug object 20 to a main debug task list 34 of debug objects. The main debug task 18 includes a list 34 of pointers to debug objects, a router 32, and a PrintTopMenu function 36. The router 32 sends information from the console functions 19 to debug objects 20 and 22. The router 32 also receives information produced by the debug objects 20 and 22 and sends this information to the console functions 19 for display. The router 32 and console functions 19 eliminate the need to rewrite console I/O functions or calls when developing a new debug object. The PrintTopMenu function 36 produces a menu on the console that includes a list of debug objects. The console operator can use this menu to switch among the different debug objects throughout a debugging session. This offers the console operator the convenience of debugging different system elements in a single session and the ability to debug the system as a whole as different system elements interact. Referring to Fig. 3, the main debug task PrintTopMenu function 36 and debug object PrintMenu functions 26 and 31 allow the console operator to navigate through different menus that include lists of the different debug objects and the debugging functions they provide. The main debug task maintains a menu level variable 71 that indicates which menu should be displayed. When the menu level is zero, the main debug task displays its own menu 37, which includes a list of debug objects. When the console operator chooses one of the listed debug objects (e.g. Debug Object A) the menu level is incremented to level 1.
A debug object's PrintMenu function 26 could, for example, produce debug object menus 70 and 72. The PrintMenu function 26 could send any one of these menus to the main debug task for console display. A debug object menu 70 and 72 may include selections for debugging functions the object provides, selections for submenus, and a selection to return to a preceding menu. The PrintMenu function 26 uses the menu level variable to determine which menu to produce. For example, if the menu level is one, a debug object will produce debug object menu 70, but if the menu level is two, the debug object will produce debug object submenu 72. The PrintMenu function adjusts the menu level variable based on console operator input to let the console operator navigate through debug object menus and submenus.
Referring now to Fig. 4, at the beginning of a debugging session, the main debug task sets the menu level at zero (step 39) indicating the main debug task should display its menu of debug objects (step 40). The console operator then selects one of the debug objects (step 42) causing the main debug task to increment the menu level variable (step 44) and route further console input to the chosen debug object's HandleNewInput function.
A debug object's HandleNewInput function processes information sent by the console via the main debug task. If the console operator chooses a debugging function provided by a debug object (step 50), the HandleNewInput function calls the corresponding debug object function (52) and then reproduces the debug object menu at the current menu level for further console operator selection (step 46). If the console operator chooses a debug object submenu (step 54), the menu level variable is incremented (step 58) and the debug object PrintMenu function produces the submenu for display on the console (step 46). If the console operator chooses to return to the preceding menu, the main debug task decrements the menu level variable (step 56). If the menu level variable is zero after the decrementing (step 60), the main debug task displays its own top level menu of debug objects (step 40) and ceases forwarding console input to
the previously selected debug object. If the menu level variable is not zero after decrementing (step 60), the debug object's PrintMenu function produces the preceding debug object menu (step 46).
The different debugging objects discussed above can be distributed in many ways. For example, in a telecommunications terminal, each CU card processor could contain its own hardware debug object and communicate with a main debug task running on a BPT card. Potentially, the different processors could communicate using a client/server messaging system. Alternatively, a single card (e.g. a X2M card) could run both the main debug task and different hardware debug objects and collect hardware information from other cards over the terminal bus.
Other embodiments are within the scope of the following claims.
What is claimed is: