Debug information

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Debug information

1,895 Views
marchè
Contributor I
Hi...
How can I remove the debug information from the object files?
If I clead the dot in the debug column, my files .o contain info such as the path....
If I set "don't generate debug info" the linker generates the error: "File Start12.c.o sholud contain DWARF information".
Another question: the S-Record generated contains debug information?
Labels (1)
0 Kudos
Reply
2 Replies

466 Views
DanielM
Contributor III
Hi,

S-records are binary images of the executable code, there is no other information in them apart from the S0 record at the beginning which typically contains name of the project. You can replace it with a dummy S0 record however - it is not important.

There is definitely no debug info in S-records.

Daniel
0 Kudos
Reply

466 Views
imajeff
Contributor III
In GCC I just clean and make without the '-g'. Of course that won't help you with your CW error. It sounds like you are just supposed to use the option that works (clear the dot). Note that optimizations are what makes the loadable program smaller in the MCU target, not debug info. The debug info is not even loaded to the target, so often I have no reason to remove debug info from object files. There is however a utility I can use with GCC to strip the debug strings from the obj and perhaps is what you need.

I think this is what I'm thinking of:
strip --strip-debug

> Another question: the S-Record generated contains debug information?

That's not in the form of a question... Did you intend to ask whether S-Records do contain debug information? I don't think they can contain the type of debug info to be useful. It is the executable object (such as ELF/DWARF2) that debuggers typically use, and does not fit in S-Records.
0 Kudos
Reply