http://www.negnc.net/ngnide/ngnide_intro.htm
"" NGNIDE Integrated Debug Environment "Introduction" Document Update Date: June 10, 2004
NGNC has no difference in language rules, because when setting the project target at first, the standard C syntax is the first choice for NGNC; then its only "new and unless" is spenting some kind of work. Some IDEs (integrated debugging environment), future development directions are integrated development environments. This is currently only business scripting languages such as Java will do.
The current version of NGNide is that the most basic debugger function, breakpoint, single-step debugging, debugging information includes (virtual machine anti-compilation, local variable, global variable browsing and "watch" view list, "slot" process Status / arithmetic registers, stack browsing, real memory browsing). By debugging "NGncalc2x", its use method and function are described.
Below is the desktop of NGNIDE debugging NGncalc2x:
Start NGNIDE: This is the NGNIDE icon (small), double-click to start it. Below is its main interface: NGNIDE's main interface has 5 parts, from top to bottom, respectively: Title, menu, toolbar, main view, status bar; 1, Title: The project file name for the current debug target ( The default is ngn.ini). It is a text format, please visit the file, each "section" section has a clear annotation, indicating the meaning of each section of the project file; 2, menu: function as a toolbar; 3, toolbar: (Detailed instructions: Tools Detailed Detailed Detailed Detailed Detailed Detailed Direction of NGNC.exe, compiles the target engineering file; sections 6 to 10 are the operations needed to debug compilation; set the environment, load the plugin Wait; 11 to 15 is the detailed degree control of the target code display, as well as assembly display mode, breakpoint setting, etc .; paramounts 16 to 19 are target code operation and stop, reload and reset; Steps related functions; 4, Main view: Compile results display area and display debug code area, where there is a current execution location (EIP pointer position), breakpoint mark (brown tag Point), etc. At the time of startup, this area is blank, no content, when the target debugging information is compiled or loaded, the information is displayed; 5, Status: Batter: To display the detailed function of the toolbar button; Compile the target engineering file : Because the top 5 toolbars are compiled by calling ngnc.exe and compiling scripts in the IDE environment with their communication, please refer to NGNC.EXE instructions, it is a compilation that can be performed by command line. . NGNIDE is for NGNC.exe adds some external operations such as selective target path, which is convenient; select debug destination, and prepare: By click on the button 6), open the NGNC.INI editing and debug environment settings dialog, as follows: (First select Ngn.ini files) (NGNC.INI Edit and Debug Environment Settings dialog) This dialog box is 2: Path Settings, plugin management. "Ngnc.ini location", to display the target position before the dialog box; "udit32.exe location", mounting position for uedit32.exe (Note: udit32.exe is UltraEdit_-32 Professional Text Developed by IDM Computer Solutions, INC / HEX Editor's main execution program, because ngnc.exe uses its command line parameter interface, control debug code and debug information display, this parameter does not affect the debugging of the IDE, see NGNC.EXE instructions for NGNC.EXE) "Currently Plug-in declaration ", is the function declaration of the plugin selected in the" Plug-in Name / Path "list, that is, the interface function of the plugin and scripting language. Before debugging the target code, you must ensure that the plugin that loads the target code must be loaded.
"Add / Delete Plug-in" is the function key for the management plug-in list; "OK": The system only accepts the currently displayed parameters and loads the plugin into memory; "Cancel" will give up; load debugging information, And Target Code: By clicking on the button), the debug information file (default to log.log) described in NGNC.ini will be used, which is the debug information file generated by NGNC.exe, and NGNIDE is analyzed. Load the required debug information; after loading, the main view area of the main interface displays the target debug code; for the first time, only the function declaration of the debug target is displayed, and there is no functionality {} block. You can control the display depth of the debug target by pressing the button 11), the transfer 12), and only the function body {} block display, the corresponding function is called the twist, and it will be described by clicking on the button 9) will be described with NGNC.ini. The target code (.Obj) file name of the compile results, load the target OBJ. And display the debug entry dialog (below), select a function, "OK OK", officially entered the debug status; it can be done by pressing 10), arbitrarily changing the debug entrance, expands new debugging; "func name list", Select a list of portions. When you turn on, the default is the starting function "Void Start (Void". If you do not have the function, you will be positioned to the first function. "Param list", is a list of parameter lists of the "Func Name List", which can be used to input parameter values for debugging the standalone function, without having to debug start from the target OBJ's entry START function. You can do a functional level test; please refer to the Advanced Application Guide to learn how to operate the function level debugging. Debug environment: 1, debugging environment introduction:: Indicates the current line, is the current command pointer EIP in the script execution;: Indicates that the current behavior is a program breakpoint, the script is running to this will temporarily interrupt; (Pink strip is the current selection foot " : The mouse moves, the corresponding row is displayed in the reverse white, indicating that the current mouse row position, click, or double click will set; 2. Debug information window: Enter the debug status, will display the following two debug information windows: "slot view "Is a set of status of a thread of the NGNC virtual machine. "Slot Envir" is the control register set, "registers" is a global arithmetic register. As a temporary variable, "BREAKS" is a breakpoint list, "Watchs" is a public debugging information selection window, "stack" is the thread stack. "Contents View" is a display area for debugging information, as comments above, indicating that this area is a common display area, which can display local / global and registers, current status / values of registers, physical memory absolute address content, etc. There is also a function with commands and modifications (see: IDE Advanced Application Guide). : Yes, the window Docking button, control the location relationship between "Contents View" and "Slot View" window, and automatically implement Docking operations by moving "Contents View" to the "Slot View" window.
This feature is to facilitate debugging and user habits. 3, the status display of the register: (1) (2) Select Register "Registers" "_eax_", displayed in the public display area of "Contents View". The NGNC virtual machine register supports 10 basic data types, corresponding C-type as follows: .C (char), uc (uchar, unsigned char) ,. s (smort) ,. US (Ushort, unsigned short) ,. L Long), ul (ulong, unsigned long) ,. f (float) ,. db (double) ,. Register type in "Registers" is the type of Slot runtime IDE to register The predicted results and values (the value of the number after the equal number is 10) and 2 types of 16). 3. Status of local variables: (1) (2) (3) Local variables are divided into two, parameters, and local variables. Select "PAR" parameters in "Slot Envir", "LOC" local variable, will display variable trees in the "Watchs" area (Figure 2), then select the corresponding item in the variable tree, in "Contents View" Displayed in the display area. Content Information Format: Offset, Type, Name, 10 Enter (16 Enter) 4, Status Display of Global Variables: (1) (2) Press "Show All Globals" will display global variable tree, you can Select the tree node, expand structure, or array or pointer with " ". Select any node, which will display the corresponding debug information in the public display area of "Contents View" (Figure 2). Select the parent node, display the included sub-node; select the child node, and display the tree structure. The content information format is consistent with "local variable". 5, Watch Observation List Maintenance: (1) "Show All Globals" and "Show Watchs" are the same press, switch the global variable tree and Watch list. When a list of observations is displayed, the public display area of "Contents View" (Figure 2) displays the observer content, if only one option is displayed, the full list is displayed, and the selected observation item to the window, and use "<< <<<<<<<< "tag; if there are two and more observation options, only display the selected observation item. Add a local / global variable: Select the corresponding variable node and click "Add Watch". Add Register: Select Register, and then select the register data type in the public display area of "Contents View", then click "Add Watch". Delete Watch Observer: Select "Del Watch" to delete. Start debugging and running: 1. Run the target script:
Load the target correctly, and select the entry, press 17) or shortcut (F5) to run the target if no breakpoints are set. After the target script is terminated, prompt the user to view the return result. As shown below:
The end of the script does not represent the release of the SLOT thread, and you can still view its status, including return registers "_ret_". Only when the button 19 is released, it will not be viewed when "Slot" is released, and the "slot view" and "contents view" window will close. 2. Debug target script:
NGNide has all basic debugging capabilities, each debug function can be performed by shortcut keys and tools, referring to: Toolbar function, understand the corresponding twist function. Hereinafter, several main commonly used commissioning techniques are described below.
Shortcuts and input focus: When the debugging information is browsing information within the debugging information window, press the call shortcut to invalid. Press the "ESC" button at this time to automatically transfer the input focus to the main interface of the IDE, you can adjust the shortcuts for the faster.
Using the list of debugging: In the debug state, such as single-step execution and breakpoint, "Contents View" public display area will automatically display debugging information according to the status of the debug window. If there is a list of observations, a list of observations will be displayed. If the list is empty, the last selection debug information will be used as information for debugging, such as: the last observation is "LOC" information, and the value of the automatic update local variable is displayed in "Contents View" when debugging. The display area is displayed. In debug status, register information does not make observation, so you need to use Watch Observer to explicitly join, which will automatically update the value status of the register, which is only used for the commissioning of the virtual machine puff, and the ordinary script is not required. Use the selection function of the observation list to simplify the display of the list to simplify debugging.
Broken Point Positioning and Script Performing Pointer EIP Positioning: Double-click EIP and BRK list items to automatically locate the corresponding script line, which is easy to browse. And automatically switch the focus to the main window.
The current selection of the breakpoint application of the script: pink strips, is the result of the left button in the mouse. Setting / Clear breakpoints are tagged as this. Key 20) (F4, Here) function, actually set a temporary breakpoint in the current selection script, but not marked, which can be seen from the BRK list. Using this method, simplify the Here action, press F4 to simulate the function of setting 1 breakpoint and press F5.
Variable Tree browsing: NGNIDE variable tree display and initialization is a phased, first displayed, only the parent node, the child node information is displayed after the point " ". Therefore, before " ", select the content of the parent node in the public display area of "Contents View", and does not display the sub-node. After point " ", the entire parent node information includes a child node.
Arrangement of the debugging information: Take Calc2x debugging as an example, because in order to view debugging information and debug code, you need to view the run interface of the target script, you need to display all the windows on a desktop. By adjusting the IDE main window, and debug information Docking operation, display the Calc2x's DOS virtual machine window, while single-step, while viewing, you can learn about the script logic and hierarchy of CALC2X.
The Save of the IDE Working Environment: NGNIDE is saved for each work, and then the next time Ide is launched, it will be more convenient. The saved content includes the path, the path, the plugin list, the main window, and the Docking structure of the path, the plugin list, the main window, and the Docking structure of the plugin list, the main window, and the Docking structure. Environmental information is saved in the Symtrace.ini file.
Reset debugging environment: During the debugging process, you can terminate the execution of Slot by pressing the button 19) or (Ctrl-S shortcut), and release it, will close the debug window. Key 16), or (f2) shortcuts will reload the previously selected functions. Do not terminate Slot, press F2 directly to reinitialize the slot as the entrance to the script function. Switching debug port: Slot is still in operation during debugging, or CTRL-F2 shortcuts, switching inlet is dangerous. You need to explicitly terminate and release the current SLOT, is safe. By pressing 19) or (Ctrl-S shortcuts), the information will be prompted as follows, "Yes" will terminate and release Slot.
Transition Debug Target: When the new version of OBJ is generated, it is necessary to reload the debugging information and the compile results OBJ, or force the debug fake machine code OBJ script module, and have entered the debug state. Select button 6), select the new NGN.INI, the system will prompt the information below to confirm whether you want to release the current debugging information and debug target module OBJ. Only "Yes" releases the current information before you reselect.
Annex I: Tool strip function detailed:
1): Show the compilation result (refresh); NGNC.EXE running status and end error message display (switched to compilation information);
2): Run the NGNC and INI path; run the NGNC.exe under the directory and set the ngn.ini path;
3): Run NGNC; running the NGNC.exe under the directory;
4): Suspension NGNC; suspend NGNC;
5): Continue to run; continue to operate;
6): Edit NGNC.INI; select the NGNC.INI file and edit; (see NGNC.INI Edit Dialog)
7): Read the debugging information; read the log.log file and extract debug information;
8): Debugging information is added to OBJ; mix the debug information into the OBJ target file;
9): Load the target OBJ; load the target file to prepare debugging, and set the entry parameters;
10): Set the debug entry parameter (Ctrl-F2); directly set the target debug entry parameter that has been loaded;
11): Display debug information " "; display the debugging information of the compiled log.log, the depth is increased;
12): Display debug information "-"; display the debugging information of the compiled log.log, depth decreased;
13): ASM code display switch; switch HEX code instruction display mode;
14): Setting / Clear breakpoint; set / clear the debug-breakpoint Break;
15): Clear all breakpoints; clear all breakpoints;
16): Back to the initial debug status (F2); reset the slot as the initialization state, and positioned to the first instruction;
17): Continue to run the OBJ (F5); continue to run the debug code from the current position; 18): Pause the execution (CTRL-P); pause the program at the current pointer, other executive keys will terminate the suspension state;
19): Stop operation (Ctrl-S); stop running and release the current SLOT;
20): Run to Here (f4); run to the currently selected line;
21): Single step (F7); single step is performed, enter the function body when the function is encountered;
22): Single instruction execution (F8); single instruction execution, execute functions when you encounter a function;
23): Return to call (F12); force to return the address of the last call;