* cross debugging r3912 cpu with gdb
@ 2003-12-07 22:28 Mark and Janice Juszczec
2003-12-07 22:54 ` Daniel Jacobowitz
0 siblings, 1 reply; 7+ messages in thread
From: Mark and Janice Juszczec @ 2003-12-07 22:28 UTC (permalink / raw)
To: linux-mips
Hi folks
I'm trying to track down a SIGSEGV generated by kaffe on the Helio pda. It
uses a Phillips R3912 cpu.
The gdb 6.0 docs say configure as follows: configure
--target=mips-idt-ecoff. I did and mips shows up as an available target.
Unfortunately, when I try to connect to the pda via a USB serial connection,
I get:
(gdb) set debug remote 2
(gdb) target mips /dev/ttyUSB0
Expected "<IDT>", got "": FAIL
Expected "<IDT>", got "": FAIL
Expected "<IDT>", got "": FAIL
Failed to initialize.
Ending remote MIPS debugging.
You can't do that without a process to debug
Further research shows there is supposed to be a target named r3900. It
doesn't show up under my available targets and
(gdb) target r3900 /dev/ttyUSB0
gives and error saying there is no target named r3900.
Can anyone out there give me advice about gdb and mips cross debugging?
Mark
_________________________________________________________________
Shop online for kids toys by age group, price range, and toy category at
MSN Shopping. No waiting for a clerk to help you! http://shopping.msn.com
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: cross debugging r3912 cpu with gdb
2003-12-07 22:28 cross debugging r3912 cpu with gdb Mark and Janice Juszczec
@ 2003-12-07 22:54 ` Daniel Jacobowitz
0 siblings, 0 replies; 7+ messages in thread
From: Daniel Jacobowitz @ 2003-12-07 22:54 UTC (permalink / raw)
To: Mark and Janice Juszczec; +Cc: linux-mips
On Sun, Dec 07, 2003 at 10:28:33PM +0000, Mark and Janice Juszczec wrote:
>
> Hi folks
>
> I'm trying to track down a SIGSEGV generated by kaffe on the Helio pda. It
> uses a Phillips R3912 cpu.
You left out lots of details. What operating system is the r3900
running? From the list name, I assume it's Linux/MIPS. So why did you
configure for mips-idt-ecoff?
If you're using gdbserver, then you want target=mips-linux and "target
remote", not "target mips".
>
> The gdb 6.0 docs say configure as follows: configure
> --target=mips-idt-ecoff. I did and mips shows up as an available target.
>
> Unfortunately, when I try to connect to the pda via a USB serial
> connection, I get:
>
> (gdb) set debug remote 2
> (gdb) target mips /dev/ttyUSB0
> Expected "<IDT>", got "": FAIL
> Expected "<IDT>", got "": FAIL
> Expected "<IDT>", got "": FAIL
> Failed to initialize.
> Ending remote MIPS debugging.
> You can't do that without a process to debug
>
> Further research shows there is supposed to be a target named r3900. It
> doesn't show up under my available targets and
>
> (gdb) target r3900 /dev/ttyUSB0
>
> gives and error saying there is no target named r3900.
>
> Can anyone out there give me advice about gdb and mips cross debugging?
>
> Mark
>
> _________________________________________________________________
> Shop online for kids? toys by age group, price range, and toy category at
> MSN Shopping. No waiting for a clerk to help you! http://shopping.msn.com
>
>
>
--
Daniel Jacobowitz
MontaVista Software Debian GNU/Linux Developer
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: cross debugging r3912 cpu with gdb
@ 2003-12-08 0:02 Mark and Janice Juszczec
2003-12-08 0:02 ` Mark and Janice Juszczec
2003-12-08 3:10 ` Daniel Jacobowitz
0 siblings, 2 replies; 7+ messages in thread
From: Mark and Janice Juszczec @ 2003-12-08 0:02 UTC (permalink / raw)
To: dan; +Cc: linux-mips
Daniel
you wrote:
>
>You left out lots of details.
>
Oops. My bad.
>What operating system is the r3900 running?
Yes its linux. kernel v2.4.0-test1-acc22
>From the list name, I assume it's Linux/MIPS. So why did you configure for
>mips-idt-ecoff?
>
Hmmmmm. Good question. The gdb docs say I have to if I want to use the
MIPS remote debugging protocol.
I did try --target=mipsel-elf-linux and --target-mipsel-linux. I got the
following targets:
(gdb) help target
Connect to a target machine or process.
The first argument is the type or protocol of the target machine.
Remaining arguments are interpreted by the target protocol. For more
information on the arguments for a particular protocol, type
`help target ' followed by the protocol name.
List of target subcommands:
target async -- Use a remote computer via a serial line
target cisco -- Use a remote machine via TCP
target core -- Use a core file as a target
target exec -- Use an executable file as a target
target extended-async -- Use a remote computer via a serial line
target extended-remote -- Use a remote computer via a serial line
target remote -- Use a remote computer via a serial line
target sim -- Use the compiled-in simulator
I figured mips should show up, so I guessed they were incorrect. Even so,
I tried connecting with both and got the same results:
(gdb) target async /dev/ttyUSB0
Remote debugging using /dev/ttyUSB0
Sending packet: $Hc-1#09...Sending packet: $Hc-1#09...Sending packet:
$Hc-1#09...Sending packet: $Hc-1#09...Timed out.
Timed out.
Timed out.
Ignoring packet error, continuing...
Sending packet: $qC#b4...Sending packet: $qC#b4...Sending packet:
$qC#b4...Sending packet: $qC#b4...Timed out.
Timed out.
Timed out.
Ignoring packet error, continuing...
Sending packet: $qOffsets#4b...Sending packet: $qOffsets#4b...Sending
packet: $qOffsets#4b...Sending packet: $qOffsets#4b...Timed out.
Timed out.
Timed out.
Ignoring packet error, continuing...
Couldn't establish connection to remote target
Malformed response to offset query, timeout
Any idea what that all means?
>If you're using gdbserver, then you want target=mips-linux and "target
>remote", not "target mips".
>
I'm not using gdbserver. It won't fit on my pda if I include kaffe and
its associated files.
Mark
_________________________________________________________________
Take advantage of our best MSN Dial-up offer of the year six months
@$9.95/month. Sign up now! http://join.msn.com/?page=dept/dialup
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: cross debugging r3912 cpu with gdb
2003-12-08 0:02 Mark and Janice Juszczec
@ 2003-12-08 0:02 ` Mark and Janice Juszczec
2003-12-08 3:10 ` Daniel Jacobowitz
1 sibling, 0 replies; 7+ messages in thread
From: Mark and Janice Juszczec @ 2003-12-08 0:02 UTC (permalink / raw)
To: dan; +Cc: linux-mips
Daniel
you wrote:
>
>You left out lots of details.
>
Oops. My bad.
>What operating system is the r3900 running?
Yes its linux. kernel v2.4.0-test1-acc22
From the list name, I assume it's Linux/MIPS. So why did you configure for
>mips-idt-ecoff?
>
Hmmmmm. Good question. The gdb docs say I have to if I want to use the
MIPS remote debugging protocol.
I did try --target=mipsel-elf-linux and --target-mipsel-linux. I got the
following targets:
(gdb) help target
Connect to a target machine or process.
The first argument is the type or protocol of the target machine.
Remaining arguments are interpreted by the target protocol. For more
information on the arguments for a particular protocol, type
`help target ' followed by the protocol name.
List of target subcommands:
target async -- Use a remote computer via a serial line
target cisco -- Use a remote machine via TCP
target core -- Use a core file as a target
target exec -- Use an executable file as a target
target extended-async -- Use a remote computer via a serial line
target extended-remote -- Use a remote computer via a serial line
target remote -- Use a remote computer via a serial line
target sim -- Use the compiled-in simulator
I figured mips should show up, so I guessed they were incorrect. Even so,
I tried connecting with both and got the same results:
(gdb) target async /dev/ttyUSB0
Remote debugging using /dev/ttyUSB0
Sending packet: $Hc-1#09...Sending packet: $Hc-1#09...Sending packet:
$Hc-1#09...Sending packet: $Hc-1#09...Timed out.
Timed out.
Timed out.
Ignoring packet error, continuing...
Sending packet: $qC#b4...Sending packet: $qC#b4...Sending packet:
$qC#b4...Sending packet: $qC#b4...Timed out.
Timed out.
Timed out.
Ignoring packet error, continuing...
Sending packet: $qOffsets#4b...Sending packet: $qOffsets#4b...Sending
packet: $qOffsets#4b...Sending packet: $qOffsets#4b...Timed out.
Timed out.
Timed out.
Ignoring packet error, continuing...
Couldn't establish connection to remote target
Malformed response to offset query, timeout
Any idea what that all means?
>If you're using gdbserver, then you want target=mips-linux and "target
>remote", not "target mips".
>
I'm not using gdbserver. It won't fit on my pda if I include kaffe and
its associated files.
Mark
_________________________________________________________________
Take advantage of our best MSN Dial-up offer of the year six months
@$9.95/month. Sign up now! http://join.msn.com/?page=dept/dialup
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: cross debugging r3912 cpu with gdb
2003-12-08 0:02 Mark and Janice Juszczec
2003-12-08 0:02 ` Mark and Janice Juszczec
@ 2003-12-08 3:10 ` Daniel Jacobowitz
1 sibling, 0 replies; 7+ messages in thread
From: Daniel Jacobowitz @ 2003-12-08 3:10 UTC (permalink / raw)
To: Mark and Janice Juszczec; +Cc: linux-mips
On Mon, Dec 08, 2003 at 12:02:14AM +0000, Mark and Janice Juszczec wrote:
>
> Daniel
>
> you wrote:
> >
> >You left out lots of details.
> >
>
> Oops. My bad.
>
> >What operating system is the r3900 running?
>
> Yes its linux. kernel v2.4.0-test1-acc22
>
> >From the list name, I assume it's Linux/MIPS. So why did you configure
> >for mips-idt-ecoff?
> >
> Hmmmmm. Good question. The gdb docs say I have to if I want to use the
> MIPS remote debugging protocol.
>
> I did try --target=mipsel-elf-linux and --target-mipsel-linux. I got the
> following targets:
>
> (gdb) help target
> Connect to a target machine or process.
> The first argument is the type or protocol of the target machine.
> Remaining arguments are interpreted by the target protocol. For more
> information on the arguments for a particular protocol, type
> `help target ' followed by the protocol name.
>
> List of target subcommands:
>
> target async -- Use a remote computer via a serial line
> target cisco -- Use a remote machine via TCP
> target core -- Use a core file as a target
> target exec -- Use an executable file as a target
> target extended-async -- Use a remote computer via a serial line
> target extended-remote -- Use a remote computer via a serial line
> target remote -- Use a remote computer via a serial line
> target sim -- Use the compiled-in simulator
>
> I figured mips should show up, so I guessed they were incorrect. Even so,
> I tried connecting with both and got the same results:
>
> (gdb) target async /dev/ttyUSB0
> Remote debugging using /dev/ttyUSB0
> Sending packet: $Hc-1#09...Sending packet: $Hc-1#09...Sending packet:
> $Hc-1#09...Sending packet: $Hc-1#09...Timed out.
> Timed out.
> Timed out.
> Ignoring packet error, continuing...
> Sending packet: $qC#b4...Sending packet: $qC#b4...Sending packet:
> $qC#b4...Sending packet: $qC#b4...Timed out.
> Timed out.
> Timed out.
> Ignoring packet error, continuing...
> Sending packet: $qOffsets#4b...Sending packet: $qOffsets#4b...Sending
> packet: $qOffsets#4b...Sending packet: $qOffsets#4b...Timed out.
> Timed out.
> Timed out.
> Ignoring packet error, continuing...
> Couldn't establish connection to remote target
> Malformed response to offset query, timeout
>
> Any idea what that all means?
>
> >If you're using gdbserver, then you want target=mips-linux and "target
> >remote", not "target mips".
> >
>
> I'm not using gdbserver. It won't fit on my pda if I include kaffe and
> its associated files.
Then what ARE you using on the target?
You have to connect to some particular debug stub. That determines
what protocol to use.
--
Daniel Jacobowitz
MontaVista Software Debian GNU/Linux Developer
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: cross debugging r3912 cpu with gdb
@ 2003-12-08 12:48 Mark and Janice Juszczec
2003-12-08 15:39 ` Daniel Jacobowitz
0 siblings, 1 reply; 7+ messages in thread
From: Mark and Janice Juszczec @ 2003-12-08 12:48 UTC (permalink / raw)
To: dan; +Cc: linux-mips
Daniel
>
>Then what ARE you using on the target?
>
I have a kernel, busybox (for init and sh) and kaffe+associated files.
These have all been cross compiled from i386 for mipsel-linux using gcc
(2.95 or 3.0).
>You have to connect to some particular debug stub. That determines
>what protocol to use.
>
I wanted to test starting the whole thing up and connecting with gdb before
trying to actually debug anything. So, I haven't begun to worry about debug
stubs.
Frankly, I'm confused as to where they'd go. It seems to me I want to let
the kernel start up on the pda and then use gdb to tell it to start running
kaffe. If that's true, I need debug stubs in kaffe. Am I completely wrong
with this idea?
Mark
>--
>Daniel Jacobowitz
>MontaVista Software Debian GNU/Linux Developer
_________________________________________________________________
Browse styles for all ages, from the latest looks to cozy weekend wear at
MSN Shopping. And check out the beauty products! http://shopping.msn.com
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: cross debugging r3912 cpu with gdb
2003-12-08 12:48 Mark and Janice Juszczec
@ 2003-12-08 15:39 ` Daniel Jacobowitz
0 siblings, 0 replies; 7+ messages in thread
From: Daniel Jacobowitz @ 2003-12-08 15:39 UTC (permalink / raw)
To: Mark and Janice Juszczec; +Cc: linux-mips
On Mon, Dec 08, 2003 at 12:48:44PM +0000, Mark and Janice Juszczec wrote:
>
> Daniel
>
> >
> >Then what ARE you using on the target?
> >
>
> I have a kernel, busybox (for init and sh) and kaffe+associated files.
> These have all been cross compiled from i386 for mipsel-linux using gcc
> (2.95 or 3.0).
>
> >You have to connect to some particular debug stub. That determines
> >what protocol to use.
> >
>
>
> I wanted to test starting the whole thing up and connecting with gdb before
> trying to actually debug anything. So, I haven't begun to worry about
> debug stubs.
GDB has to connect _to_ something :) If you don't have a stub, nothing
on your target speaks the GDB protocol.
> Frankly, I'm confused as to where they'd go. It seems to me I want to let
> the kernel start up on the pda and then use gdb to tell it to start running
> kaffe. If that's true, I need debug stubs in kaffe. Am I completely wrong
> with this idea?
Yes. I recommend you read the GDB manual, on the section describing
gdbserver. GDB doesn't connect to the kernel at all, you start a
gdbserver process on the target with the path to kaffe.
--
Daniel Jacobowitz
MontaVista Software Debian GNU/Linux Developer
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2003-12-08 15:40 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-12-07 22:28 cross debugging r3912 cpu with gdb Mark and Janice Juszczec
2003-12-07 22:54 ` Daniel Jacobowitz
-- strict thread matches above, loose matches on Subject: below --
2003-12-08 0:02 Mark and Janice Juszczec
2003-12-08 0:02 ` Mark and Janice Juszczec
2003-12-08 3:10 ` Daniel Jacobowitz
2003-12-08 12:48 Mark and Janice Juszczec
2003-12-08 15:39 ` Daniel Jacobowitz
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox