I compiled my code with debug symbols on an BeagleBoneBlack using Debian gcc-4.7. If I use objdump -S on my object file, I see both source lines and disassembly. On my Ubuntu 13.10 host, using gcc-linaro-arm-linux-gnueabihf-4.7-2013.04-20130415_linux, I do arm-linux-gnueabihf-objdump -S on the same object file, I see disassembly lines, but the source lines are not displayed. I¹m attempting to debug my code with a Lauterbach JTAG debugger, but no source code is available which makes debugging very difficult.
Is there some compatibility issue here or am I doing something wrong?
Regards,
John
On 8 April 2014 22:03, John Syne jsynesio@us-power.com wrote:
Hi John,
I compiled my code with debug symbols on an BeagleBoneBlack using Debian gcc-4.7. If I use objdump -S on my object file, I see both source lines and disassembly. On my Ubuntu 13.10 host, using gcc-linaro-arm-linux-gnueabihf-4.7-2013.04-20130415_linux, I do arm-linux-gnueabihf-objdump -S on the same object file, I see disassembly lines, but the source lines are not displayed. I¹m attempting to debug my code with a Lauterbach JTAG debugger, but no source code is available which makes debugging very difficult.
Is there some compatibility issue here or am I doing something wrong?
I'm not aware of any issues in this area, but that Linaro toolchain is a year old so it is always possible a newer version has improved things.
The first thing to check is whether the paths are correct. For example if you run arm-linux-gnueabihf-readelf --debug-dump on the object and look for DW_AT_comp_dir it should show you where objdump will look for source files by default. You can manipulate this path with the --prefix and --prefix-strip options if your source code is in a different path.
linaro-toolchain@lists.linaro.org