This is the mail archive of the ecos-discuss@sourceware.cygnus.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]

GDB stubs / MIPS ISA I


Hi all.

We are porting eCos to our new board with MIPS IDT R3041 CPU. HAL part has
been implemented and eCos GDB stubs is running; so we are able to use GDB
for loading and debugging programs.
However, there is one bug (I hope it is within our HAL :-) ) connected with
stepping through the code. Namely, it is possible to set the breakpoint and
to perform first 'continue' operation, after which debugged program
successfully stops (at the breakpoint) and GDB stubs takes control.
Thereafter, one can enter any GDB command (set/remove breakpoint, read
registers, etc.), but after typing the second 'continue' operation (or
'step') target program starts and, thereupon, breaks again on the first
breakpoint. So, it seems that debugged program is always on the first
breakpoint and it is not possible to step through the rest of the code.

I believe this has something with differences between Tx39 and R3041, and
thus with our HAL. Since we found a few incompatibilities with MIPS ISA I in
your mips/arch/... directory - which is supposed to be a MIPS architecture
compliant - maybe there are some other parts of code  adapted only to
Tx39/Vr4300, which we are not able to find. Of course, the problem could be
anywhere, but I hope that somebody acquainted with MIPS/stubs from the eCos
list could give me a hint.


Thanks in advance and best regards,
Jura.


P.S.
If you are interested in compatibility problems I found in '/mips/arch/...'
I can say that they are related to not respecting the MIPS ISA I load delay
slot.
Namely, file 'vectors.S', function other_vector, sequence:
        lw      k1,0(k1)                # k1 = pointer to VSR
        jr      k1                      # go there
        nop                             # (delay slot)

should be on R3000:
        lw      k1,0(k1)                # k1 = pointer to VSR
        nop                             # (load delay slot) <-------------
        jr      k1                      # go there
        nop                             # (delay slot)

...

What is the best way to avoid this kind of incompatibilities?



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