Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.
CDT/Archive/cdt-debug-dsf
< CDT | Archive
Revision as of 18:46, 5 January 2009 by Pawel.piech.windriver.com (Talk | contribs) (→Test Procedures)
Contents
Leader
Overview
Features
Debug view
- Launching
- Debug perspective activation on launch
- Debug view activated on breakpoint hit
- Initial selection after launch
- Debug Targe' element
- Debug Target label
- Resume/suspend operations
- Terminating
- Target program completion and exit handling
- Thread element
- Thread label
- Resume/suspend operations
- Step operations
- Multi-threaded programs
- Manual thread refresh mode
- Stack Frame element
- Frame label
- Selection upon suspend
- Resume/suspend operations
- Step operations
- Displaying limited number of frames
- Preference
- Viewing additional trace using double-click/context menu
- Source Display
- Source display upon stack frame selection
- Stepping through different files
- Fast stepping
- Stepping fast by holding down the F5 key
- The Instruction Pointer in the editor should be painted after every step
- The line high-lighting selection in the editor should disappear until stepping slows down
- Minimum step interval preference
- Delay stepping to update views preference
- Stepping fast by holding down the F5 key
Variables view
- Variables display
- Variable name, address, type, value
- Complex variables (with child elements)
- Arrays
- Changing variable value
- Variables for active stack frame, thread, debug target
Registers view
- Register Group
- Label: name, description
- Register
- Label: name, type, description, value
- Editing values
- Bit Field: name, type, description, value
- Editing
- Mnemonics: viewing, selecting
Expressions view
- Adding new expressions
- Using context menu in variables view, registers view, editor
- Using drag and drop
- By typing in expression into the "New Expression" entry.
- Using the New Expression dialog.
- Expressions with child elements
- Removing expressions
- Preserving expanded state of elements when removing.
- Using "Remove All"
- Editing expressions
- In-line
- Using dialog
- Editing expression values
- Editor type (text vs. drop down, etc.) as dictated by the expression type
- Updates the corresponding value in other views
- Values update as they are modified in other views
Modules view
- Labels
- Detail pane info (type, symbols loaded, file, base address, size).
All Variables views (variables, registers, expressions)
- Default number format
- Updating
- When stepping
- When changing selection in Debug view
Update modes (variables, registers, expressions)
- Visibility controlled using the Debug Update Policies action set
- Selecting a mode
- Disabled when no DSF debug session active
- Persisted across debug sessions, workbench sessions.
- Automatic mode
- Manual mode
- Breakpoint hit mode
- Refresh Action
- Updates the change history
- Refresh All
Number Format Detail Pane
- Variables name and type
- Value shown in all available formats
Bugs
Test Procedures
PDA Example Debugger
Launching
- Launch a new program in the Debugger
- Debug view activated upon launch (if preference set)
- Check initial selection after launch
- If the program is suspended, top stack frame should be selected.
- If the program is running, the process should be selected.
- Launch a new program in the Debugger
Target/Launch/Processes
- Debug a new program
- Check label of debug target
- Try resume/suspend operations on debug target element
- All threads should resume/suspend
- Stepping operations should be disabled
- Terminate the target
- Terminated target should remain in the view with a "<terminated>" label prefix a terminated target icon. Alternatively, the target can simply be removed from the view.
- The launch should also have a "<terminated>" prefix in the view.
- Running program to the completion,
- Target should change state to terminated
- The process (node representing the process) should also change state to terminated.
- If all processes are in terminated state, the launch should also be in terminated state.
- Debug a new program
Threads
- Debug a new program
- Check the thread label
- Try resume/suspend operations on the thread element
- Single thread should resume/suspend
- Try step operations
- Launch a multi-threaded program
- New threads should be added to the bottom of the thread list as they are created
- Exiting threads are removed from the thread list
- When stepping a thread, other threads should remain collapsed/expanded as they were
- Enable the "Thread manual refresh mode" from the view menu
- New threads should not be added to the thread list, and old threads should remain.
- The refresh button in view should update the thread list.
- Debug a new program
Stack frames
- Stop a debugged program when it has at least two stack levels
- Frame label should contain:
- Stack frame number
- Function name if known
- File and line
- Current program counter
- Frame label should contain:
- Select a stack frame
- Source editor is opened and positioned to the location of the PC
- Run control operations should be the same as when a thread is selected
- When a thread hits a breakpoint, that thread's stack frame is automatically selected
- Stop a debugged program when it has at least two stack levels
Source Display
- Debug a program with multiple source files
- Set a breakpoint at a function call which is in another source file, and run to the breakpoint
- Check: the source file with the breakpoint is displayed
- Step into the function
- Check: the new source file is displayed at the start of the new function
Fast stepping
- Step fast by holding down the F5 key
- The Instruction Pointer in the editor should be painted after every step
- The line high-lighting selection in the editor should disappear until stepping slows down
- Enable minimum step interval using the preference page
- Enable delaying stepping to update views using the preference page
- Step fast by holding down the F5 key
Variables view
- Stop a debugged program when it has at least two stack levels
- Open variables view
- Check that all variables of the current stack are shown
- Check that all values are shown
- Check that the layout menu behaves as expected
- Check that complex variables have a little arrow on the left
- Check that the arrow can be expanded to show children
- Select different variables in the view and check that the details pane shows the different formats
- Scroll down in the variable view
- Check that newly displayed variables are correct
- Change the stack frame in the debug view
- Check that the variables view properly shows the variables for the selected stack frame
- Go back to the previous stack frame in the debug view
- Check that the variables view properly shows the variables for the selected stack frame
- Step the program
- Check that variable changes are reflected in the view and highlighted in color
- Select a variable and change its value in the variables view
- Check that the value is shown in the view
- Step the program
- Check that the value for the changed variable is still correct
Registers view
#include <stdio.h> #include <stdlib.h> void level_04( int level ) { printf( "yes we are\n" ); } void level_03( int level ) { printf( "yes we are\n" ); level_04( 4 ); } void level_02( int level ) { printf( "yes we are\n" ); level_03( 3 ); } void level_01( int level ) { printf( "yes we are\n" ); level_02( 2 ); } int main(void) { level_01( 1 ); puts("Are we having fun yet"); /* prints Are we having fun yet */ puts("Are we having fun yet"); /* prints Are we having fun yet */ puts("Are we having fun yet"); /* prints Are we having fun yet */ puts("Are we having fun yet"); /* prints Are we having fun yet */ puts("Are we having fun yet"); /* prints Are we having fun yet */ puts("Are we having fun yet"); /* prints Are we having fun yet */ return EXIT_SUCCESS; }
- Launch the GDB debugger with the above program.
- Step into until you are in the level_04() routine
- Bring up the register view ( leave all register groups unexpanded )
- Select between the various stack frames
- The Register Groups remain unexpanded.
- Now select stack frame level_04() and then expand the first ( perhaps only ) group in the Register view
- Now select the level_03() stack frame.
- See that the expanded group retains its expansion.
- Now select the level_02() stack frame.
- See that the expanded group retains its expansion.
- Now select the level_01() stack frame.
- See that the expanded group retains its expansion.
- Now select the main() stack frame.
- See that the expanded group retains its expansion.
- Now select the Thread[1] entry.
- See that the expanded group retains its expansion.
- Select the Launch entry for the current application
- The Registers view redraws showing nothing
- Reselect the level_04() stack frame
- Stretch the Register View to insure that the eip and eflags registers are visible
- Perform a Step_over
- The eip and eflags registers are highlighted as changed
- The eip indicates we are still at level_04 somewhere
- Step until back at level_03()
- The Registers View did not redraw
- The General Registers group retained its expansion
- The eip now indicates level_03 in it.
- Select the $eax register. Click in the "Value" field to begin cell editing.
- No matter what the current value, type in a 0x12
- The new value of $eax is 0x12
- With the registers group expanded scroll to the bottom of the view
- All registers update with what appear to be correct values
- Leave the registers group expanded - In the drop down menu tab select Number Format - Binary
- All currently expanded/displayed registers change to display their values in a BINARY form
- Leave the registers group expanded - In the drop down menu tab select Number Format - Octal
- All currently expanded/displayed registers change to display their values in a OCTALform
- Leave the registers group expanded - In the drop down menu tab select Number Format - Decimal
- All currently expanded/displayed registers change to display their values in a DECIMAL form
- Leave the registers group expanded - In the drop down menu tab select Number Format - Hex
- All currently expanded/displayed registers change to display their values in a HEX form
- Leave the registers group expanded - In the drop down menu tab select Number Format - Natural
- All currently expanded/displayed registers change to display their values in a NATURAL form
- Registers (note: this section of the test is currently outdated).
- Debug the fibonacci.pda PDA program
- Set a breakpoint at the "var n" line within the fibonacci function
- Hit the F8 key 6 times so there are 6 stack frames showing
- Bring up the register view ( leave all register groups unexpanded )
- Select between the various stack frames
- The Register Groups remain unexpanded.
- Now select stack frame 6 and then expand the "General" group
- Now select and expand the "status" register within the "General" group
- Now select the level 5 stack frame.
- See that the expanded group retains its expansion.
- Now select the level 5 stack frame.
- See that the expanded group retains its expansion.
- Now select the level 4 stack frame.
- See that the expanded group retains its expansion.
- Now select the level 3 stack frame.
- See that the expanded group retains its expansion.
- Now select the level 2 stack frame.
- See that the expanded group retains its expansion.
- Now select the level 1 stack frame.
- See that the expanded group retains its expansion.
- Select the Launch entry for the current application
- The Registers view redraws showing nothing
- Reselect the level 6 stack frame
- Hit F8 until there are only 4 stack frames
- The Registers View did not redraw
- The General Registers group retained its expansion
- Select the $pc register. Click in the "Value" field to begin cell editing.
- The regxister could not be edited ( it is read only )
- With the registers group expanded scroll to the bottom of the view
- Leave the registers group expanded - In the drop down menu tab select Number Format - Binary
- All currently expanded/displayed registers change to display their values in a BINARY form
- Leave the registers group expanded - In the drop down menu tab select Number Format - Octal
- All currently expanded/displayed registers change to display their values in a OCTALform
- Leave the registers group expanded - In the drop down menu tab select Number Format - Decimal
- All currently expanded/displayed registers change to display their values in a DECIMAL form
- Leave the registers group expanded - In the drop down menu tab select Number Format - Hex
- All currently expanded/displayed registers change to display their values in a HEX form
- Leave the registers group expanded - In the drop down menu tab select Number Format - Natural
- All currently expanded/displayed registers change to display their values in a NATURAL form