News:

Accounts with zero posts and zero activity during the last months will be deleted periodically to fight SPAM!

Main Menu

Debugging a library produced with Makefile

Started by gmiranda, December 07, 2011, 09:36:23 AM

Previous topic - Next topic

gmiranda

Hi,

I work on a big library which is built using Makefiles. We have a script that will compile and run some tests, and I'd like to debug a function in the library.

As I haven't managed to debug setting the script command as the host application, I've tried to recreate what the script does:
· Manually compile the test program.
· Set the test program as the host application in Code::Blocks.
· As the program requires some paths to be added to LD_LIBRARY_PATH, I tried adding those to additional debugger search dirs (project options>debugger). The debugger would then try to run the program, but it wouldn't work because the additional libraries couldn't be loaded.

Then I tried to change the host application line by adding LD_LIBRARY_PATH="..." before the application path.
None of the breakpoints (2 in the library code, 1 in the application code) causes the debugger to pause program execution, and when I click on next instruction, continue, whatever button, I get this in the debugger log:
Debugger name and version: GNU gdb (Ubuntu/Linaro 7.2-1ubuntu11) 7.2
The program is not being run.
Debugger finished with status 0


What can I do to debug my program?

oBFusCATed

Try a nightly build of the debugger's branch. See the nightly build sub-forum.

Also for the env variables you can use the environment variables plugin.
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

gmiranda

Thanks. I ended up creating a project inside the workspace for a test program, and at least this works. The debugger branch seems better than the trunk :)