* Problem in using gdb 6.8 to step code in flash
@ 2008-05-14 12:49 Jiju George T
2008-05-14 13:08 ` Daniel Jacobowitz
0 siblings, 1 reply; 4+ messages in thread
From: Jiju George T @ 2008-05-14 12:49 UTC (permalink / raw)
To: gdb
Hi All,
I am trying to single step some code in a MIPS embedded target flash memory
using GDB 6.8 and our own GDB Server for MIPS target. I am doing below steps
1) Start GDB server which connects to the MIPS target through a JTAG
debugger probe and breaks the target at reset vector (0xBFC00000)
2) Start gdb and connect to GDB server. Gdb now connects to the target and
shows $pc as 0xBFC00000
3) Issue stepi command. But gdb never gets back control since GDB server
fails to set breakpoint on ROM.
When I repeat the same step using the sde-gdb provided by www.mips.com I
am able to do the step operation successfully.
I checked the difference between these two and fond out that the issue is
caused by the difference in the way sde-gdb and gdb 6.8 does step operation.
SDE GDB issues step(s) command to GDB server where as gdb 6.8 tries to set
breakpoint on next line and issue continue(c) command. Any idea on why the
two gdb variants behave differently for step operation using same GDB
server? How gdb decides what mechanism to be used for stepping operation?
Thanks,
Jiju George
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Problem in using gdb 6.8 to step code in flash
2008-05-14 12:49 Problem in using gdb 6.8 to step code in flash Jiju George T
@ 2008-05-14 13:08 ` Daniel Jacobowitz
2008-05-14 14:29 ` Jiju George T
0 siblings, 1 reply; 4+ messages in thread
From: Daniel Jacobowitz @ 2008-05-14 13:08 UTC (permalink / raw)
To: Jiju George T; +Cc: gdb
On Wed, May 14, 2008 at 01:48:38PM +0100, Jiju George T wrote:
> Â Â I checked the difference between these two and fond out that the issue is
> caused by the difference in the way sde-gdb and gdb 6.8 does step operation.
> SDE GDB issues step(s) command to GDB server where as gdb 6.8 tries to set
> breakpoint on next line and issue continue(c) command. Any idea on why the
> two gdb variants behave differently for step operation using same GDB
> server? How gdb decides what mechanism to be used for stepping operation?
Is your GDB configured for mips-linux? The SDE debugger is
configured for mips-elf. Try that configuration instead.
--
Daniel Jacobowitz
CodeSourcery
^ permalink raw reply [flat|nested] 4+ messages in thread
* RE: Problem in using gdb 6.8 to step code in flash
2008-05-14 13:08 ` Daniel Jacobowitz
@ 2008-05-14 14:29 ` Jiju George T
2008-05-14 14:49 ` 'Daniel Jacobowitz'
0 siblings, 1 reply; 4+ messages in thread
From: Jiju George T @ 2008-05-14 14:29 UTC (permalink / raw)
To: 'Daniel Jacobowitz'; +Cc: gdb
I am using configure --target=mipsel-linux --host=i686-pc-linux-gnu for
configuring gdb
I am trying to build a gdb that can both debug linux kernel and some code in
flash. Is it possible?
When I checked the gdb configure script, I can see below differences in MIPS
sde and mips Linux configurations
mips*-sde-elf*)
skipdirs="$skipdirs target-libiberty"
noconfigdirs="$noconfigdirs ${libgcj}"
if test x$with_newlib = xyes; then
noconfigdirs="$noconfigdirs gprof"
fi
libgloss_dir=mips
;;
mips*-*-linux*)
noconfigdirs="$noconfigdirs target-newlib target-libgloss"
;;
How do these configurations affect the stepping logic?
-----Original Message-----
From: Daniel Jacobowitz [mailto:drow@false.org]
Sent: 14 May 2008 14:08
To: Jiju George T
Cc: gdb@sourceware.org
Subject: Re: Problem in using gdb 6.8 to step code in flash
On Wed, May 14, 2008 at 01:48:38PM +0100, Jiju George T wrote:
> I checked the difference between these two and fond out that the issue
is
> caused by the difference in the way sde-gdb and gdb 6.8 does step
operation.
> SDE GDB issues step(s) command to GDB server where as gdb 6.8 tries to set
> breakpoint on next line and issue continue(c) command. Any idea on why the
> two gdb variants behave differently for step operation using same GDB
> server? How gdb decides what mechanism to be used for stepping operation?
Is your GDB configured for mips-linux? The SDE debugger is
configured for mips-elf. Try that configuration instead.
--
Daniel Jacobowitz
CodeSourcery
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: Problem in using gdb 6.8 to step code in flash
2008-05-14 14:29 ` Jiju George T
@ 2008-05-14 14:49 ` 'Daniel Jacobowitz'
0 siblings, 0 replies; 4+ messages in thread
From: 'Daniel Jacobowitz' @ 2008-05-14 14:49 UTC (permalink / raw)
To: Jiju George T; +Cc: gdb
On Wed, May 14, 2008 at 03:28:34PM +0100, Jiju George T wrote:
> I am using configure --target=mipsel-linux --host=i686-pc-linux-gnu for
> configuring gdb
>
> I am trying to build a gdb that can both debug linux kernel and some code in
> flash. Is it possible?
Try building a mips-elf GDB with --enable-targets=mips-linux. If you
are using kgdb and the kernel does not support the single step packet,
you will have to use 'set osabi GNU/Linux' when connected to kgdb
(I don't know if you'll need that or not).
> How do these configurations affect the stepping logic?
They don't, you're looking in the wrong file. See mips-linux-tdep.c.
--
Daniel Jacobowitz
CodeSourcery
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2008-05-14 14:49 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-05-14 12:49 Problem in using gdb 6.8 to step code in flash Jiju George T
2008-05-14 13:08 ` Daniel Jacobowitz
2008-05-14 14:29 ` Jiju George T
2008-05-14 14:49 ` 'Daniel Jacobowitz'
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox