public inbox for gdb@sourceware.org
 help / color / mirror / Atom feed
From: Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
To: Nemo Nusquam via Gdb <gdb@sourceware.org>
Cc: Nemo Nusquam <cym224@gmail.com>
Subject: Re: Running gdb-14.0.50
Date: Thu, 23 Mar 2023 14:05:10 +0100	[thread overview]
Message-ID: <ydd8rfny5x5.fsf@CeBiTec.Uni-Bielefeld.DE> (raw)
In-Reply-To: <2c0596bd-205b-ac8e-9df8-d9eee39c2421@gmail.com> (Nemo Nusquam via Gdb's message of "Wed, 22 Mar 2023 18:56:58 -0400")

Nemo Nusquam via Gdb <gdb@sourceware.org> writes:

> I downloaded gdb-14.0.50.20230322 and built it with the following
> configuration script.
>
> ABI=64 \

No need for this unless you're using in-tree gmp/mpfr.

> CFLAGS='-m64 -g3 -O0' \
> CXXFLAGS='-m64 -g3 -O0' \

I've asked this before: why do you need a gdb with full debug info?  If
running into problems, start with a bare-minimum configuration,
i.e. omit CFLAGS/CXXFLAGS completely.  If your gcc doesn't create 64-bit
binaries by default, better use CC='gcc -m64' CXX='g++ -m64'.

> SHELL=/usr/bin/bash \

If you really need another shell during the build (although the Solaris
11.3 /bin/sh, which is ksh93, should be good enough), specify
CONFIG_SHELL instead.

> AR=/usr/bin/gar \

No need for this: the build should be fine with either Solaris ar or GNU
ar.  If it's not, please file a bug report.

> AS=/usr/bin/as \

Again: not used in the gdb build (and not the best way for gcc,
either).  Omit.

> --host=sparcv9-sun-solaris11 \
> --build=sparcv9-sun-solaris11 \

Here's your problem: this is a triple gdb knows nothing about, thus the
error when starting.  The real thing is called sparcv9-sun-solaris2.11
(i.e. 2.11 instead of 11) and it's admittedly quite unfortunate that
config.guess doesn't get this right on its own.  Just specify
--build=sparcv9-sun-solaris2.11; the other two (host and target) are set
implicitly from that.

> --enable-64-bit-bfd \
> --enable-tui \
> --with-curses \

I never had a need for any of those.  If you do, please explain.

> --disable-bootstrap \

Again: gcc only; omit.

> Despite specifying both host and build as sparcv9, when I invoke against a
> simple C binary, the following happens.
>
> ../../gdb-14.0.50.20230322/gdb/arch-utils.c:753: internal-error:
> initialize_current_architecture: Selection of initial architecture failed
> A problem internal to GDB has been detected,
>
> Is there any other option that will specify a build for sparcv9 alone.  No
> other architecture will be debugged on this machine (T2000 running Solaris
> 11.3).

Use the correct triple (and omit anything not strictly necessary) and
you should be fine.

	Rainer

-- 
-----------------------------------------------------------------------------
Rainer Orth, Center for Biotechnology, Bielefeld University

  reply	other threads:[~2023-03-23 13:05 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-22 22:56 Nemo Nusquam
2023-03-23 13:05 ` Rainer Orth [this message]
2023-03-27  0:53   ` Nemo Nusquam
2023-03-27 14:00     ` Rainer Orth

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=ydd8rfny5x5.fsf@CeBiTec.Uni-Bielefeld.DE \
    --to=ro@cebitec.uni-bielefeld.de \
    --cc=cym224@gmail.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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).