From: Paul Pluzhnikov <ppluzhnikov@google.com>
To: Frank Middleton <f.middleton@apogeect.com>
Cc: gdb@sourceware.org
Subject: Re: Experiences building and using gdb 6.8 on Solaris
Date: Mon, 27 Apr 2009 05:25:00 -0000 [thread overview]
Message-ID: <8ac60eac0904261743i452a3ae5qc49b8f483644413a@mail.gmail.com> (raw)
In-Reply-To: <49F4C98B.2000609@apogeect.com>
On Sun, Apr 26, 2009 at 1:52 PM, Frank Middleton
<f.middleton@apogeect.com> wrote:
> Not sure if this is the correct list, but maybe someone here is interested
> in some Solaris issues
>
> This is on snv103 (SunOS 5.11) for SPARC, with make aliased to gmake.
>
> Biggest problem is that make distclean doesn't remove any of the cache
> files, so the make fails miserably if, for example, you change LDFLAGS.
>
> In order to get it to build, it was necessary to get the latest ncurses,
> and to build that --with-shared, and, as usual, remember not to use
> Solaris /bin/sh.
>
> The motivation to build the latest gdb is the following error with
> GNU gdb 6.3.50_2004-11-23-cvs
> ...
> elfread.c:366: internal-error: sect_index_data not initialized
> ...
>
> but, alas, it still fails with GNU gdb 6.8
> ...
> elfread.c:424: internal-error: sect_index_data not initialized
> A problem internal to GDB has been detected,
> further debugging may prove unreliable.
>
> Aside from the optimism of the last line (further debugging appears
> to be impossible), is this a known problem? It is proving to be rather
> difficult to make a simple test case, and extensive Googling found
> little other than that something similar had been fixed a while ago.
>
> Gdb runs simple executables just fine. The problem comes when linking
> and running an executable containing a mix of libraries compiled using
> Sun cc (i.e. the system libraries), some 3rd party libraries, probably
> compiled using a relatively old gcc (3.4.2), and a relatively new
> gcc (4.3.2) locally. Truss shows that the last library to be opened
> was /usr/lib/libXau.so.6. Both versions of gdb emit this warning:
> warning: Lowest section in /usr/lib/libdl.so.1 is .SUNW_syminfo at 00000094
> AFAIK Sun ld was used for linking throughout. The application actually
> run properly if you run it without gdb.
>
> Any insights much appreciated...
First, you should verify that it is indeed libXau.so.6 that is causing
the problem.
Steps:
echo "int main() { return 0; }" > junk.c
cc -g -c junk.c
cc -g junk.o -lX11 # resulting a.out should not produce the error
cc -g junk.o -lXau # resulting a.out should trigger the problem
If libXau is indeed the problem, you've now got a trivial test case.
If not, do this:
gdb -ex 'set verbose on' /path/to/app
This should provide a better clue what GDB was doing when the internal
error fired.
The other thing that may help figuring out the problem is to run gdb
under itself:
gdb -ex 'set prompt (top) ' --args gdb /path/to/app
(top) break internal_error
# Should set breakpoint 1 in the inferior GDB
(top) run
(gdb) run
# Should stop at breakpoint 1
(top) where full
--
Paul Pluzhnikov
next prev parent reply other threads:[~2009-04-27 0:43 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-04-27 0:26 Frank Middleton
2009-04-27 5:25 ` Paul Pluzhnikov [this message]
2009-04-27 18:18 ` Frank Middleton
2009-04-30 0:12 ` Paul Pluzhnikov
2009-04-30 0:35 ` Frank Middleton
2009-04-30 5:44 ` Paul Pluzhnikov
2009-04-30 14:52 ` Frank Middleton
2009-04-30 8:02 ` Hui Zhu
2009-04-30 15:41 ` Frank Middleton
2009-04-30 16:18 ` Paul Pluzhnikov
2009-04-30 16:20 ` Frank Middleton
2009-04-30 16:56 ` Paul Pluzhnikov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=8ac60eac0904261743i452a3ae5qc49b8f483644413a@mail.gmail.com \
--to=ppluzhnikov@google.com \
--cc=f.middleton@apogeect.com \
--cc=gdb@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox