3

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.
ks1322
  • 31,484
  • 13
  • 100
  • 154
SRAK
  • 81
  • 5
  • Please check other questions in stackoverflow. Does this one work? http://stackoverflow.com/questions/5244509/no-debugging-symbols-found-when-using-gdb – jojo Jan 05 '17 at 15:38
  • Yes, I read that post, as mentioned, I verified '-g' option is enabled in the configuration. May be I am checking in wrong configuration file. I am new to Ceedling and Ruby, so it is not clear what is going wrong. Anyway Thanks for your suggestion. – SRAK Jan 05 '17 at 16:03
  • Possible duplicate of [gdb how to execute target program from script](http://stackoverflow.com/questions/25274752/gdb-how-to-execute-target-program-from-script/). – Mark Plotnick Jan 05 '17 at 17:45
  • Possible duplicate of [How do I print the full value of a long string in gdb?](http://stackoverflow.com/questions/233328/how-do-i-print-the-full-value-of-a-long-string-in-gdb) – Fueled By Coffee Jan 05 '17 at 19:25
  • Mark Plotnick I will try out your suggestion. I am getting some idea on where to look. Thanks! – SRAK Jan 06 '17 at 04:00
  • DoTheDew No, I think that one is a different topic! – SRAK Jan 06 '17 at 04:01

2 Answers2

5

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!!

SRAK
  • 81
  • 5
0

Thanks SRAK

FYI, for MacOS, I used

lldb build/test/out/test_sample.out

since whichever gdb (installed by home brew) expects a different format.

Cheers,

Greg

greg.lund
  • 11
  • 2