From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13937 invoked by alias); 2 Dec 2003 04:20:25 -0000 Mailing-List: contact gdb-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sources.redhat.com Received: (qmail 13885 invoked from network); 2 Dec 2003 04:20:24 -0000 Received: from unknown (HELO yosemite.airs.com) (209.128.65.135) by sources.redhat.com with SMTP; 2 Dec 2003 04:20:24 -0000 Received: (qmail 2742 invoked by uid 10); 2 Dec 2003 04:20:23 -0000 Received: (qmail 23281 invoked by uid 500); 2 Dec 2003 04:20:17 -0000 From: Ian Lance Taylor To: "Stephen A. Witt" Cc: gdb@sources.redhat.com Subject: Re: Remote Debugging on IXDP425 References: Date: Tue, 02 Dec 2003 04:20:00 -0000 In-Reply-To: Message-ID: User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-SW-Source: 2003-12/txt/msg00013.txt.bz2 "Stephen A. Witt" 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