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: Problems with GDB on MPC8240


Hi Jesper,

I had specified "CYGNUM_HAL_BREAKPOINT_LIST_SIZE" as 10. Now I have
disabled it. It does break and step now. But still the problem exists.

Single step (i have checked "si") works fine if I just continue doing
only that!

Now if I give a breakpoint and "continue" it does stop at that
breakpoint. But it gets struck there. If I give a continue now (or even
"si") the program loops around at the same breakpoint. I changed the
value of PC (and set the values of register at PC where it had stopped)
and continued my program ends safely (ofcourse again printf() is not
printing "Hello" at the gdb console). Even if I delete the old
breakpoint and set a new one it will halt at the same old breakpoint;
but gdb console is infact setting the breakInstrcution at the new
breakpoint I specify!. This i observed that the "send_t_packet()" is
still sending the information about the old breakpoint!. As suggested
by you I disabled the cache; but it is the same.  

I analyzed the code and found that the break works on s/w breakpoints.
The gdb console is setting the breakInstruction at the the specified
breakpoint location. Once the 8240 looks that breakInstruction, it
enters the exception state, it is getting filed with the actual
instruction when the gdb console recevies the "T" packet from the stub.
It is getting struck after this; even "si" donot work. Where could the
stub going wrong. Do I need to port anything extra for this. 

I'm working on the CVS eCos.  

Regards,
K Srinivas Aithal

--- Jesper Skov <jskov@redhat.com> wrote:
> >>>>> "K" == K Srinivas Aithal <ksaithal_ecos@yahoo.com> writes:
> 
> K> I do have still more problems. The program is not stopping at the
> K> given breakpoint. Do I need to port any extra stubs for my
> K> platform. But I saw the that the 603 pased simulator works fine in
> K> this regard; so I think even MPC8240 based board should work the
> K> same. Or does the "target sim" at the (gdb) prompt of
> K> "powerpc-eabi-gdb" will take care of this. Should I port the
> K> InstructionBreak exception of 8240 also for this.
> 
> The sim does not rely on stub support, so the stubs are untested on a
> 603. In any event, GDB is the one setting breakpoints, so all I can
> think of causing the problem would be the cache. Try disabling it.
> 
> K> I have one more doubt. My sample application is a hello program
> K> (which I took it from the eCos example secion). I'm expecting
> K> "Hello" at the gdb console; but I'm not getting it. The reason for
> K> this is incorrect serial device base address specified in the
> K> serial driver at "packages/devs/serial". My doubt is "Can the
> K> serial driver within hello application pack the string ..hello..
> as
> K> required by the gdb protocol so that the gdb console can
> K> understand" Or "if it donot can the gdb console print it on the
> K> host properly".
> 
> The hello world example uses printf() which (in the default
> configuration) layers on the HAL diag functions. These will do the
> necessary encoding for GDB.
> 
> Jesper


__________________________________________________
Do You Yahoo!?
Make international calls for as low as $.04/minute with Yahoo! Messenger
http://phonecard.yahoo.com/


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