Mirror of the gdb mailing list
 help / color / mirror / Atom feed
* mips64 elf64 problems
@ 2001-11-25 12:29 Paul Mundt
  2001-11-25 12:41 ` Daniel Jacobowitz
  2001-11-30 11:30 ` Paul Mundt
  0 siblings, 2 replies; 3+ messages in thread
From: Paul Mundt @ 2001-11-25 12:29 UTC (permalink / raw)
  To: gdb

[-- Attachment #1: Type: text/plain, Size: 1917 bytes --]

I was in the process of testing out kgdb with a mips64 target (using gdb 5.1),
and ran into a rather peculiar problem. I have two images.. the vmlinux.64 is
the one that is being booted on the target:

vmlinux:    ELF 32-bit MSB executable, mips-4 MIPS R3000_BE, version 1,
statically linked, not stripped
vmlinux.64: ELF 64-bit MSB executable, mips-4 MIPS R3000_BE, version 1,
statically linked, not stripped

Upon trying to load these with gdb, the elf32 works just fine.. whereas the
elf64 complains about not being able to read ECOFF debugging information:

lethal@freya:~$ mips64-linux-gdb vmlinux
GNU gdb 5.1
Copyright 2001 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=mips64-linux"...
(gdb)

lethal@freya:~$ mips64-linux-gdb vmlinux.64
GNU gdb 5.1
Copyright 2001 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=mips64-linux"...Error reading ECOFF debugging information: File
truncated

(gdb)

The kernels were both compiled with CONFIG_REMOTE_DEBUG turned on, so they
were both compiled with -g.

I've tried this with a --target of mips64-linux as well as mips64-linux-elf,
and the same thing happens both times.

Anyone have any insight on this?

Regards,

-- 
Paul Mundt <pmundt@mvista.com>
MontaVista Software, Inc.


[-- Attachment #2: Type: application/pgp-signature, Size: 240 bytes --]

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

* Re: mips64 elf64 problems
  2001-11-25 12:29 mips64 elf64 problems Paul Mundt
@ 2001-11-25 12:41 ` Daniel Jacobowitz
  2001-11-30 11:30 ` Paul Mundt
  1 sibling, 0 replies; 3+ messages in thread
From: Daniel Jacobowitz @ 2001-11-25 12:41 UTC (permalink / raw)
  To: Paul Mundt; +Cc: gdb

On Fri, Nov 30, 2001 at 11:31:08AM -0800, Paul Mundt wrote:
> I was in the process of testing out kgdb with a mips64 target (using gdb 5.1),
> and ran into a rather peculiar problem. I have two images.. the vmlinux.64 is
> the one that is being booted on the target:
> 
> vmlinux:    ELF 32-bit MSB executable, mips-4 MIPS R3000_BE, version 1,
> statically linked, not stripped
> vmlinux.64: ELF 64-bit MSB executable, mips-4 MIPS R3000_BE, version 1,
> statically linked, not stripped
> 
> Upon trying to load these with gdb, the elf32 works just fine.. whereas the
> elf64 complains about not being able to read ECOFF debugging information:
> 
> lethal@freya:~$ mips64-linux-gdb vmlinux
> GNU gdb 5.1
> Copyright 2001 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=mips64-linux"...
> (gdb)
> 
> lethal@freya:~$ mips64-linux-gdb vmlinux.64
> GNU gdb 5.1
> Copyright 2001 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=mips64-linux"...Error reading ECOFF debugging information: File
> truncated
> 
> (gdb)
> 
> The kernels were both compiled with CONFIG_REMOTE_DEBUG turned on, so they
> were both compiled with -g.
> 
> I've tried this with a --target of mips64-linux as well as mips64-linux-elf,
> and the same thing happens both times.
> 
> Anyone have any insight on this?

What binutils version are you using to assemble (i.e. do you have
ECOFF/mdebug information at all)?

You're probably trying to use stabs (or mdebug) on a 64-bit binary.  I
know stabs will whine; I don't know if I've ever tried mdebug.  You
might want to use -gdwarf-2 instead, except of course Dwarf-2 is broken
on MIPS this month.

You might want to breakpoint in _bfd_mips_elf_read_ecoff_info in
elf64-mips.c.  I see that there's only a 32-bit version of this, so if
any data structures change on 64-bit you'll lose.

-- 
Daniel Jacobowitz                           Carnegie Mellon University
MontaVista Software                         Debian GNU/Linux Developer


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

* mips64 elf64 problems
  2001-11-25 12:29 mips64 elf64 problems Paul Mundt
  2001-11-25 12:41 ` Daniel Jacobowitz
@ 2001-11-30 11:30 ` Paul Mundt
  1 sibling, 0 replies; 3+ messages in thread
From: Paul Mundt @ 2001-11-30 11:30 UTC (permalink / raw)
  To: gdb

I was in the process of testing out kgdb with a mips64 target (using gdb 5.1),
and ran into a rather peculiar problem. I have two images.. the vmlinux.64 is
the one that is being booted on the target:

vmlinux:    ELF 32-bit MSB executable, mips-4 MIPS R3000_BE, version 1,
statically linked, not stripped
vmlinux.64: ELF 64-bit MSB executable, mips-4 MIPS R3000_BE, version 1,
statically linked, not stripped

Upon trying to load these with gdb, the elf32 works just fine.. whereas the
elf64 complains about not being able to read ECOFF debugging information:

lethal@freya:~$ mips64-linux-gdb vmlinux
GNU gdb 5.1
Copyright 2001 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=mips64-linux"...
(gdb)

lethal@freya:~$ mips64-linux-gdb vmlinux.64
GNU gdb 5.1
Copyright 2001 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=mips64-linux"...Error reading ECOFF debugging information: File
truncated

(gdb)

The kernels were both compiled with CONFIG_REMOTE_DEBUG turned on, so they
were both compiled with -g.

I've tried this with a --target of mips64-linux as well as mips64-linux-elf,
and the same thing happens both times.

Anyone have any insight on this?

Regards,

-- 
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.5 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iEYEARECAAYFAjwH3nwACgkQYLvqhoOEA4EMOACgk3HNhFHKMkCSwfni/p+SbtdY
bO0AnR8bikc/Rce2fJHzk/gUxld9n5nd
=Ayty
-----END PGP SIGNATURE-----
From drow@mvista.com Fri Nov 30 12:45:00 2001
From: Daniel Jacobowitz <drow@mvista.com>
To: Paul Mundt <pmundt@mvista.com>
Cc: gdb@sourceware.cygnus.com
Subject: Re: mips64 elf64 problems
Date: Fri, 30 Nov 2001 12:45:00 -0000
Message-id: <20011130154459.A27914@nevyn.them.org>
References: <20011130113108.A7288@mvista.com>
X-SW-Source: 2001-11/msg00354.html
Content-length: 2607

On Fri, Nov 30, 2001 at 11:31:08AM -0800, Paul Mundt wrote:
> I was in the process of testing out kgdb with a mips64 target (using gdb 5.1),
> and ran into a rather peculiar problem. I have two images.. the vmlinux.64 is
> the one that is being booted on the target:
> 
> vmlinux:    ELF 32-bit MSB executable, mips-4 MIPS R3000_BE, version 1,
> statically linked, not stripped
> vmlinux.64: ELF 64-bit MSB executable, mips-4 MIPS R3000_BE, version 1,
> statically linked, not stripped
> 
> Upon trying to load these with gdb, the elf32 works just fine.. whereas the
> elf64 complains about not being able to read ECOFF debugging information:
> 
> lethal@freya:~$ mips64-linux-gdb vmlinux
> GNU gdb 5.1
> Copyright 2001 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=mips64-linux"...
> (gdb)
> 
> lethal@freya:~$ mips64-linux-gdb vmlinux.64
> GNU gdb 5.1
> Copyright 2001 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=mips64-linux"...Error reading ECOFF debugging information: File
> truncated
> 
> (gdb)
> 
> The kernels were both compiled with CONFIG_REMOTE_DEBUG turned on, so they
> were both compiled with -g.
> 
> I've tried this with a --target of mips64-linux as well as mips64-linux-elf,
> and the same thing happens both times.
> 
> Anyone have any insight on this?

What binutils version are you using to assemble (i.e. do you have
ECOFF/mdebug information at all)?

You're probably trying to use stabs (or mdebug) on a 64-bit binary.  I
know stabs will whine; I don't know if I've ever tried mdebug.  You
might want to use -gdwarf-2 instead, except of course Dwarf-2 is broken
on MIPS this month.

You might want to breakpoint in _bfd_mips_elf_read_ecoff_info in
elf64-mips.c.  I see that there's only a 32-bit version of this, so if
any data structures change on 64-bit you'll lose.

-- 
Daniel Jacobowitz                           Carnegie Mellon University
MontaVista Software                         Debian GNU/Linux Developer


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

end of thread, other threads:[~2001-11-30 20:45 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-11-25 12:29 mips64 elf64 problems Paul Mundt
2001-11-25 12:41 ` Daniel Jacobowitz
2001-11-30 11:30 ` Paul Mundt

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