GDK samples make with debug information Re: how to configure GDK make to create Debug rather than Re

I’m new to working with CUDA on the Linux platform and I’m having trouble modifying the GDK samples make files to build a debug rather than release version. I want to be able to step through the code as it executes using the Netbeans environment but the make files only build a release version without the debugging information. My problem is primarily in using the GDK make since I’m very new to working with make files. I’ve created a project that compiles the common and shared directories as well as one example that is close to the problem I’m working on (convolutionFFT2D). But now I need to enable debugging so I can step through the C code as it runs. Note - I’m not trying to debug into the kernel code at this point just working with the host C code.
Does anyone know how to modify the common.mk and make files to build a debug rather than release version?
Jennifer Milburn jwm@astro.caltech.edu

Note: I tried make -dbg=1 and make doesn’t understand the flag (it just lists the help and comes back to the prompt) RHEL 5.6 32bit
Jennifer

In case anyone cares the solution was to do make dbg=1 NOT make -dbg=1. :) I still can’t get my development environment to build the debug version (I need to go to the command line to issue the make dbg=1)
Jennifer

Hi,

I’ve been writing CUDA code in Netbeans for like 3 months now. I’ve done remote an local debug. I think I can help you there.

To append commands to the make command do it in Project->Properties->Build->Make and in the Build Command box you can see it’s running ${MAKE} -f Makefile, there it’s just like if you were executing this line straight in the termial substituting ${MAKE} with whatever path to the make executable you selected, so in other words if you want to append dbg=1 (which is the case for the SDK) it must be:
${MAKE} -f Makefile dbg=1

You can se in the Clean Command box its running:
${MAKE} -f Makefile clean

So you can tell from there that you can actually execute any configuration from your make file. Let’s say you want to execute “make demo1” you would write in the Build Command box:
${MAKE} -f Makefile demo1 dbg=1

You can even use a different makefile…

And so on and so forth…