Skip to content

Debugging the c code

Peter Willendrup edited this page Aug 26, 2019 · 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 ^\# 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