This is the mail archive of the ecos-discuss@sources.redhat.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Is this the compiler or debugger issue?


>>>>> "Ling" == Ling Su <lingsu@palmmicro.com> writes:

    Ling> Hello, everyone,
    Ling> I experienced some problems to run the mips64vr4300-elf
    Ling> toolchain on eCos, hope anyone can kindly help me. I used
    Ling> binutils2.0, egcs-2000-5-30 and insight 5.0. I successfully
    Ling> download the code, but even I just try to set "break" at
    Ling> main, it complains, "Cannot access memory at address 0x0". I
    Ling> doubt if I have some setting problems.

    Ling> The sample session to run a hello.exe in ecos example
    Ling> directry is shown in below. The strange thing is, even I try
    Ling> to run the hello.exe in simulator target, some error message
    Ling> shows "mips-core: 1 byte write to unmapped address
    Ling> 0xc1000007 at 0x0". Actually I use mips64vr4300-elf-run to
    Ling> run the test example hello.exe, the log is also posted
    Ling> below. Thanks for anyone who can show me some light to solve
    Ling> this. Thanks a lot!

This may be the same problem as was reported in
http://sources.redhat.com/ml/ecos-discuss/2000-08/msg00007.html and
the subsequent thread. The debug information in the executable is
incorrect, so gdb thinks that main() is at location 0 and tries to set
the breakpoint there - which is not going to work very well.

The problem may be in binutils, gcc, or possibly gdb. I suggest
looking in the mailing lists for those projects in that order and see
if anything relevant is being discussed. According to Chris Morrow
removing -gc-sections from the link line made the problem go away, so
that might be a temporary workaround.

Bart Veer // eCos net maintainer

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]