Mirror of the gdb mailing list
 help / color / mirror / Atom feed
* GDB can't read core
@ 2003-11-26 21:27 Stephen A. Witt
  2003-11-26 22:22 ` Paul Koning
  0 siblings, 1 reply; 6+ messages in thread
From: Stephen A. Witt @ 2003-11-26 21:27 UTC (permalink / raw)
  To: gdb

I'm working on an IXP425-based system (actually right now the IXDP-425
board from Intel) and have built a cross-toolchain using Dan Kegel's
crosstool script. I've added a "cross" gdb (gdb-6.0) built to execute on
an i386 but with the target set to arm-unknown-linux-gnu. I'm trying to
get this gdb to look at a core file generated on my target board whan an
app segfaulted. I transferred the core file back to my development machine
and run gdb and tried to get it to read the core file. The following is
the error I get:

$ arm-unknown-linux-gnu-gdb -c ./core
GNU gdb 6.0
Copyright 2003 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you
are
welcome to change it and/or distribute copies of it under certain
conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for
details.
This GDB was configured as "--host=i686-pc-linux-gnu
--target=arm-unknown-linux-gnu".
GDB can't read core files on this machine.
(gdb)


I've searched around and found some references to this problem, but never
did see a definitive answer (at least that I could understand). So, should
it be possible to debug core files in this way? Any tips on how to
proceed?

Thanks...


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

* Re: GDB can't read core
  2003-11-26 21:27 GDB can't read core Stephen A. Witt
@ 2003-11-26 22:22 ` Paul Koning
  2003-11-26 22:29   ` Daniel Jacobowitz
  0 siblings, 1 reply; 6+ messages in thread
From: Paul Koning @ 2003-11-26 22:22 UTC (permalink / raw)
  To: sawitt; +Cc: gdb

Last I looked at this (in 5.3) there was a general presumption in gdb
that it would never support core dump reading in any cross-gdb.

I beat on it for a while to get rid of that assumption; it was not
totally trivial but not all that hard, either.  But it was a bit of a
hack job, so I'm not prepared to submit the resulting changes as gdb
patches. 

Is this considered the Right Way for it to behave?  Or is this a
deficiency that's awaiting fixing in some grand overhaul?

	   paul


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

* Re: GDB can't read core
  2003-11-26 22:22 ` Paul Koning
@ 2003-11-26 22:29   ` Daniel Jacobowitz
  2003-11-26 22:34     ` Paul Koning
  0 siblings, 1 reply; 6+ messages in thread
From: Daniel Jacobowitz @ 2003-11-26 22:29 UTC (permalink / raw)
  To: Paul Koning; +Cc: sawitt, gdb

On Wed, Nov 26, 2003 at 05:22:43PM -0500, Paul Koning wrote:
> Last I looked at this (in 5.3) there was a general presumption in gdb
> that it would never support core dump reading in any cross-gdb.
> 
> I beat on it for a while to get rid of that assumption; it was not
> totally trivial but not all that hard, either.  But it was a bit of a
> hack job, so I'm not prepared to submit the resulting changes as gdb
> patches. 
> 
> Is this considered the Right Way for it to behave?  Or is this a
> deficiency that's awaiting fixing in some grand overhaul?

It's been fixed for almost every GNU/Linux target already, as people
find time.

I don't remember the status of ARM.  I may have posted it or not.

-- 
Daniel Jacobowitz
MontaVista Software                         Debian GNU/Linux Developer


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

* Re: GDB can't read core
  2003-11-26 22:29   ` Daniel Jacobowitz
@ 2003-11-26 22:34     ` Paul Koning
  2003-11-26 22:37       ` Daniel Jacobowitz
  0 siblings, 1 reply; 6+ messages in thread
From: Paul Koning @ 2003-11-26 22:34 UTC (permalink / raw)
  To: drow; +Cc: sawitt, gdb

>>>>> "Daniel" == Daniel Jacobowitz <drow@mvista.com> writes:

 Daniel> On Wed, Nov 26, 2003 at 05:22:43PM -0500, Paul Koning wrote:
 >> Last I looked at this (in 5.3) there was a general presumption in
 >> gdb that it would never support core dump reading in any
 >> cross-gdb.
 >> 
 >> I beat on it for a while to get rid of that assumption; it was not
 >> totally trivial but not all that hard, either.  But it was a bit
 >> of a hack job, so I'm not prepared to submit the resulting changes
 >> as gdb patches.
 >> 
 >> Is this considered the Right Way for it to behave?  Or is this a
 >> deficiency that's awaiting fixing in some grand overhaul?

 Daniel> It's been fixed for almost every GNU/Linux target already, as
 Daniel> people find time.

Ah... In my case, the problem appeared with NetBSD/MIPS.

      paul


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

* Re: GDB can't read core
  2003-11-26 22:34     ` Paul Koning
@ 2003-11-26 22:37       ` Daniel Jacobowitz
  2003-12-01 16:05         ` Andrew Cagney
  0 siblings, 1 reply; 6+ messages in thread
From: Daniel Jacobowitz @ 2003-11-26 22:37 UTC (permalink / raw)
  To: Paul Koning; +Cc: sawitt, gdb

On Wed, Nov 26, 2003 at 05:34:25PM -0500, Paul Koning wrote:
> >>>>> "Daniel" == Daniel Jacobowitz <drow@mvista.com> writes:
> 
>  Daniel> On Wed, Nov 26, 2003 at 05:22:43PM -0500, Paul Koning wrote:
>  >> Last I looked at this (in 5.3) there was a general presumption in
>  >> gdb that it would never support core dump reading in any
>  >> cross-gdb.
>  >> 
>  >> I beat on it for a while to get rid of that assumption; it was not
>  >> totally trivial but not all that hard, either.  But it was a bit
>  >> of a hack job, so I'm not prepared to submit the resulting changes
>  >> as gdb patches.
>  >> 
>  >> Is this considered the Right Way for it to behave?  Or is this a
>  >> deficiency that's awaiting fixing in some grand overhaul?
> 
>  Daniel> It's been fixed for almost every GNU/Linux target already, as
>  Daniel> people find time.
> 
> Ah... In my case, the problem appeared with NetBSD/MIPS.

Then I recommend investigating mips-linux-tdep.c and
bfd/elf32-mips.c:elf32_mips_grok_psinfo, and it should be the work of
an hour or so to do it more cleanly in current sources.

-- 
Daniel Jacobowitz
MontaVista Software                         Debian GNU/Linux Developer


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

* Re: GDB can't read core
  2003-11-26 22:37       ` Daniel Jacobowitz
@ 2003-12-01 16:05         ` Andrew Cagney
  0 siblings, 0 replies; 6+ messages in thread
From: Andrew Cagney @ 2003-12-01 16:05 UTC (permalink / raw)
  To: Daniel Jacobowitz; +Cc: Paul Koning, sawitt, gdb


>> Ah... In my case, the problem appeared with NetBSD/MIPS.
> 
> 
> Then I recommend investigating mips-linux-tdep.c and
> bfd/elf32-mips.c:elf32_mips_grok_psinfo, and it should be the work of
> an hour or so to do it more cleanly in current sources.

Look at markk's recent "regset" additions.  i386, for instance, uses it.

Andrew



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

end of thread, other threads:[~2003-12-01 16:05 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-11-26 21:27 GDB can't read core Stephen A. Witt
2003-11-26 22:22 ` Paul Koning
2003-11-26 22:29   ` Daniel Jacobowitz
2003-11-26 22:34     ` Paul Koning
2003-11-26 22:37       ` Daniel Jacobowitz
2003-12-01 16:05         ` Andrew Cagney

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox