Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: "John Hein" <jhein-gdbml@snkmail.com>
To: gdb@sourceware.org
To: <gdb@sourceware.org>, Tom Tromey <tromey@redhat.com>
Subject: Re: cross gdb for arm-freebsd
Date: Tue, 01 Nov 2011 19:57:00 -0000	[thread overview]
Message-ID: <21693-1320177450-475470@sneakemail.com> (raw)
In-Reply-To: <m3hb2n1w9f.fsf@fleche.redhat.com>

Tom Tromey wrote at 13:24 -0600 on Nov  1, 2011:
 > >>>>> "John" == John Hein <jhein-gdbml@snkmail.com> 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"


  reply	other threads:[~2011-11-01 19:57 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-10-31 17:16 John Hein
2011-11-01 19:24 ` Tom Tromey
2011-11-01 19:57   ` John Hein [this message]
2011-11-01 20:23     ` Tom Tromey

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=21693-1320177450-475470@sneakemail.com \
    --to=jhein-gdbml@snkmail.com \
    --cc=gdb@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox