Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: "M.M. Kettenis" <m.m.kettenis@alumnus.utwente.nl>
To: Jon Ringle <jon.ringle@comdial.com>, gdb@sources.redhat.com
Subject: Re: arm core analysis on x86 host
Date: Wed, 30 Mar 2005 15:15:00 -0000	[thread overview]
Message-ID: <7320355463156182@weblx058.utsp.utwente.nl> (raw)
In-Reply-To: <200503300928.36020.jon.ringle@comdial.com>

Jon Ringle <jon.ringle@comdial.com> wrote:

> On Tuesday 29 March 2005 23:51, Daniel Jacobowitz wrote:
> > You should try to see how this works on PPC.  I don't know.
>
> If I had one, I would :( I was just using the ppc code as an example to
> follow.
>
> Where can I find documentation on the core file format?
> Also, do you know where in the kernel source does a core file get generated?

Sorry folks for not replying earlier; last days have been a bit busy.

First off, the code for reading ARM core files lives in
../bfd/elf32-arm.c (from a gdb standpoint).  Looks like everything is
there to properly support arm-*-linux-gnu core files, but it could be
wrong.

Secondly, the OS/ABI for core files don't have to match the executable
exactly, but of course they have to be somewhat compatible. I know
for sure that 32x64-bit cross debugging works on AMD64, and it is
assumed to be working on PowerPC too.  There might be some nasty
side-effects though if you load a core file without the matching
executable.

However, if the OS/ABI's differ, be aware that
regset_from_core_section() will be called for the OS/ABI of the core
file. That regset_from_core_section() will have to do the proper
translation on the register sets for the OS/ABI of the executable.
That OS/ABI can be determined from the regcache that is passed to
regset_from_core_section().

I'd suggest looking at the i386/amd64 *BSD code or NetBSD/sparc64 code
for good examples.

Beware, besides differences in OS/ABI, there might also be differences
in bfd machine type (bfd_mach_xxx).  You'll have to make sure that there is an OS/ABI that is compatible with the bfd machine type of the
core file.  For most architectures this will be the case if the OS/ABI
is registered for the default machine type (0), but I don't know if
that is the case for ARM.

Mark

> Thanks,
> Jon
>
>





  reply	other threads:[~2005-03-30 15:15 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-03-28 23:29 Jon Ringle
2005-03-28 23:56 ` Daniel Jacobowitz
2005-03-29  0:48   ` Jon Ringle
2005-03-29  1:31     ` Daniel Jacobowitz
2005-03-29  4:17   ` Jon Ringle
2005-03-29  4:57     ` Daniel Jacobowitz
2005-03-29 16:19       ` Jon Ringle
2005-03-29 16:33         ` Daniel Jacobowitz
2005-03-29 16:39           ` Jon Ringle
2005-03-29 16:52             ` Daniel Jacobowitz
2005-03-29 17:18               ` Jon Ringle
2005-03-29 19:35                 ` Jon Ringle
2005-03-30  2:07               ` Jon Ringle
2005-03-30  4:51                 ` Daniel Jacobowitz
2005-03-30 14:42                   ` Jon Ringle
2005-03-30 15:15                     ` M.M. Kettenis [this message]
2005-03-30 15:25                       ` Daniel Jacobowitz
2005-03-30 18:02                         ` Mark Kettenis
2005-03-30 18:18                           ` Daniel Jacobowitz
2005-03-31 14:08                           ` Jon Ringle
2005-03-31 14:28                             ` Daniel Jacobowitz
2005-03-31 14:35                               ` Jon Ringle
2005-04-06 22:16                               ` Jon Ringle
2005-04-06 22:27                                 ` Daniel Jacobowitz

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=7320355463156182@weblx058.utsp.utwente.nl \
    --to=m.m.kettenis@alumnus.utwente.nl \
    --cc=gdb@sources.redhat.com \
    --cc=jon.ringle@comdial.com \
    /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