public inbox for gdb@sourceware.org
 help / color / mirror / Atom feed
* core file not loaded
@ 2004-10-06 11:50 Fabian Cenedese
  2004-10-06 14:06 ` Daniel Jacobowitz
  0 siblings, 1 reply; 8+ messages in thread
From: Fabian Cenedese @ 2004-10-06 11:50 UTC (permalink / raw)
  To: gdb

Hi

gdb-6.1.1 on cygwin, target=PPC

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?

Thanks

bye  Fabi


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: core file not loaded
  2004-10-06 11:50 core file not loaded Fabian Cenedese
@ 2004-10-06 14:06 ` Daniel Jacobowitz
  2004-10-06 16:22   ` Fabian Cenedese
  0 siblings, 1 reply; 8+ messages in thread
From: Daniel Jacobowitz @ 2004-10-06 14:06 UTC (permalink / raw)
  To: Fabian Cenedese; +Cc: gdb

On Wed, Oct 06, 2004 at 01:32:03PM +0200, Fabian Cenedese wrote:
> Hi
> 
> gdb-6.1.1 on cygwin, target=PPC

More specific - what target triplet?

> 
> 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.

-- 
Daniel Jacobowitz

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: core file not loaded
  2004-10-06 14:06 ` Daniel Jacobowitz
@ 2004-10-06 16:22   ` Fabian Cenedese
  2004-10-06 17:12     ` Daniel Jacobowitz
  0 siblings, 1 reply; 8+ messages in thread
From: Fabian Cenedese @ 2004-10-06 16:22 UTC (permalink / raw)
  To: gdb


>> 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?

Thanks

bye  Fabi


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: core file not loaded
  2004-10-06 16:22   ` Fabian Cenedese
@ 2004-10-06 17:12     ` Daniel Jacobowitz
  2004-10-06 17:45       ` Paul Koning
  0 siblings, 1 reply; 8+ messages in thread
From: Daniel Jacobowitz @ 2004-10-06 17:12 UTC (permalink / raw)
  To: Fabian Cenedese; +Cc: gdb

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

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: core file not loaded
  2004-10-06 17:45       ` Paul Koning
@ 2004-10-06 17:45         ` Kris Warkentin
  2004-10-06 17:55         ` Daniel Jacobowitz
  1 sibling, 0 replies; 8+ messages in thread
From: Kris Warkentin @ 2004-10-06 17:45 UTC (permalink / raw)
  To: Paul Koning; +Cc: drow, Cenedese, gdb

Paul Koning wrote:

>The other issue (at least when last I looked) is that gdb is only
>willing to handle corefiles for native builds, not for crossbuilds.
>
>If your target state is more than just a single executing program,
>you're really dealing with a kernel corefile, which is a whole
>different class of beast.  
>  
>

Not true.  The QNX gdb can read Neutrino core files from any of our 
targets (ARM, SH, PPC, Mips and i386) on any of our hosts. (Solaris, 
Windows, Linux i386 and native Neutrino i386).

cheers,

Kris

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: core file not loaded
  2004-10-06 17:12     ` Daniel Jacobowitz
@ 2004-10-06 17:45       ` Paul Koning
  2004-10-06 17:45         ` Kris Warkentin
  2004-10-06 17:55         ` Daniel Jacobowitz
  0 siblings, 2 replies; 8+ messages in thread
From: Paul Koning @ 2004-10-06 17:45 UTC (permalink / raw)
  To: drow; +Cc: Cenedese, gdb

>>>>> "Daniel" == Daniel Jacobowitz <drow@false.org> writes:

 Daniel> On Wed, Oct 06, 2004 at 04:16:08PM +0200, Fabian Cenedese
 Daniel> wrote:
 >> >> gdb-6.1.1 on cygwin, target=PPC
 >> >
 >> >More specific - what target triplet?
 >> 
 >> Sorry, --host=i686-pc-cygwin --target=powerpc-eabi
 >> ...
 >> 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?

 Daniel> That's not a core file.  You can probably convert it to a
 Daniel> core file, but you'd also have to teach the BFD and GDB
 Daniel> powerpc-eabi support to recognize it as a powerpc-eabi core
 Daniel> file.

 Daniel> A core file is one of several "standard" formats, generated
 Daniel> by various operating systems - lately, a particular kind of
 Daniel> ELF object.  Easiest might be to convert your binary dump to
 Daniel> an ELF core file and copy support from powerpc-linux.

 Daniel> Note that a memory dump isn't enough; for instance, you've
 Daniel> lost all register values.

The other issue (at least when last I looked) is that gdb is only
willing to handle corefiles for native builds, not for crossbuilds.

If your target state is more than just a single executing program,
you're really dealing with a kernel corefile, which is a whole
different class of beast.  

	  paul

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: core file not loaded
  2004-10-06 17:45       ` Paul Koning
  2004-10-06 17:45         ` Kris Warkentin
@ 2004-10-06 17:55         ` Daniel Jacobowitz
  1 sibling, 0 replies; 8+ messages in thread
From: Daniel Jacobowitz @ 2004-10-06 17:55 UTC (permalink / raw)
  To: Paul Koning; +Cc: Cenedese, gdb

On Wed, Oct 06, 2004 at 01:41:52PM -0400, Paul Koning wrote:
> The other issue (at least when last I looked) is that gdb is only
> willing to handle corefiles for native builds, not for crossbuilds.

This has been mostly fixed.

-- 
Daniel Jacobowitz

^ permalink raw reply	[flat|nested] 8+ messages in thread

* RE: core file not loaded
@ 2004-10-06 17:41 Xinan Tang
  0 siblings, 0 replies; 8+ messages in thread
From: Xinan Tang @ 2004-10-06 17:41 UTC (permalink / raw)
  To: Daniel Jacobowitz; +Cc: gdb

Hi

  Has anyone implemented "gcore' command in the remote stub without any
OS support?  If I want to support the core file in the remote stub,
where can I find the spec. on the core file (elf) format?

Thanks

--Xinan
  

-----Original Message-----

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

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2004-10-06 17:55 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-10-06 11:50 core file not loaded Fabian Cenedese
2004-10-06 14:06 ` Daniel Jacobowitz
2004-10-06 16:22   ` Fabian Cenedese
2004-10-06 17:12     ` Daniel Jacobowitz
2004-10-06 17:45       ` Paul Koning
2004-10-06 17:45         ` Kris Warkentin
2004-10-06 17:55         ` Daniel Jacobowitz
2004-10-06 17:41 Xinan Tang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).