To configure, install, and use GDB UPC the following is required:
- x86_64 or x86 workstation with multiple processors (cores)
- A newer Linux based operating system (GDB UPC was developed on Fedora Core 13 and Ubuntu 10)
- A configured and built GCC UPC compiler with version greater then 4.2. However, GCC UPC is not required for the actual build of GDB UPC.
The following two components must be built:
- GDB UPC from the source release
- UDA (UPC Debug Assistant) plug-in from the source release
To download the latest versions of the GDB UPC components please use downloading page. You may choose to download the tarball source release or use rsync utility to transfer sources from the component's CVS repository.
Configuring and building of GDB UPCProcess for configuring and building of GDB UPC is simple and straightforward. Please follow these steps:
- Create directories to hold the GDB UPC's source and object files
mkdir src bld
- Download and unpack GDB UPC source in the src directory
- Change your directory to bld and configure GDB. Use the appropriate binary install directory so GDB UPC is not mixed with other versions of GDB that are present on the system.
cd bld; ../src/configure --prefix=/usr/local/upc
- Run make followed by make install
make; make installConfiguring and building of UDA (UPC Debug Assistant) for GCC UPC
Building of UDA plug-in is also a simple process. Follow these steps:
- Download UDA source code from GDB UPC Download page.
- Change into the source directory and run make to build the binaries
cd udasrc; make
NOTE: For 32 bit structure shared pointer configuration please run
make SPTRFLAGS=-DSTRUCT_SPTR_32BIT
- Install the UDA plugin by simple making a copy of it to a directory of your choice
cp plugin/uda-plugin.so PLUGIN_DIRStart GDB UPC debugging session
At this point GDB UPC is ready for the user's debugging session.
- Compile a UPC program with options needed by GDB UPC
upc -g -O0 -dwarf-2-upc -o example example.upc
- Set an environment variable that points to the UDA plugin shared library
setenv UDA_GUPC_PLUGIN_LIBRARY PLUGIN_DIR/uda-plugin.so
- Start GDB UPC and set few debugging options required for GDB UPC's proper execution
gdb [...] (gdb) set pagination off (gdb) set target-async on (gdb) set detach-on-fork off (gdb) set non-stop on (gdb) file example (gdb) set args -n 4
Run the program and synchronize all of the UPC threads [more info]
See GDB UPC Sample Debugging Sessions page for more info on various debugging options.








