From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17751 invoked by alias); 3 Dec 2003 19:17:28 -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 17742 invoked from network); 3 Dec 2003 19:17:25 -0000 Received: from unknown (HELO bos-gate4.raytheon.com) (199.46.198.233) by sources.redhat.com with SMTP; 3 Dec 2003 19:17:25 -0000 Received: from ds02e00.directory.ray.com (ds02e00.directory.ray.com [147.25.130.245]) by bos-gate4.raytheon.com (8.12.10/8.12.10) with ESMTP id hB3JHONV014515; Wed, 3 Dec 2003 14:17:25 -0500 (EST) Received: from ds02e00.directory.ray.com (localhost [127.0.0.1]) by ds02e00.directory.ray.com (8.12.10/8.12.1) with ESMTP id hB3JHNoB020373; Wed, 3 Dec 2003 19:17:23 GMT Received: Received: from electra.rsc.raytheon.com (electra.RSC.RAYTHEON.COM [147.19.81.176]) by ds02e00.directory.ray.com (8.12.10/8.12.9) with ESMTP id hB3JHMsk020355 sender sawitt@zeus.rsc.raytheon.com; Wed, 3 Dec 2003 19:17:22 GMT Received: from [147.19.81.175] (helo=zeus.rsc.raytheon.com ident=mail) by electra.rsc.raytheon.com with esmtp (Exim 3.35 #1 (Debian)) id 1ARcUz-0007qz-00; Wed, 03 Dec 2003 11:17:21 -0800 Received: from sawitt (helo=localhost) by zeus.rsc.raytheon.com with local-esmtp (Exim 3.35 #1 (Debian)) id 1ARcUz-0005UQ-00; Wed, 03 Dec 2003 11:17:21 -0800 Date: Wed, 03 Dec 2003 19:17:00 -0000 From: "Stephen A. Witt" X-X-Sender: sawitt@zeus.rsc.raytheon.com To: Ian Lance Taylor cc: gdb@sources.redhat.com Subject: Re: Remote Debugging on IXDP425 In-Reply-To: Message-ID: References: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-SW-Source: 2003-12/txt/msg00056.txt.bz2 On Mon, 1 Dec 2003, Ian Lance Taylor wrote: > "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: > > -- 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?