Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to use gdb with Ceedling?

Tags:

c

rake

gdb

I want to debug the C source code under test when use Ceedling. I found that the following command could be used, but I could not set breakpoint. It seems the symbol information is not generated. I use the default settings in project.yml and I checked -g option is enabled in defaults.rb config file.

gdb --args -S rake test:sample_program
GNU gdb (GDB) (Cygwin 7.10.1-1) 7.10.1
Copyright (C) 2015 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later
Reading symbols from ruby...(no debugging symbols found)...done.
like image 960
SRAK Avatar asked Sep 11 '25 01:09

SRAK


1 Answers

Well, I find someway! In Ceedling project, the executable is located in \build\test\out\test_sample.out

I tried,

gdb build\test\out\test_sample.out

Now, all symbols are loaded and I can set breakpoint and step as well.

This may not be Ceedling way of debugging, but it works for me!!

like image 62
SRAK Avatar answered Sep 13 '25 18:09

SRAK