From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26085 invoked by alias); 30 Mar 2005 15:15:05 -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 25970 invoked from network); 30 Mar 2005 15:14:51 -0000 Received: from unknown (HELO netlx014.civ.utwente.nl) (130.89.1.88) by sourceware.org with SMTP; 30 Mar 2005 15:14:51 -0000 Received: from weblx058.utsp.utwente.nl (weblx058.utsp.utwente.nl [130.89.1.228]) by netlx014.civ.utwente.nl (8.11.7/HKD) with SMTP id j2UFAVt31490; Wed, 30 Mar 2005 17:10:31 +0200 From: "M.M. Kettenis" Subject: Re: arm core analysis on x86 host MIME-Version: 1.0 Message-Id: <7320355463156182@weblx058.utsp.utwente.nl> Date: Wed, 30 Mar 2005 15:15:00 -0000 To: Jon Ringle , gdb@sources.redhat.com In-reply-to: <200503300928.36020.jon.ringle@comdial.com> Content-Description: Message body Content-Type: text/plain; charset="US-ASCII"; format=flowed Content-Transfer-Encoding: Quoted-Printable X-UTwente-MailScanner-Information: Scanned by MailScanner. Contact helpdesk@ITBE.utwente.nl for more information. X-UTwente-MailScanner: Found to be clean X-MailScanner-From: m.m.kettenis@alumnus.utwente.nl X-SW-Source: 2005-03/txt/msg00301.txt.bz2 Jon Ringle 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 generat= ed? 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 > >