Mirror of the gdb mailing list
 help / color / mirror / Atom feed
* Remote Debugging on IXDP425
@ 2003-12-02  1:15 Stephen A. Witt
  2003-12-02  4:20 ` Ian Lance Taylor
  0 siblings, 1 reply; 6+ messages in thread
From: Stephen A. Witt @ 2003-12-02  1:15 UTC (permalink / raw)
  To: gdb

I'm trying to get remote debugging using gdbserver on an IXDP425 target
board. I've built a cross gdb-6.0 that executes on an i386 with the target
set to arm-unknown-linux-gnu. The 'arm-unknown-linux-gnu-gdb' on my
development machine does connect and talk to the gdbserver running on the
target. I can start the program from gdb but breakpoints that I set don't
break the program. I turned on remote debugging (set debug remote 1) and
get the following:

(gdb) b main
Sending packet: $m87a0,1#ca...Ack
Packet received: e5
Sending packet: $m87a0,1#ca...Ack
Packet received: e5
Breakpoint 1 at 0x87a0
(gdb) c
Continuing.
Sending packet: $Z0,8ec0,1#43...Ack
Packet received:
Packet Z0 (software-breakpoint) is NOT supported
Sending packet: $m8ec0,1#fa...Ack
Packet received: 00
Sending packet: $X8ec0,0:#1e...Ack
Packet received:
binary downloading NOT suppported by target
Sending packet: $M8ec0,1:cc#da...Ack
Packet received: OK
Sending packet: $m87a0,1#ca...Ack
Packet received: e5
Sending packet: $M87a0,1:cc#aa...Ack
Packet received: OK
Sending packet: $Hc0#db...Ack
Packet received: OK
Sending packet: $c#63...Ack


So the software-breakpoint NOT supported would seem to be my problem. Any
information about how I fix this?

Thanks...


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

* Re: Remote Debugging on IXDP425
  2003-12-02  1:15 Remote Debugging on IXDP425 Stephen A. Witt
@ 2003-12-02  4:20 ` Ian Lance Taylor
  2003-12-03 19:17   ` Stephen A. Witt
  0 siblings, 1 reply; 6+ messages in thread
From: Ian Lance Taylor @ 2003-12-02  4:20 UTC (permalink / raw)
  To: Stephen A. Witt; +Cc: gdb

"Stephen A. Witt" <sawitt@electra.rsc.raytheon.com> writes:

> I'm trying to get remote debugging using gdbserver on an IXDP425 target
> board. I've built a cross gdb-6.0 that executes on an i386 with the target
> set to arm-unknown-linux-gnu. The 'arm-unknown-linux-gnu-gdb' on my
> development machine does connect and talk to the gdbserver running on the
> target. I can start the program from gdb but breakpoints that I set don't
> break the program. I turned on remote debugging (set debug remote 1) and
> get the following:
> 
> (gdb) b main
> Sending packet: $m87a0,1#ca...Ack
> Packet received: e5
> Sending packet: $m87a0,1#ca...Ack
> Packet received: e5
> Breakpoint 1 at 0x87a0
> (gdb) c
> Continuing.
> Sending packet: $Z0,8ec0,1#43...Ack
> Packet received:
> Packet Z0 (software-breakpoint) is NOT supported
> Sending packet: $m8ec0,1#fa...Ack
> Packet received: 00
> Sending packet: $X8ec0,0:#1e...Ack
> Packet received:
> binary downloading NOT suppported by target
> Sending packet: $M8ec0,1:cc#da...Ack
> Packet received: OK
> Sending packet: $m87a0,1#ca...Ack
> Packet received: e5
> Sending packet: $M87a0,1:cc#aa...Ack
> Packet received: OK
> Sending packet: $Hc0#db...Ack
> Packet received: OK
> Sending packet: $c#63...Ack
> 
> 
> So the software-breakpoint NOT supported would seem to be my problem. Any
> information about how I fix this?

That isn't the problem by itself.  If the remote target doesn't
support `Z0', then gdb will try to set a breakpoint by writing
directly to memory.  That's what you see it doing with the `m' request
(read memory) followed by the 'X' request (binary download, which is
also not supported), followed by the 'M' request (write memory).  The
sequence above winds up writing the byte 0xcc to address 0x8ec0.
Similarly, it writes the byte 0xcc to the address 0x87a0.

So this is all fine.  At least, it would be fine if a one-byte 0xcc
were an ARM breakpoint instruction.  Unfortunately, 0xcc is an i386
breakpoint instruction.  So I would say that you are running a gdb
configured for an i386 target and connecting to a gdbserver running on
an ARM.  Don't do that.

