linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* Why the gdbserver can't debug step by step?
       [not found] <200210260458.g9Q4wpq15745@ftp1.mvista.com>
@ 2002-11-04  8:51 ` sjk
  2002-11-11  7:39 ` gdbserver and gdb cross debug? sjk
  1 sibling, 0 replies; 11+ messages in thread
From: sjk @ 2002-11-04  8:51 UTC (permalink / raw)
  To: linuxppc-embedded


Hi,

I have a very curious problem about EP405 board. I make a kernel image
from ibm-walnut405gp LSP and boot up the Linux kernel on EP405 board. So
I use gdbserver and ppc_405-gdb to debug applications,but only the first
breakpoint could be stopped.Then the
programm will execute to end if you press 'step'. Any other breakpoints
could break the execution.

We have encounter this problem on CSB272 405GP also.I think that
IBM-WALNUT405gp should not have this problem.

Please give me some advice!


Best Regards


Jikun Sun

BMR

** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/

^ permalink raw reply	[flat|nested] 11+ messages in thread

* gdbserver and gdb cross debug?
       [not found] <200210260458.g9Q4wpq15745@ftp1.mvista.com>
  2002-11-04  8:51 ` Why the gdbserver can't debug step by step? sjk
@ 2002-11-11  7:39 ` sjk
  2002-11-11  7:40   ` Dr. Craig Hollabaugh
                     ` (2 more replies)
  1 sibling, 3 replies; 11+ messages in thread
From: sjk @ 2002-11-11  7:39 UTC (permalink / raw)
  To: linuxppc-embedded


Hi,

I am porting Linux on EP405 board. So I use gdbserver and gdb to debug
applications,but only the first
breakpoint could be stopped.Then if i press 'step', the program will
execute to end straightforwardly . Any other breakpoints could not break
the execution.

Please give me some advice!


Best Regards


Jikun Sun

BMR

** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: gdbserver and gdb cross debug?
  2002-11-11  7:39 ` gdbserver and gdb cross debug? sjk
@ 2002-11-11  7:40   ` Dr. Craig Hollabaugh
  2002-11-11  7:57     ` sjk
  2002-11-11 13:12   ` Kenneth Johansson
  2002-11-15 19:48   ` William A. Gatliff
  2 siblings, 1 reply; 11+ messages in thread
From: Dr. Craig Hollabaugh @ 2002-11-11  7:40 UTC (permalink / raw)
  To: jack.sun; +Cc: linuxppc-embedded


>
> Hi,
>
> I am porting Linux on EP405 board. So I use gdbserver and gdb to debug
> applications,but only the first
> breakpoint could be stopped.Then if i press 'step', the program will
> execute to end straightforwardly . Any other breakpoints could not break
> the execution.
>
> Please give me some advice!
> Best Regards
> Jikun Sun


Sun,

Which tools are you using? I've been using the fine ELDK from denx on a
walnut board without problems like you mention above.

Craig


** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: gdbserver and gdb cross debug?
  2002-11-11  7:40   ` Dr. Craig Hollabaugh
