Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

How do I trace an assembler file in avr-gdb?

assembler avr file gdb trace
0
10 Posted

How do I trace an assembler file in avr-gdb?

0

When using the -g compiler option, avr-gcc only generates line number and other debug information for C (and C++) files that pass the compiler. Functions that don’t have line number information will be completely skipped by a single step command in gdb. This includes functions linked from a standard library, but by default also functions defined in an assembler source file, since the -g compiler switch does not apply to the assembler. So in order to debug an assembler input file (possibly one that has to be passed through the C preprocessor), it’s the assembler that needs to be told to include line-number information into the output file. (Other debug information like data types and variable allocation cannot be generated, since unlike a compiler, the assembler basically doesn’t know about this.) This is done using the (GNU) assembler option –gstabs.

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.