Ian


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

* Re: Remote Debugging on IXDP425
  2003-12-02  4:20 ` Ian Lance Taylor
@ 2003-12-03 19:17   ` Stephen A. Witt
  2003-12-03 21:29     ` Daniel Jacobowitz
  0 siblings, 1 reply; 6+ messages in thread
From: Stephen A. Witt @ 2003-12-03 19:17 UTC (permalink / raw)
  To: Ian Lance Taylor; +Cc: gdb

On Mon, 1 Dec 2003, Ian Lance Taylor wrote:

> "Stephen A. Witt" <sawitt@electra.rsc.raytheon.com> writes:
>
> > I'm trying to get remote debugging using gdbserver on an IXDP425 target
> > board. I've built a cross gdb-6.0 that executes on an i386 with the target
> > set to arm-unknown-linux-gnu. The 'arm-unknown-linux-gnu-gdb' on my
> > development machine does connect and talk to the gdbserver running on the
> > target. I can start the program from gdb but breakpoints that I set don't
> > break the program. I turned on remote debugging (set debug remote 1) and
> > get the following:
> >
-- snip --
>
> That isn't the problem by itself.  If the remote target doesn't
> support `Z0', then gdb will try to set a breakpoint by writing
> directly to memory.  That's what you see it doing with the `m' request
> (read memory) followed by the 'X' request (binary download, which is
> also not supported), followed by the 'M' request (write memory).  The
> sequence above winds up writing the byte 0xcc to address 0x8ec0.
> Similarly, it writes the byte 0xcc to the address 0x87a0.
>
> So this is all fine.  At least, it would be fine if a one-byte 0xcc
> were an ARM breakpoint instruction.  Unfortunately, 0xcc is an i386
> breakpoint instruction.  So I would say that you are running a gdb
> configured for an i386 target and connecting to a gdbserver running on
> an ARM.  Don't do that.
>
> Ian
>

Thanks very much for the response, very dumb mistake on my part. I had
built a gdb with an arm-linux target, but I inadvertantly used the normal
i386 gdb when I first tried this. Using the arm-linux gdb that I had
built, with the information you provided, I found that the breakpoint
instruction being sent was 0x01009fef. The correct bp inst for an IXP425
(a big-endian CPU) is 0xef9f0001. So I modified the breakpoint instruction
value in gdb to 0xef9f0001 and breakpoints work now.

There are some other problems, like when I do 'step' or 'next' I get a
"ptrace: bogus breakpoint trap". Floating point variable display doesn't
work. So I'm looking into these.

I just hacked in the changed breakpoint instruction value but it seems the
correct way to do it would be to tell gdb during configuration that the
target is an xscale CPU, and conditionally compile in the correct value.
At first I thought I hadn't built gdb properly, but it doesn't appear that
gdb-6.0 really supports an IXP425. Is this true?




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

* Re: Remote Debugging on IXDP425
  2003-12-03 19:17   ` Stephen A. Witt
@ 2003-12-03 21:29     ` Daniel Jacobowitz
  2003-12-03 21:50       ` Stephen A. Witt
  2003-12-03 22:24       ` Peter Reilley
  0 siblings, 2 replies; 6+ messages in thread
From: Daniel Jacobowitz @ 2003-12-03 21:29 UTC (permalink / raw)
  To: Stephen A. Witt; +Cc: gdb

On Wed, Dec 03, 2003 at 11:17:18AM -0800, Stephen A. Witt wrote:
> Thanks very much for the response, very dumb mistake on my part. I had
> built a gdb with an arm-linux target, but I inadvertantly used the normal
> i386 gdb when I first tried this. Using the arm-linux gdb that I had
> built, with the information you provided, I found that the breakpoint
> instruction being sent was 0x01009fef. The correct bp inst for an IXP425
> (a big-endian CPU) is 0xef9f0001. So I modified the breakpoint instruction
> value in gdb to 0xef9f0001 and breakpoints work now.

This is a GDB bug fixed in more recent versions of GDB.

> There are some other problems, like when I do 'step' or 'next' I get a
> "ptrace: bogus breakpoint trap". Floating point variable display doesn't
> work. So I'm looking into these.

The former is a Linux kernel bug.  I sent Russell an explanation of the
problem and got no response.  Just turn off the message.

> I just hacked in the changed breakpoint instruction value but it seems the
> correct way to do it would be to tell gdb during configuration that the
> target is an xscale CPU, and conditionally compile in the correct value.
> At first I thought I hadn't built gdb properly, but it doesn't appear that
> gdb-6.0 really supports an IXP425. Is this true?

