1. This forum section is a read-only archive which contains old newsgroup posts. If you wish to post a query, please do so in one of our main forum sections (here). This way you will get a faster, better response from the members on Motherboard Point.

How to line up source code with assembly code?

Discussion in 'Embedded' started by janii, Mar 27, 2011.

  1. janii

    janii Guest

    My target board is running Freesacle MPC5500 based Microcontroller. I hav
    Trace32 debugger connected to the target board and my desktop computer.
    I built my application elf file and loaded in the internal flash memory o
    the MPC5500 Microcontroller. My application assembly code lines up wit
    the source code in the debugger but the libraries source code that m
    application linked don't line up with the assembly code.

    I am using the following Trace32 command to find out where the debugger i
    fetching source code from:


    The reason library source code doesn't line up with the assembly sourc
    code is because debugger is not fetching library source code from th
    clearcase view that was used to build the application elf file. I buil
    the elf file in H: directory. Application source code that lines up wit
    the assembly code is being fetched from H: directory. That's because i
    was compiled in H: directory.
    However, one library source code is being fetched from Y: drive. Anothe
    library source code is being fetched from F: drive.
    I think library code is being fetched from drives that were used to compil
    the library. Since I didn't compile libraries in my H: drive, debugger i
    not fetching them from H: drive.

    So, I know exactly what the problem is but I dont' know how to solve it.

    How do I tell debugger to fetch library source code from H: drive?
    janii, Mar 27, 2011
    1. Advertisements

  2. Do your libraries include debug information? If not there is the
    problem. Third party libaries usually don't, although just possibly
    there may be a "development" version available that does. If you
    have the source you can rebuild the libraries with debug info
    Andrew Smallshaw, Mar 28, 2011
    1. Advertisements

  3. It sounds like you have the actual source code for the library since you
    seem set on seeing it in the debugger. Sounds to me that you need to
    simply move the library source code to the H: drive and rebuild the
    libraries from there. This will replace any previously captured path
    information then ended up in the pre-built libraries that you are using

    You know that it is quite normal to realize that standard library
    functions do their functions in a very predictable and reliable way.
    It could very well be of a minor value to be able to see the library
    source code in the debugging mode. Test to make sure that faulty code
    is setting the proper parameters for library calls and then just let
    the library function do its job. There is not normally a strong need to
    trace through the library functions.

    You also have the possibility to consider taking the source code for
    the library functions and bringing that together as local sources in
    your project build. This would make the whole of the code used by your
    application be linked into the executable directly and all its source
    code would be directly visible to the debugger without further ado.
    Michael Karas, Mar 28, 2011
  4. janii

    janii Guest

    Thanks for the response. The libraries probably include debu
    How do I find out for sure?
    These are not third party libraries. These libraries are already built b
    members of my team. My top level application links these libraries.
    It won't make sense for me to rebuild all these libraries. They ar
    responsibility of another group.
    janii, Mar 28, 2011
  5. Wow, the folks that built the library are part of your team
    and yet you cannot work with then to get the build environment
    and embedded debug information in these libraries to be
    compatible with the application development environment.

    Some team!!
    Michael Karas, Mar 29, 2011
  6. Well, either that, or it's one of those silly issues caused by
    ClearCase's somewhat harebrained idea of mounting a sandbox as a file
    system, and the rather spectacularly bad way that concept fits in with
    MS Windows' traditional understanding of what a file system actually is.
    Hans-Bernhard Bröker, Mar 30, 2011
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.