u-boot debugging problem with ddd - Embedded

This is a discussion on u-boot debugging problem with ddd - Embedded ; Hi, Although the u-boot software is not Linux, but strongly releated to embedded Linux systems, I ask my question here anyway. I have some troubles in debugging the u-boot software with ddd and a BDI2000 debugger. I can debug the ...

+ Reply to Thread
Results 1 to 2 of 2

Thread: u-boot debugging problem with ddd

  1. u-boot debugging problem with ddd

    Hi,

    Although the u-boot software is not Linux, but strongly releated to
    embedded Linux systems, I ask my question here anyway.

    I have some troubles in debugging the u-boot software with ddd and a
    BDI2000 debugger. I can debug the start of the u-boot software, but as
    soon as the software is moved to RAM, I can't tell DDD how to get the
    correct source files.

    What I do is starting ddd with the crossdebugger and the u-boot file.
    Next I start u-boot and when the command prompt of u-boot is entered, I
    stop/interrupt the program. Now I remove the symbols using the gdb
    symbol-file command without any parameters. Next I give the
    add-symbol-file with the u-boot file and the correct offset. Now I can
    see that gdb understand were all the symbols are and they are correct.
    But ddd doesn't understand it and is not able to show the source file
    when a breakpoint is entered. If keeps saying that there is no program
    loaded and first a program must be loaded (with the old symbols).

    Has anyone seen this problem or is there something I'm doing wrong. I
    have the idea that gdb is working fine, but ddd doesn't understand it
    anymore.

    Any help is appreciated.

    Regards, Robert


  2. Re: u-boot debugging problem with ddd

    Robert Pot wrote:
    > Hi,
    >
    > Although the u-boot software is not Linux, but strongly releated to
    > embedded Linux systems, I ask my question here anyway.
    >
    > I have some troubles in debugging the u-boot software with ddd and a
    > BDI2000 debugger. I can debug the start of the u-boot software, but as
    > soon as the software is moved to RAM, I can't tell DDD how to get the
    > correct source files.


    There may be ways to tell GDB/DDD the address offset to the real
    symbols, but instead the problem is fundamentally to do with the way you
    are linking the bootloader.

    The section of the bootloader image which is copied to RAM should be
    linked with a different start address, not linked as part of the same
    section as the initial bootstrap which copies the code to RAM. I am not
    sure how this is set up with u-boot.

    Perhaps alternatively you can configure u-boot not to copy itself to
    ram. It'll be slow but at least you'll be able to debug it.

    > add-symbol-file with the u-boot file and the correct offset. Now I can
    > see that gdb understand were all the symbols are and they are correct.
    > But ddd doesn't understand it and is not able to show the source file
    > when a breakpoint is entered. If keeps saying that there is no program
    > loaded and first a program must be loaded (with the old symbols).


    Has it been compiled with debug symbols enabled ?

    Instead of using add-symbol-file try using the "load program" option
    within DDD.

+ Reply to Thread