From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id CEx6O0PpIGTHmxoAWB0awg (envelope-from ) for ; Sun, 26 Mar 2023 20:54:27 -0400 Received: by simark.ca (Postfix, from userid 112) id E60AF1E4A3; Sun, 26 Mar 2023 20:54:27 -0400 (EDT) Authentication-Results: simark.ca; dkim=pass (1024-bit key; secure) header.d=sourceware.org header.i=@sourceware.org header.a=rsa-sha256 header.s=default header.b=jb3lXC2u; dkim-atps=neutral X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-7.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_REPLYTO_END_DIGIT,MAILING_LIST_MULTI, NICE_REPLY_A,RCVD_IN_DNSWL_HI,RDNS_DYNAMIC,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 Received: from sourceware.org (ip-8-43-85-97.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id 629141E0D3 for ; Sun, 26 Mar 2023 20:54:27 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 5695F383489C for ; Mon, 27 Mar 2023 00:54:26 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 5695F383489C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1679878466; bh=BjHGz8oDok8Id4DHDHWqH53hC3h2aT1jIeOfVdGt0ZM=; h=Date:Subject:To:Cc:References:In-Reply-To:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From:Reply-To:From; b=jb3lXC2uDnHC8v9aHbFzYObHsVk0mT6a5HMdrFC30HzQGjXDP82kLubMK6HfHnFwY AyFZQTn9FYiwvXBGkajbya8Zt0uPEWKWjuFuynRiwvL8fqUEvbLPt5pAcju14W7lVf hjzSDQG7FGcrF69VbZmejEF6Pjq6V3gu1uYfrhSA= Received: from mail-yb1-xb31.google.com (mail-yb1-xb31.google.com [IPv6:2607:f8b0:4864:20::b31]) by sourceware.org (Postfix) with ESMTPS id BA791383017F for ; Mon, 27 Mar 2023 00:53:58 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org BA791383017F Received: by mail-yb1-xb31.google.com with SMTP id i7so8546261ybt.0 for ; Sun, 26 Mar 2023 17:53:58 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1679878438; h=content-transfer-encoding:in-reply-to:content-language:references :cc:to:subject:from:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=BjHGz8oDok8Id4DHDHWqH53hC3h2aT1jIeOfVdGt0ZM=; b=Tvf3BcJkrRcGJuiz2IsmR7n4qhTZhPwRYOFcr/C6kzm7bAc4tWD/yRK5ADvgbMgrQH VfEdwiDpDI33kBvsn8k0/SvgqDZGJyC8m7o6726GA+UnIyqarX3yNJW62yYw2S1KuRvX 0jZXN58qJjghauDf0VkE0Mqnv2Sa2dwaRHBX2r+vkqmwwzb+copzeTo2C27r6qhRG+hd pCxVYDlYgQrv+L//SqF3LlJATc8zwj9k+qBJ4ucfbIcakO4NxjLiD/rwSIkuqvhrurAl 1vTrGw+bko2ULlH08GwhBJKVVnWZG8Xwu99ytjGUyg8kKIs4fjTw9UKKp9r9nUHuC61c Lr7g== X-Gm-Message-State: AAQBX9ejravobkbUCwcHskCXPEE4VZUvKY1UIlSLKN4yc5uscFEfOx9Z EOudy2vc4vaoQDq5rRdRxV/FutUx+BI= X-Google-Smtp-Source: AKy350bUaO9UHXPacotlQkM6YfK4xn9bwmtO4xx/RXyv5PQcN0BfdndsbD683ARYfnnNARzi5kw+UA== X-Received: by 2002:a25:bc3:0:b0:b67:1d4c:1233 with SMTP id 186-20020a250bc3000000b00b671d4c1233mr9369944ybl.24.1679878437913; Sun, 26 Mar 2023 17:53:57 -0700 (PDT) Received: from [10.0.1.25] (198.27.14-65.ip.mltn.standardbroadband.ca. [198.27.14.65]) by smtp.gmail.com with ESMTPSA id r144-20020a257696000000b00b7a23b337eesm771565ybc.27.2023.03.26.17.53.57 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 26 Mar 2023 17:53:57 -0700 (PDT) Message-ID: Date: Sun, 26 Mar 2023 20:53:55 -0400 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:91.0) Gecko/20100101 Thunderbird/91.10.0 Subject: Re: Running gdb-14.0.50 To: Rainer Orth Cc: gdb@sourceware.org References: <2c0596bd-205b-ac8e-9df8-d9eee39c2421@gmail.com> Content-Language: en-CA In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-BeenThere: gdb@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Nemo Nusquam via Gdb Reply-To: Nemo Nusquam Errors-To: gdb-bounces+public-inbox=simark.ca@sourceware.org Sender: "Gdb" On 2023-03-23 09:05, Rainer Orth wrote: > Nemo Nusquam via Gdb 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. Okay -- I removed this line. >> 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'. Please read the section on the GDB Wiki: Building GDB Natively (https://sourceware.org/gdb/wiki/BuildingNatively), where these flags are specified. I moved -m64 to CC/CXX. >> 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. Okay -- I removed this line. >> 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. I removed this option and configure built a Makefile that invoked sparcv9-sun-solaris11-ar, so I put it back in. >> AS=/usr/bin/as \ > Again: not used in the gdb build (and not the best way for gcc, > either). Omit. Okay -- I removed this line. >> --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. Okay -- I added --build=sparcv9-sun-solaris2.11. > >> --enable-64-bit-bfd \ >> --enable-tui \ >> --with-curses \ > I never had a need for any of those. If you do, please explain. These are leftovers from a very old script.  They were removed. >> --disable-bootstrap \ > Again: gcc only; omit. Okay -- I removed the option. >> 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 > Here is my final configuration script: CFLAGS='-g3 -O0' \ CXXFLAGS='-g3 -O0' \ CC="/home/build/gcc/64/bin/gcc -m64" \ CXX="/home/build/gcc/64/bin/g++ -m64" \ ../gdb-14.0.50.20230322/configure \ --with-gmp-prefix=/usr/local \ --with-mpfr-prefix=/usr/local \ --build=sparcv9-sun-solaris2.11 \ --disable-binutils \ --disable-gold \ --disable-gprof \ --disable-gas \ --disable-intl \ --disable-ld \ --disable-sim And here is the configuration reported by the resulting binary. This GDB was configured as follows:    configure --host=sparcv9-sun-solaris2.11 --target=sparcv9-sun-solaris2.11              --with-auto-load-dir=$debugdir:$datadir/auto-load              --with-auto-load-safe-path=$debugdir:$datadir/auto-load              --with-expat              --with-gdb-datadir=/usr/local/share/gdb (relocatable)              --with-jit-reader-dir=/usr/local/lib/gdb (relocatable)              --without-libunwind-ia64              --with-lzma              --without-babeltrace              --without-intel-pt              --without-xxhash              --without-python              --without-python-libdir              --without-debuginfod              --with-curses              --without-guile              --without-amd-dbgapi              --disable-source-highlight              --enable-threading              --enable-tui              --with-separate-debug-dir=/usr/local/lib/debug (relocatable) ("Relocatable" means the directory can be moved with the GDB installation tree, and GDB will still find it.) Thank you. Sincerely, N.