ARM/Linux in big endian mode is definitely still a black sheep.  None
of the GNU tools really support it out of the box, only various
vendors' tools.

-- 
Daniel Jacobowitz
MontaVista Software                         Debian GNU/Linux Developer


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

* Re: Remote Debugging on IXDP425
  2003-12-03 21:29     ` Daniel Jacobowitz
@ 2003-12-03 21:50       ` Stephen A. Witt
  2003-12-03 22:24       ` Peter Reilley
  1 sibling, 0 replies; 6+ messages in thread
From: Stephen A. Witt @ 2003-12-03 21:50 UTC (permalink / raw)
  To: Daniel Jacobowitz; +Cc: gdb

On Wed, 3 Dec 2003, Daniel Jacobowitz wrote:

> On Wed, Dec 03, 2003 at 11:17:18AM -0800, Stephen A. Witt wrote:
> > Thanks very much for the response, very dumb mistake on my part. I had
> > built a gdb with an arm-linux target, but I inadvertantly used the normal
> > i386 gdb when I first tried this. Using the arm-linux gdb that I had
> > built, with the information you provided, I found that the breakpoint
> > instruction being sent was 0x01009fef. The correct bp inst for an IXP425
> > (a big-endian CPU) is 0xef9f0001. So I modified the breakpoint instruction
> > value in gdb to 0xef9f0001 and breakpoints work now.
>
> This is a GDB bug fixed in more recent versions of GDB.

Thanks for the response. Browsing gdb cvs I see the big endian break inst.
mod. I'll get the latest from cvs and see what happens.

Thanks...


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

* Re: Remote Debugging on IXDP425
  2003-12-03 21:29     ` Daniel Jacobowitz
  2003-12-03 21:50       ` Stephen A. Witt
@ 2003-12-03 22:24       ` Peter Reilley
  1 sibling, 0 replies; 6+ messages in thread
From: Peter Reilley @ 2003-12-03 22:24 UTC (permalink / raw)
  To: gdb; +Cc: Jim MacGregor


----- Original Message -----
From: "Daniel Jacobowitz" <drow@mvista.com>
To: "Stephen A. Witt" <sawitt@electra.rsc.raytheon.com>
Cc: <gdb@sources.redhat.com>
Sent: Wednesday, December 03, 2003 4:29 PM
Subject: Re: Remote Debugging on IXDP425


> On Wed, Dec 03, 2003 at 11:17:18AM -0800, Stephen A. Witt wrote:
> > Thanks very much for the response, very dumb mistake on my part. I had
> > built a gdb with an arm-linux target, but I inadvertantly used the
normal
> > i386 gdb when I first tried this. Using the arm-linux gdb that I had
> > built, with the information you provided, I found that the breakpoint
> > instruction being sent was 0x01009fef. The correct bp inst for an IXP425
> > (a big-endian CPU) is 0xef9f0001. So I modified the breakpoint
instruction
> > value in gdb to 0xef9f0001 and breakpoints work now.
>
> This is a GDB bug fixed in more recent versions of GDB.
>
> > There are some other problems, like when I do 'step' or 'next' I get a
> > "ptrace: bogus breakpoint trap". Floating point variable display doesn't
> > work. So I'm looking into these.
>
> The former is a Linux kernel bug.  I sent Russell an explanation of the
> problem and got no response.  Just turn off the message.
>
> > I just hacked in the changed breakpoint instruction value but it seems
the
> > correct way to do it would be to tell gdb during configuration that the
> > target is an xscale CPU, and conditionally compile in the correct value.
> > At first I thought I hadn't built gdb properly, but it doesn't appear
that
> > gdb-6.0 really supports an IXP425. Is this true?
>
> ARM/Linux in big endian mode is definitely still a black sheep.  None
> of the GNU tools really support it out of the box, only various
> vendors' tools.
>
> --
> Daniel Jacobowitz
> MontaVista Software                         Debian GNU/Linux Developer
>

I have run a Sharp Arm 7 in both big and little endian modes.   This
is running on a bare system with no OS.   I did this as part of my work on
the
binary packages that are provided on the Macraigor web site;

www.macraigor.com

The RPM package contains examples for both big and little endian mode.

Pete.



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

end of thread, other threads:[~2003-12-03 22:24 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-12-02  1:15 Remote Debugging on IXDP425 Stephen A. Witt
2003-12-02  4:20 ` Ian Lance Taylor
2003-12-03 19:17   ` Stephen A. Witt
2003-12-03 21:29     ` Daniel Jacobowitz
2003-12-03 21:50       ` Stephen A. Witt
2003-12-03 22:24       ` Peter Reilley

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox