1. Star Editing / Testing
When at star creation compilation errors occur- correct source code
- run again star creation ('*')
To modify an existing star
- change source code
- move curseur on one of the star icon
- load code again ('L') to run compilation
!! individual testing of each star is fundamental !!
2. Dealing with errors
- errors in "vem" GUI => error message in console window
- delete error generating objects ('DEL' in console)
- delete error generating objects ('DEL' in console)
- errors in "pigiRpc" => error message in pop-up window
- objects associated with the error are highlighted
- they have to be deleted or modified and loaded again
- objects associated with the error are highlighted
- compile time errors => error message in pop-up window
- modification of source code according to preprocessor message
- or modification of schematic according to compiler message
- modification of source code according to preprocessor message
- run time errors:
- use 'print' command for key variables
- for non obvious errors use debugger
- use 'print' command for key variables
3. DEBUGGER
may be used to:- load a core file to:
- see where bug or segmentation fault occurs
- look at variables state
- look at process stack
- see where bug or segmentation fault occurs
- run an executable program to:
*execute it step by step
*set breakpoints
*look at variable state
*look at process stack
*run test procedure
4. Testing and Debugging Workflow

5. Debugging environment
- start "pigi" (or "ptiny" or "ptrim") in debug mode:
> pigi -debug - extra "gdb" window appears
- type 'cont' to continue simulation past initial break point
- program will stop on buggy line
- print variable values ('p')
- if necessary insert break points ('break')
- continue simulation step by step ('c' or 'n')
- if necessary re-run simulation ('r')
6. Debugging environment

7. LAB 4
Design of a new star for two dimensionnal linear filtering
8. Summary of gdb commands
| Starting /stopping | ||||
| run | run program with current argument list | |||
| run [arglist] | run program with 'arglist' | |||
| kill | kill running program | |||
| quit | q | quit GDB | ||
| Execution control | ||||
| cont | c | continue execution until next breakpoint | ||
| cont n | c n | continue execution until 'n'th breakpoint | ||
| step | s | step by line, into function calls | ||
| next | n | step by line, over function calls | ||
| where [n] | examine the 'n' top frames of the stack | |||
| backtrace | bt | display program stack | ||
| backtrace [n] | bt n | print trace of 'n' top frames of stack | ||
| Breakpoints | ||||
| break [file:]line | set breakpoint at 'line' number [ in 'file'] | |||
| break [file:]func | set breakpoint at 'func' [ in 'file'] | |||
| info break | show defined breakpoints | |||
| delete [n] | delete all breakpoints [ or breakpoint 'n'] | |||
| Looking at variables | ||||
| print expr | p expr | show value of 'expr' | ||
| disp expr | show value of 'expr' at each break | |||
| Help | ||||
| help | list of classes of commands | |||
| help class | description for commands in 'class' | |||
| help command | describe 'command' | |||
![]() |
Précédent | Suivant | Plan | 13/03/00 | PTOLAB |

