public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* Re: tdep/2109: gdb 6.4 and 6.4.50 can't debug x86_64 binaries on Solaris 2.10
@ 2006-04-29 22:58 Tim Mooney
  0 siblings, 0 replies; 2+ messages in thread
From: Tim Mooney @ 2006-04-29 22:58 UTC (permalink / raw)
  To: nobody; +Cc: gdb-prs

The following reply was made to PR tdep/2109; it has been noted by GNATS.

From: Tim Mooney <Tim.Mooney@ndsu.edu>
To: gdb-gnats@sources.redhat.com
Cc:  
Subject: Re: tdep/2109: gdb 6.4 and 6.4.50 can't debug x86_64 binaries on
 Solaris 2.10
Date: Sat, 29 Apr 2006 17:54:10 -0500 (CDT)

 In regard to: Re: tdep/2109: gdb 6.4 and 6.4.50 can't debug x86_64 binaries...:
 
 >> Category:       tdep
 >> Responsible:    unassigned
 >> Synopsis:       gdb 6.4 and 6.4.50 can't debug x86_64 binaries on Solaris 2.10
 >> Arrival-Date:   Wed Apr 05 02:58:01 GMT 2006
 
 In addition to the problem I originally reported, I've also discovered
 that gdb 6.4 can't debug sparc ELF64 binaries on Solaris 2.8.  It seems
 the problem is more with ELF64 than it is with the architecture or the
 OS version:
 
 05:41 PM bogie gdb-6.4$./gdb/gdb /local/bin/rpmbuild ~/specs/wget/core
 GNU gdb 6.4
 Copyright 2005 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 "sparc-sun-solaris2.8"...
 
 warning: core file may not match specified executable file.
 Core was generated by `rpmbuild -v -ba wget.spec'.
 Program terminated with signal 10, Bus error.
 Error while mapping shared library sections:
 "/local/lib/64/libbeecrypt.so.6": not in executable format: File format
 not recognized.
 Error while mapping shared library sections:
 "/lib/sparcv9/libCstd.so.1": not in executable format: File format not
 recognized.
 Error while mapping shared library sections:
 "/lib/sparcv9/libCrun.so.1": not in executable format: File format not
 recognized.
 Reading symbols from /local/lib/64/librpmbuild-4.4.so...done.
 Loaded symbols for /local/lib/64/librpmbuild-4.4.so
 Reading symbols from /local/lib/64/librpm-4.4.so...done.
 Loaded symbols for /local/lib/64/librpm-4.4.so
 Reading symbols from /local/lib/64/librpmdb-4.4.so...done.
 Loaded symbols for /local/lib/64/librpmdb-4.4.so
 Reading symbols from /local/lib/64/librpmio-4.4.so...done.
 Loaded symbols for /local/lib/64/librpmio-4.4.so
 Reading symbols from /local/lib/64/libpopt.so.0...done.
 Loaded symbols for /local/lib/64/libpopt.so.0
 Reading symbols from /local/lib/64/libsqlite3.so.0...done.
 Loaded symbols for /local/lib/64/libsqlite3.so.0
 Error while reading shared library symbols:
 "/local/lib/64/libbeecrypt.so.6": can't read symbols: File format not recognized.
 Reading symbols from /usr/lib/sparcv9/libz.so.1...done.
 Loaded symbols for /usr/lib/64/libz.so.1
 Reading symbols from /local/lib/64/libexpat.so.1...elfread.c:341: internal-error: sect_index_data not initialized
 A problem internal to GDB has been detected,
 further debugging may prove unreliable.
 Quit this debugging session? (y or n) y
 
 elfread.c:341: internal-error: sect_index_data not initialized
 A problem internal to GDB has been detected,
 further debugging may prove unreliable.
 Create a core file of GDB? (y or n) n
 
 
 
 -- 
 Tim Mooney                              mooney@dogbert.cc.ndsu.NoDak.edu
 Information Technology Services         (701) 231-1076 (Voice)
 Room 242-J6, IACC Building              (701) 231-8541 (Fax)
 North Dakota State University, Fargo, ND 58105-5164


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

* tdep/2109: gdb 6.4 and 6.4.50 can't debug x86_64 binaries on Solaris 2.10
@ 2006-04-05  2:58 Tim.Mooney
  0 siblings, 0 replies; 2+ messages in thread
From: Tim.Mooney @ 2006-04-05  2:58 UTC (permalink / raw)
  To: gdb-gnats


>Number:         2109
>Category:       tdep
>Synopsis:       gdb 6.4 and 6.4.50 can't debug x86_64 binaries on Solaris 2.10
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Apr 05 02:58:01 GMT 2006
>Closed-Date:
>Last-Modified:
>Originator:     Tim.Mooney@ndsu.edu
>Release:        6.4 and 6.4.50 (CVS snapshot)
>Organization:
>Environment:
Sun Solaris 2.10 on a dual AMD Sun W2100z workstation.  config.guess identifies it as i386-pc-solaris2.10.  Built as a 64 bit executable (ELF64) with Sun's (no-cost) Studio 11 development environment.
>Description:
I built gdb 6.4 and 6.4.50 with Sun Studio 11's C compiler (it's no-cost, these days).  I used CFLAGS=

 -Xa -xs -g -xtarget=native -xarch=amd64

build went fine, and produced a 64 bit gdb:

$file gdb
gdb: ELF 64-bit LSB executable AMD64 Version 1 [SSE2 SSE FXSR FPU], dynamically linked, not stripped

gdb can't debug ELF64 executables, though:

$gdb gdb
GNU gdb 6.4.50.20060402
Copyright (C) 2006 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 "i386-pc-solaris2.10"..."/local/gnu/bin/gdb": not in executable format: File format not recognized


I did some reading to see if I needed to do something special (like a "cross-compile", since configure defaulted to host=i386-pc-solaris2.10), but the bfd/config.bfd seems to indicate that any i[3-7]86-*-solaris2* should have bfd_elf64_x86_64_vec support, and "want64=true".  I'm assuming that means that gdb *should* by default support ELF64 executables.

BTW, this exact problem was reported by NAKAJI Hiroyuki in gnu.gdb.bug in December of 2005:

http://groups.google.com/group/gnu.gdb.bug/browse_thread/thread/85fd4d9d3d0a58af/28c3bacfc3a5daf7?lnk=st&q=%22not+in+executable%22+group%3Agnu.gdb.*&rnum=5&hl=en#28c3bacfc3a5daf7

There was no response to Nakaji's report.
>How-To-Repeat:
Install Solaris 10 (downloadable at no cost) on a 64-bit capable AMD box.

Install Sun Studio 11 (downloadable at no cost).

Configure and build gdb 6.4 or gdb-6.4+CVS using Studio 11, as a 64-bit executable.  The resulting gdb cannot debug 64 bit executables.

Note: I'm not saying this problem is specific to gdb when built with Studio 11 (as opposed to gcc) or as a 32 bit executable.  I haven't tried either of those cases, since I'm highly skeptical that they're relevant.  I will try them if you believe they are.
>Fix:

>Release-Note:
>Audit-Trail:
>Unformatted:


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

end of thread, other threads:[~2006-04-29 22:58 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-04-29 22:58 tdep/2109: gdb 6.4 and 6.4.50 can't debug x86_64 binaries on Solaris 2.10 Tim Mooney
  -- strict thread matches above, loose matches on Subject: below --
2006-04-05  2:58 Tim.Mooney

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