How to use cuda-gdb with g++ linked program using static library compiled with nvcc?

I’m working on an nvcc compiled static library for a g++ linked project. How do I use cuda-gdb on the final executable? All I get is “Program exited normally” without any printf output or anything. Here is my command line buffer:

cuda-gdb /home/sean/cuda-workspace/cudasplat/Debug/cudasplat 
NVIDIA (R) CUDA Debugger
5.0 release
Portions Copyright (C) 2007-2012 NVIDIA Corporation
GNU gdb (GDB) 7.2
Copyright (C) 2010 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later 
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-unknown-linux-gnu".
For bug reporting instructions, please see:
Reading symbols from /home/sean/cuda-workspace/cudasplat/Debug/cudasplat...done.
(cuda-gdb) set args -t a1-31 a2-31 a3-31 a4-31 -L 30 -o tx_coverage -d /var/www/userman/plot-temp/ -db -85 -ngs -dbm -R 20
(cuda-gdb) run
Starting program: /home/sean/cuda-workspace/cudasplat/Debug/cudasplat -t a1-31 a2-31 a3-31 a4-31 -L 30 -o tx_coverage -d /var/www/userman/plot-temp/ -db -85 -ngs -dbm -R 20
[Thread debugging using libthread_db enabled]

Program exited normally.

It looks like your application ran to a completion as expected. Try setting a breakpoint before executing “run” (e.g. “break main”).

So then cuda-gdb just doesn’t output what’s written to stdout or stderr?

See my reply at StackOverflow.

Are you debugging from graphical environment (e.g. by running cuda-gdb in a XTerm window)? Then it is possible that cuda-gdb hid CUDA device from your application to avoid hangs. Your application may not properly handle this case and fail silently.

From StackOverflow discussion it became apparent that the problem was with cuda-gdb hiding adapter from the application.