Skip to content

Debugging the c code

Erik B Knudsen edited this page Mar 18, 2021 · 4 revisions

Getting rid of line pragmas

McCode uses #line pragmas in the generated code, in the attempt to jump between each of the included c-snippets in libraries, components etc. This unfortunately does not work well in all cases, as some files are %included, which is a simple concatenation.

A first advisable step is therefore to

grep -v ^\#line Instrument.c > Instrument_stripped.c

Debugging tips

... to be completed later

Linux and windows

Use GDB

macOS

Use LLVM, here is a list of command equivalences https://lldb.llvm.org/use/map.html

Clone this wiki locally