From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24596 invoked by alias); 1 Nov 2011 19:57:49 -0000 Received: (qmail 24580 invoked by uid 22791); 1 Nov 2011 19:57:47 -0000 X-SWARE-Spam-Status: No, hits=-2.0 required=5.0 tests=AWL,BAYES_00,HK_RANDOM_ENVFROM,RCVD_IN_DNSWL_LOW,TW_SV X-Spam-Check-By: sourceware.org Received: from sneak2.sneakemail.com (HELO sneak2.sneakemail.com) (38.113.6.65) by sourceware.org (qpsmtpd/0.43rc1) with SMTP; Tue, 01 Nov 2011 19:57:32 +0000 Received: (qmail 25817 invoked from network); 1 Nov 2011 19:57:31 -0000 Received: from unknown (HELO localhost.localdomain) (192.168.0.1) by sneak2.sneakemail.com with SMTP; 1 Nov 2011 19:57:31 -0000 Received: from 206.168.13.214 by mail.sneakemail.com with SMTP; 1 Nov 2011 19:57:31 -0000 Received: (sneakemail censored 21693-1320177450-475470 #2); 1 Nov 2011 19:57:31 -0000 Received: (sneakemail censored 21693-1320177450-475470 #1); 1 Nov 2011 19:57:31 -0000 Date: Tue, 01 Nov 2011 19:57:00 -0000 Message-ID: <21693-1320177450-475470@sneakemail.com> From: "John Hein" To: gdb@sourceware.org To: , Tom Tromey In-Reply-To: References: <31555-1320078547-391519@sneakemail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Subject: Re: cross gdb for arm-freebsd X-IsSubscribed: yes Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2011-11/txt/msg00009.txt.bz2 Tom Tromey wrote at 13:24 -0600 on Nov 1, 2011: > >>>>> "John" == John Hein writes: > > John> The gdb in the base FreeBSD is quite old (6.1.1) and I'm having > John> trouble debugging a core file from a threaded application. A newer > John> gdb (7.2 and 7.3.1) are in FreeBSD's ports system, but getting it to > John> build for --target=arm-freebsd and read core files is proving > John> difficult - I could use a few hints. > > John> --- orig/armfbsd-tdep.c 2007-11-18 10:07:47.000000000 -0700 > John> +++ armfbsd-tdep.c 2011-10-31 10:14:58.000000000 -0600 > > This file isn't in gdb. I guess it is a FreeBSD addition. Indeed it is a FreeBSD addition. You removed a bit too much context from my original email in your quote. Notably the svn url which points out where armfbsd-tdep.c comes from: John Hein wrote at 10:29 -0600 on Oct 31, 2011: > The gdb in the base FreeBSD is quite old (6.1.1) and I'm having > trouble debugging a core file from a threaded application. A newer > gdb (7.2 and 7.3.1) are in FreeBSD's ports system, but getting it to > build for --target=arm-freebsd and read core files is proving > difficult - I could use a few hints. > > Since there is no support in the upstream latest gdb for a cross built > arm-freebsd target (that I could see), I tried copying the > architecture files from > http://svnweb.freebsd.org/base/head/gnu/usr.bin/gdb/arch/arm/ and > updating them for 7.3.1 Without using armfbsd-tdep.c and cross compiling the unmodified gdb for --target=arm-freebsd, I get a different problem: warning: A handler for the OS ABI "FreeBSD ELF" is not built into this configuration of GDB. Attempting to continue with the default arm settings. So, that's why I was looking into pulling in the FreeBSD specific changes for the architecture files (except they are for gdb 6.1.1, so some hacking is needed to get them building for gdb 7.2). > John> It compiles, but I'm getting this when I try to debug a core file: > [...] > > John> warning: "/tmp/core1.core": no core file handler recognizes format, using default > > I think this is probably the root of your problems. I suggest debugging > gdb and stepping through sniff_core_bfd. I don't know this area well > but I think this function should find the core file reader for your > target. Thanks. I'll dig in and report back. "eof_eom_XYZ"