@ 2002-11-11  7:57     ` sjk
  0 siblings, 0 replies; 11+ messages in thread
From: sjk @ 2002-11-11  7:57 UTC (permalink / raw)
  To: Dr. Craig Hollabaugh; +Cc: linuxppc-embedded


Dr. Craig,

I am using MontaVista Linux LSP. The ibm-walnut-ppc405gp LSP works correctly
on walnut board. We can cross debug applications by ppc_405-gdb and
gdbserver(version 5.1).
But the following problem occurs on EP405 board.
Is it possible that the problem is caused by library, memory or initialization
of PPC405GP registers?

Sun

"Dr. Craig Hollabaugh" wrote:

> > I am porting Linux on EP405 board. So I use gdbserver and gdb to debug
> > applications,but only the first
> > breakpoint could be stopped.Then if i press 'step', the program will
> > execute to end straightforwardly . Any other breakpoints could not break
> > the execution.
>
> Which tools are you using? I've been using the fine ELDK from denx on a
> walnut board without problems like you mention above.

** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: gdbserver and gdb cross debug?
  2002-11-11  7:39 ` gdbserver and gdb cross debug? sjk
  2002-11-11  7:40   ` Dr. Craig Hollabaugh
@ 2002-11-11 13:12   ` Kenneth Johansson
  2002-11-11 13:55     ` Andreas Beranek
  2002-11-11 15:33     ` Wolfgang Denk
  2002-11-15 19:48   ` William A. Gatliff
  2 siblings, 2 replies; 11+ messages in thread
From: Kenneth Johansson @ 2002-11-11 13:12 UTC (permalink / raw)
  To: jack.sun; +Cc: Linuxppc embedded


On Mon, 2002-11-11 at 08:39, sjk wrote:
>
> Hi,
>
> I am porting Linux on EP405 board. So I use gdbserver and gdb to debug
> applications,but only the first
> breakpoint could be stopped.Then if i press 'step', the program will
> execute to end straightforwardly . Any other breakpoints could not break
> the execution.
>
> Please give me some advice!

I did some testing on the devel source and with gdb from debian I got
the same result. Strangely doing a next works ??

I turned off bdi and kgdb but still got the same problem. From reading
kernel/ptrace.c it dose look like the only problem should be single
step. The problem is probably that there exist some return path to user
space where we miss restoring the msr or debug register but I have to
look deeper into this.

Do somebody have testing code for ptrace?? running gdb is a bit heavy
I'm not even sure it's the single step that is wrong.

Also I tried to cross compile gdb5.2 and that did not work as I want
both host and target to be the same and build to be set to i386 but host
and build is the same in the makefile :(

Has anybody tried the bdi2000 is that also broken now ?

What version and patches do people use for gdb on 4xx ?

Strace do not use singlestep but still fails spectacularly when I tested
with my main application. I did not expect tracing an app to make this
app fail to run. tracing simple shell commands like ls works just fine.

What type of problems should I expect to have with strace ?



/me really should get my toolchain in order but print(f|k) is so much
easier to use than first fix the debugger :(



--
Kenneth Johansson
Ericsson AB                       Tel: +46 8 404 71 83
Borgafjordsgatan 9                Fax: +46 8 404 72 72
164 80 Stockholm                  kenneth.johansson@etx.ericsson.se


** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: gdbserver and gdb cross debug?
  2002-11-11 13:12   ` Kenneth Johansson
@ 2002-11-11 13:55     ` Andreas Beranek
  2002-11-11 14:18       ` Kenneth Johansson
  2002-11-11 15:33     ` Wolfgang Denk
  1 sibling, 1 reply; 11+ messages in thread
From: Andreas Beranek @ 2002-11-11 13:55 UTC (permalink / raw)
  To: Kenneth Johansson; +Cc: Linuxppc embedded


Hello,

> > I am porting Linux on EP405 board. So I use gdbserver and gdb......

> Has anybody tried the bdi2000 is that also broken now ? ....

We encountered similar problems. We got it to work with the BDI2000.

Some hints:

Use the latest Firmware from Abatron.
Use the latest Tools and Kernel.
Set the Breakpoint-type to "HARD" in BDI config file.
Check the MMU setup.
Avoid setting software breakpoints in FLASH.

Mit freundlichen Grüßen,

Andreas Beranek

*
* CC&I Computer Communication & Interface GmbH
* Starnbergerstrasse 22
* D-82131 Gauting
* Germany
*
* Tel.:  xx49 (0)89 850 97 18
* Fax:   xx49 (0)89 850 97 19
* Email: a.beranek@cci.isar.de
* Web:   www.cc-i.com
* --... ...-- -.. . -.. .-.. ..--- -- .. -.-.


** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: gdbserver and gdb cross debug?
  2002-11-11 13:55     ` Andreas Beranek
