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]
Other format: [Raw text]

Re: GDB for MIPS


"Michael Anburaj" <embeddedeng at hotmail dot com> writes:

> This issue is regarding GDB.
> 
> Info. regarding the dev setup:
> Dev machine: Windows98
> Dev tool: mipsisa32-elf
> Target hardware: MIPS 4Kc Atlas board running YAMON
> 2.04

Where are the GDB stubs are you using? We have never tried using the
YAMON stubs, so I don't know how they will work with the public GDB. Are
you using MIPS's version of GCC or the public one?

> 
> I issued the following gdb commands:
> 
> (gdb) target remote com1
> (gdb) load
> (gdb) b dispstring
> (gdb) c
> 
> After executing c command gdb reports the following...
> 
> warning: Warning: GDB cant find the start of the
> function at 0x3.
> 
> bla...bla...bla
> 
> If I run it (using c command) without setting the
> breakpoint, it runs well.
> 
>

It looks to me like either the breakpoint is being misplaced, or when
it is hit, GDB is misinterpreting the register dump it is getting
back. This may be the result of a mismatch between what GDB expects
and what YAMON is supplying.


> Clipping from remotelogfile:
> 
> c b dispstring
> w $ma0100128,4#8a
> r +$3c04a010#ec
> w +$ma0100124,4#86
> r +$27bd0018#f8
> w +
> c c
> 
> 
> 
> The break point command is doing 2 reads. Is that all
> what its supposed to do (I am sure its target
> dependent)? I imagine that it would write something at
> the location (dispstring).

The breakpoints are actually only placed after the "c" command, when
the target is just about to go. The reads you see are just GDB saving
info away about the location of the breakpoint so it doesn't have to
do it later.

> 
> Also if there is a document up in the Internet
> explaining the GDB communication protocol & all its
> command, please point me to it.
> 

There is a brief description in the comment at the head of
hal/common/current/src/generic-stub.c. The description in the YAMON
documentation that comes on the CD with the Atlas is as good as any I
have seen. But even this might not help, these are only primitive
operations, what GDB does with them is often hard to understand and
only encoded in the often complex algorithms in the code itself.

I suspect that most of your problems are with using YAMON, I would
strongly advise you to look at switching over to RedBoot.

-- 
Nick Garnett                    eCos Kernel Architect
http://www.ecoscentric.com/     The eCos and RedBoot experts


-- 
Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
and search the list archive: http://sources.redhat.com/ml/ecos-discuss


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