User forums > Using Code::Blocks
Debugging a library produced with Makefile
(1/1)
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:
--- Code: ---Debugger name and version: GNU gdb (Ubuntu/Linaro 7.2-1ubuntu11) 7.2
The program is not being run.
Debugger finished with status 0
--- End code ---
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.
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 :)
Navigation
[0] Message Index
Go to full version