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.

Symbolic Debug of Assembly Code Not Working

Issue has been reproduced in both:

  • CCS 5.1.0, Windows XP SP3
  • CCS 5.1.1, Ubuntu 10.04 64-bit

The issue is the same in both cases.  I am trying to debug u-boot-spl code.  The actual u-boot-spl was built using gcc compiler.  I'm using a hardware breakpoint to halt at the beginning and then I load symbols.

If I type the symbol name of a C function into the disassembly window then everything works as expected.  Here's a "good" screenshot, i.e. when I type "mmc_init" I see the symbol mmc_init displayed as well as corresponding code.

In that same case above when I hit that breakpoint the corresponding C source code opens and I can step through it.  That's all as expected.  Now here's the "bad" case...

For an assembly function I can type in the name (e.g. lowlevel_init).  In this case the assembler seems to understand what I'm talking about since the disassembly window jumps to the address/code corresponding to the function.  However, it does not show the symbol name in the disassembly window:

Can you understand why I cannot do symbolic debug for assembly functions?  For a while I thought it was a build issue, but eventually I used our ofd tool from the compiler and verified that all the necessary symbolic info was indeed in the file.  That's what led me to try the test above.  I've attached both the ELF executable and the ofd output in case you'd like to see them.

Thanks,
Brad

example.zip
  • Hi Brad,

    Can you point me to where I can get the u-boot-spl source for the image you attached?

    Thanks

    ki

  • If you want to do it exactly the way I did it then you'll need to download SDK 5.03.02 for AM37xx:

    http://software-dl.ti.com/dsps/dsps_public_sw/am_bu/sdk/AM37xSDK/latest/index_FDS.html

    It looks to me, however, that the u-boot included in that release is this one:

    http://arago-project.org/git/projects/?p=u-boot-am33x.git;a=shortlog;h=refs/heads/int_am335xpsp_04.06.00.01-v2011.09-for-sdk-05.03.01.00

  • Looks like this thread is actually a repeat of this other thread:

    http://e2e.ti.com/support/development_tools/code_composer_studio/f/81/t/143491.aspx

    The issue is already captured in CCS bug SDSCM00042271.

  • Hi Brad,

    In the past I had used "asmfunc" to get symbolic debug in assembler functions (as stated in the thread you referenced).

    However, I recently upgraded to CCSv5.1.1.00033 and now this feature doesn't work any more.  I can set a breakpoint in an asm function but I can't step through it.

    Is a new CCS bug needed?

    Regards,

    Steve Duncan

  • Hi Steve,

    The "asmfunc" directive for gcc only applies when using stabs debug info.  Unfortunately there seem to be issues with stabs debug which prevent that from fixing the issue!

    We have a plan in place to fix this in CCS 5.2.1.  (FYI, CCS 5.2.0 was released last week.)  By "this issue" I'm referring to my original issue and not the stabs issue.  I don't know if there's any plan to fix the stabs issues as I believe dwarf debug is the predominant format being used now.

    I'll see if I can get any further comments from the developers.

    Best regards,

    Brad

  • Hi Steve,

    Are you using TI compiler ?

    .asmfunc is a TI compiler directive.

    Last time I checked, it was working fine.

    Would you be able to attach a sample .out file for investigation ?

    The problem that Brad mentioned is specific to GCC compiler which uses different directives.

    Regards,

    Raymond

     

  • Hi Raymond,

    Apologies, I probably should have started a separate thread. I hadn't realised this was dealing with a GCC issue.

    Any ASM file exhibits the problem behaviour. Previously I could debug (i.e. single step through the assembly), but since upgrading to 5.1.1.00033 this no longer works. Instead, I get the message "No source available".  Note I am running on Linux (Kubuntu 12.04, 32-bit).

    NB I can not attach a .out file, even if I tar it up, as I get the error message "that file type is not allowed".

  • Did you click on "Options" up above the reply pane to attach the file?  (Not sure if that makes a difference.)  Can you perhaps try attaching a zip file?  I'm almost positive that zip files are allowed.  If that doesn't work I'll ask someone on the E2E team.

  • Brad, I was digging through the forum looking for an answer as to why breakpoints are being ignored in CCS5--they were working just fine on the same hardware with CCS4. I upgraded my machine and operating system (to Windows 7) before switching to CCS5.

    Did you ever resolve the breakpoint issue from November 2010.

    I would really like to have breakpoints to resolve a problem I'm having with the ADC hardware on a F28027. The software force instruction has stopped working (it too was workign just fine last month) and I'm beginning to wonder if the TI uC is failing. Passing over breakpoints is rather basic to the function of the debugger and I believe (please correct me if I'm wrong) that hardware breakpoints are managed locally within the uC. Is there some setting I'm missing in CCS5 that would cause the tool to ignore breakpoints?

    David

  • I never had an issue with breakpoints.  My issue was with symbolic debug, i.e. after I hit the breakpoint the corresponding assembly code would not show up.  That issue was scheduled to be fixed in CCS 5.2.1 which is now released.  I have not yet had a chance to test to see if indeed it fixed my issue, though I expect it did.