| Article Index |
|---|
| GDB UPC Sample Sessions |
| Multiple Unix Processes |
| Single Unix Process |
| Multiple Posix Threads |
| Single Thread Debugging |
| All Pages |
Debugging of only one UPC thread as a Unix process is similar to debugging multiple of them. The only difference is in the start-up code where thread start synchronization gate is not used at all. In this case the user can simple insert the breakpoint in the main UPC function and start running the application. One the break point is reached, upc-sync command can be used to switch GDB UPC into the UPC mode.
Single Unix Process |
|
| Compile Options | |
| -g -O0 -dwarf-2-upc |
|
| Debugging Options | |
| set pagination off set target-async on set detach-on-fork off set non-stop on set upcstartgate on |
|
| Sample Debugging Session | |
Compile example code (static or dynamic thread allocation can be used):
$ upc -fupc-threads-1 -g -O0 -dwarf-2-upc \Create GDB's startup file .gdbinitin the current directory with the following content: set pagination off Note: You may chose to create some other file instead of .gdbinit.In this case you will need to run GDB UPC with "-x your-startup-file" option. Specify UPC Debugging Assistant shared library for GCC UPC compiler: csh shell: Make sure that GDB on your path is indeed GDB UPC. For example: $ gdb -v At this point you can start your debugging session. $ gdb upc_example At this point the only UPC thread is running, however GDB UPC is still in the GDB mode. Execute upc-init command to enable the UPC mode and initalize UDA plugin. (gdb) upc-initAs you are working with only one thread collective features of GDB UPC (breakpoint, stepping) don't have any effect on debugging. |
|








