When using GUI Disassembling objects and executables, for a single .o file with including source information, the resulted disassembly file is garbled.
The actual disassembly of instructions appears to be OK and for the first function in the file so are the source statements. when you add the "-S" option to the disassembly command. There is incorrect interleaving of source statements for the second function and the rest of the functions within the disassembly of an object file, when you have the "-S" option in the disassembly command (objdump). The source statements just mirror the statements of the first function in the file and repeat themselves for the other functions to the end of the file without any connection to the disassembly.
The same problem was observed in LPCXpresso 8.1.4 (see LPCXpresso 8.1.4 garbles disassembly file when using "Binary Utilities->Disassemble" for a .o fil... )
LPCXpresso 7.9 and previous revisions didn't show this problem.
I appreciate the prompt response of LPCXpresso Support. Unfortunately I cannot confirm that the issue is related to the use of forced inline functions. It seems that the source statements for the functions after the first, just mirror the statements of the first function in the file and repeat themselves for the other functions to the end of the file without any connection to the disassembly.
As an example of this see the attached excerpts of source and disassembled files compared to the disassembly of the project .axf file.
Unfortunately LPCXpresso IDE v8.2.0 still ships with ARM's Embedded GCC5 update1, the same version as LPCXpresso IDE v8.1.4.
Thus at the current time, the same response that we gave before on LPCware (also now copied into the NXP Community at LPCXpresso 8.1.4 garbles disassembly file when using "Binary Utilities-&gt;Disassemble" for a .o... ) still applies - below for your reference
The actual disassembly of instructions appears to be OK. What you appear to be reporting is the incorrect interleaving of source statements within the disassembly of an object file, when you add the "-S" option to the disassembly command (objdump). Correct?
As far as I can tell from experiments here, this is down to the objdump from the GCC5 package that we ship in LPCXpresso 8.1 having an issue with the handling of debug information when the source file contains forced inlined functions.
If using the other methods of generating an interleaved disassembly don't provide what you need. then if you have an LPCXpresso IDE v8.0 installed on your system, you should be able to workaround this issue in the short term by using the objdump from that installation. To do this, copy the file:
I would suggest taking a backup of the original v8.1.4 arm-none-eabi-objdump.exe first.
It might be helpful for further investigation if you could confirm that your circumstances match our guess from before - that the issue you see is indeed related to the use of forced inline functions?