From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17968 invoked by alias); 6 Oct 2004 17:12:33 -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 17840 invoked from network); 6 Oct 2004 17:12:30 -0000 Received: from unknown (HELO nevyn.them.org) (66.93.172.17) by sourceware.org with SMTP; 6 Oct 2004 17:12:30 -0000 Received: from drow by nevyn.them.org with local (Exim 4.34 #1 (Debian)) id 1CFFKw-00028E-Uo; Wed, 06 Oct 2004 13:12:23 -0400 Date: Wed, 06 Oct 2004 17:12:00 -0000 From: Daniel Jacobowitz To: Fabian Cenedese Cc: gdb@sources.redhat.com Subject: Re: core file not loaded Message-ID: <20041006171222.GA7809@nevyn.them.org> Mail-Followup-To: Fabian Cenedese , gdb@sources.redhat.com References: <5.2.0.9.1.20041006132207.01d43578@NT_SERVER> <5.2.0.9.1.20041006132207.01d43578@NT_SERVER> <5.2.0.9.1.20041006160537.01bce208@NT_SERVER> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <5.2.0.9.1.20041006160537.01bce208@NT_SERVER> User-Agent: Mutt/1.5.5.1+cvs20040105i X-SW-Source: 2004-10/txt/msg00146.txt.bz2 On Wed, Oct 06, 2004 at 04:16:08PM +0200, Fabian Cenedese wrote: > > >> gdb-6.1.1 on cygwin, target=PPC > > > >More specific - what target triplet? > > Sorry, --host=i686-pc-cygwin --target=powerpc-eabi > > >> I tried to read a core dump file of our embedded target, but gdb gives > >> me an error: > >> > >> (gdb) core N:/Temp/SAMCLASS/MemDmp00.bin > >> GDB can't read core files on this machine. > >> (gdb) core > >> GDB can't read core files on this machine. > >> > >> I looked for the error message in the sources and found this: > >> > >> /* Find a single core_stratum target in the list of targets and return it. > >> If for some reason there is more than one, return NULL. */ > >> > >> But I couldn't see what's wrong. What is needed to work with a core file? > > > >The target needs to tell GDB how to load core files. This is a highly > >OS-specific operation. > > My understanding was, that I could take a memory snapshot of the > target (in this case about 4MB) and feed this to gdb so gdb will use > this file for read accesses instead of reading a physical target (in > addition to the symbolfile). Is this wrong? Or is this not a core file? That's not a core file. You can probably convert it to a core file, but you'd also have to teach the BFD and GDB powerpc-eabi support to recognize it as a powerpc-eabi core file. A core file is one of several "standard" formats, generated by various operating systems - lately, a particular kind of ELF object. Easiest might be to convert your binary dump to an ELF core file and copy support from powerpc-linux. Note that a memory dump isn't enough; for instance, you've lost all register values. -- Daniel Jacobowitz