@ 2002-11-11 14:18       ` Kenneth Johansson
  0 siblings, 0 replies; 11+ messages in thread
From: Kenneth Johansson @ 2002-11-11 14:18 UTC (permalink / raw)
  To: Andreas Beranek; +Cc: Linuxppc embedded


On Mon, 2002-11-11 at 14:55, Andreas Beranek wrote:
> Hello,
>
> > > I am porting Linux on EP405 board. So I use gdbserver and gdb......
>
> > Has anybody tried the bdi2000 is that also broken now ? ....
>
> We encountered similar problems. We got it to work with the BDI2000.
>
> Some hints:
>
> Use the latest Firmware from Abatron.
> Use the latest Tools and Kernel.
> Set the Breakpoint-type to "HARD" in BDI config file.
> Check the MMU setup.
> Avoid setting software breakpoints in FLASH.
>
> Mit freundlichen Grüßen,
>

What version of gdb ?

Is bdi broken for soft breakpoint ?? has it ever worked with soft
breakpoint? I tried to get bdi working once and never got soft
breakpoints to work but I did not spend much time on it I needed to
solve my problem and used printk as usual :(.

Anybody used kgdb ?

--
Kenneth Johansson
Ericsson AB                       Tel: +46 8 404 71 83
Borgafjordsgatan 9                Fax: +46 8 404 72 72
164 80 Stockholm                  kenneth.johansson@etx.ericsson.se


** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: gdbserver and gdb cross debug?
  2002-11-11 13:12   ` Kenneth Johansson
  2002-11-11 13:55     ` Andreas Beranek
@ 2002-11-11 15:33     ` Wolfgang Denk
  1 sibling, 0 replies; 11+ messages in thread
From: Wolfgang Denk @ 2002-11-11 15:33 UTC (permalink / raw)
  To: Kenneth Johansson; +Cc: jack.sun, Linuxppc embedded


In message <1037020322.22840.70.camel@spawn> you wrote:
>
> Has anybody tried the bdi2000 is that also broken now ?

Works fine here. We're using the ELDK, of course :-)

> What version and patches do people use for gdb on 4xx ?

Version 5.1.1 plus a couple of patches. See the ELDK  source  if  you
are interrested.

