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.
Hello,
I need some help on source level debugging of assembly file.
Below is my platform setup:-
1) Debugger CCSv4 Version: 4.2.2.00033 running in Windows VISTA.
2) Target:- OMAP4430 Pandaboard
3) JTAG:- xds100v2
4) Code:- U-Boot compiled in a Linux machine and available over Samba
As a test, I have added an assembly file called mytest.S and the function in assembly routine has just following lines
.globl my_test
my_test:
/* back to arch calling code */
mov pc, lr
mytest.S has been compiled with following options
mytest.o: mytest.S
$(AS) -g -gdwarf2 -al=mytest.lst -o $@ mytest.S
When the code hits mytest routine, it does not find the source code as shown in the picture below.
Any help will be greatly appreciated...
Thanks,
Sanjuricku
Sanjuricku,
In my experience with Linux debugging (a similar scenario as it is built with GCC that also has assembly code), I found out the debugger does not correlate assembly source files with the disassembly view, only C source files. This may be either caused by the level of debugging information that GCC includes in the assembly object files or a limitation on the debugger itself.
Unfortunately to date I don't have a better answer for this behaviour. I will revisit this subject again tomorrow to see if there is any additional detail I may be missing.
Regards,
Rafael
Hi Rafael,
Thanks for looking into this.
Yesterday I loaded the code + symbol using Lauterbach Trace32 simulator and I can perform source level debugging of assembly file under Trace32. So, I don't think that it's a GCC issue. It is might be a limitation of CCS or maybe we are missing some options under CCS.
I will wait for your feedback.
Thanks again!
Best regards,
Sanjuricku.
Hi Sanju,
CCS organizes the debug line info (mapping between source lines and instruction addresses) by functions.
The debug info from myTest.o does not tell CCS that my_test is a function.
CCS misses the debug line info for my_test.
I filed CQ SDSCM00042271 to track this issue.
Regards,
Raymond
Hi Raymond,
Thanks for the information. When CQ SDSCM00042271 is resolved, will I get a notification?
Thanks,
Sanjuricku
Sanju,
As Raymond mentioned earlier CCS organize the debug line info by functions. Most assemblers have special directives to mark the begin or end of function in assembly routine which allows the assembler to emit the appropriate debug info for effective debugging when mixing c/assembly. This will not only fix the source look up issue but will also allow the call stack to be unwound correctly and allow you to switch between different frames.
To do this you can use the .func and .endfunc directives with GCC Assembler and .asmfunc and .endasmfunc directives with the TI assembler. Let me know if this helps.
Regards,
Mandeep Deol