This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Assembler Listings

Excuse what might be a dumb question, but I'm trying to produce .asm and .lst files from C code, since I find these useful/valuable for debugging.

However, the files that are being produced have boatloads of .dwattr and .dwtag directives that clog up the code listings.

Question - what are these, and can I suppress them from the .lst and .asm files so I can print out more useful code files (without having to use grep or some other utility).

Thanks.

  • These are debug directives and they are generated whenever the build command includes the -g ( full symbolic debug) option (which is enabled by default). To generate assembly listing files without these directives, you can disable this option to the compiler, but note that the executable generated will also not be debuggable.

    The option is under Project Build Properties->C/C++ Build->Compiler->Basic Options. Note that just removing the -g option still generates some skelatal debug information, so some of these directives will still be present in the assembly files. To remove them completely, choose the --symdebug:none option (to suppress the debug information completely).

  • Great. That worked - much more readable/printable files.

    For anyone else who needs this info, I also did a "Clean" on the project, and even though one is turning off the debug mode in order to get shorter/cleaner .lst files, you should still leave the Build in "Debug" rather than "Release" if you want the .lst files to replace those in the Debug folder. Note that these steps are all purely for the purpose of creating nice listings. As Aarti wrote, you don't want to do this when you actually run debug code.