> /me really should get my toolchain in order but print(f|k) is so much
> easier to use than first fix the debugger :(

Did you try using the ELDK?

Best regards,

Wolfgang Denk

--
Software Engineering:  Embedded and Realtime Systems,  Embedded Linux
Phone: (+49)-8142-4596-87  Fax: (+49)-8142-4596-88  Email: wd@denx.de
See us @ electronica 2002 in Munich, Nov 12-15, Hall A3, Booth A3.325

** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: gdbserver and gdb cross debug?
  2002-11-11  7:39 ` gdbserver and gdb cross debug? sjk
  2002-11-11  7:40   ` Dr. Craig Hollabaugh
  2002-11-11 13:12   ` Kenneth Johansson
@ 2002-11-15 19:48   ` William A. Gatliff
  2002-11-18  1:43     ` sjk
  2 siblings, 1 reply; 11+ messages in thread
From: William A. Gatliff @ 2002-11-15 19:48 UTC (permalink / raw)
  To: sjk; +Cc: linuxppc-embedded


Jikun:

On Mon, Nov 11, 2002 at 03:39:07PM +0800, sjk wrote:
> I am porting Linux on EP405 board. So I use gdbserver and gdb to debug
> applications,but only the first
> breakpoint could be stopped.Then if i press 'step', the program will
> execute to end straightforwardly . Any other breakpoints could not break
> the execution.

Have you compiled the application in question with optimizations?  Gdb
isn't so good at debugging optimized code.  Compile with -g -O0 if you
intend to debug.

b.g.
--
Bill Gatliff
Do you do embedded GNU?  I do!
See http://billgatliff.com for details.

** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: gdbserver and gdb cross debug?
  2002-11-15 19:48   ` William A. Gatliff
@ 2002-11-18  1:43     ` sjk
  2002-11-18  8:16       ` Kenneth Johansson
  0 siblings, 1 reply; 11+ messages in thread
From: sjk @ 2002-11-18  1:43 UTC (permalink / raw)
  To: bgat; +Cc: linuxppc-embedded


"William A. Gatliff" wrote:

> Jikun:
>
> On Mon, Nov 11, 2002 at 03:39:07PM +0800, sjk wrote:
> > I am porting Linux on EP405 board. So I use gdbserver and gdb to debug
> > applications,but only the first
> > breakpoint could be stopped.Then if i press 'step', the program will
> > execute to end straightforwardly . Any other breakpoints could not break
> > the execution.
>
> Have you compiled the application in question with optimizations?  Gdb
> isn't so good at debugging optimized code.  Compile with -g -O0 if you
> intend to debug.

I tried to compile hello.c as following:

ppc_405-gcc -g -O0 -o hello hello.c

Then set up the connection of gdbserver and ppc_405-gdb. The program could not
be debugged step by step either.
Is it possible that there is bug in ptrace.c or traps.c


Thanks a lot

Jikun

** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: gdbserver and gdb cross debug?
  2002-11-18  1:43     ` sjk
@ 2002-11-18  8:16       ` Kenneth Johansson
  0 siblings, 0 replies; 11+ messages in thread
From: Kenneth Johansson @ 2002-11-18  8:16 UTC (permalink / raw)
  To: jack.sun; +Cc: bgat, Linuxppc embedded


On Mon, 2002-11-18 at 02:43, sjk wrote:
>
> "William A. Gatliff" wrote:
>
> > Jikun:
> >
> > On Mon, Nov 11, 2002 at 03:39:07PM +0800, sjk wrote:
> > > I am porting Linux on EP405 board. So I use gdbserver and gdb to debug
> > > applications,but only the first
> > > breakpoint could be stopped.Then if i press 'step', the program will
> > > execute to end straightforwardly . Any other breakpoints could not break
> > > the execution.
> >
> > Have you compiled the application in question with optimizations?  Gdb
> > isn't so good at debugging optimized code.  Compile with -g -O0 if you
> > intend to debug.
>
> I tried to compile hello.c as following:
>
> ppc_405-gcc -g -O0 -o hello hello.c
>
> Then set up the connection of gdbserver and ppc_405-gdb. The program could not
> be debugged step by step either.
> Is it possible that there is bug in ptrace.c or traps.c
>
>
> Thanks a lot
>
> Jikun

I have looked into this some more and could not find any problem on the
kernel side(this is no guarantee that none exist). I also get the same
problem with the gdb version from debian (woody)and a fresh compile of
5.2.

However using the gdb 5.1.1 from ELDK 2.0 makes single step work but it
steps right into functions that have no debugging information and I
think step is supposed to avoid this.


--
Kenneth Johansson
Ericsson AB                       Tel: +46 8 404 71 83
Borgafjordsgatan 9                Fax: +46 8 404 72 72
164 80 Stockholm                  kenneth.johansson@etx.ericsson.se


** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2002-11-18  8:16 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <200210260458.g9Q4wpq15745@ftp1.mvista.com>
2002-11-04  8:51 ` Why the gdbserver can't debug step by step? sjk
2002-11-11  7:39 ` gdbserver and gdb cross debug? sjk
2002-11-11  7:40   ` Dr. Craig Hollabaugh
2002-11-11  7:57     ` sjk
2002-11-11 13:12   ` Kenneth Johansson
2002-11-11 13:55     ` Andreas Beranek
2002-11-11 14:18       ` Kenneth Johansson
2002-11-11 15:33     ` Wolfgang Denk
2002-11-15 19:48   ` William A. Gatliff
2002-11-18  1:43     ` sjk
2002-11-18  8:16       ` Kenneth Johansson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).