From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ms9.webland.ch (ms9.webland.ch [92.43.217.109]) by sourceware.org (Postfix) with ESMTPS id 9485E385843A for ; Tue, 8 Mar 2022 07:54:07 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 9485E385843A Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=indel.ch Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=ms9.webland.ch Received: from macserver.private ([77.58.17.252]) by ms9.webland.ch (12.3.0 build 2 x64) with ASMTP id 01202203080854059342 for ; Tue, 08 Mar 2022 08:54:05 +0100 Received: from localhost (localhost [127.0.0.1]) by macserver.private (Postfix) with ESMTP id 3471D4ACEF7C; Tue, 8 Mar 2022 08:54:04 +0100 (CET) X-Virus-Scanned: amavisd-new at indel.ch Received: from macserver.private ([127.0.0.1]) by localhost (macserver.private [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 5mUdgkXaVjg7; Tue, 8 Mar 2022 08:54:03 +0100 (CET) Received: from FABI21.indel.ch (unknown [192.168.1.75]) by macserver.private (Postfix) with ESMTP id BD4194ACEF70 for ; Tue, 8 Mar 2022 08:54:03 +0100 (CET) X-Mailer: QUALCOMM Windows Eudora Version 7.1.0.9 Date: Tue, 08 Mar 2022 08:54:04 +0100 To: gdb@sourceware.org From: Fabian Cenedese Subject: Internal error with gcc 4.7 elffile Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Message-Id: <20220308075403.BD4194ACEF70@macserver.private> X-CTCH: RefID="str=0001.0A782F1C.62270B9D.0075,ss=1,re=0.000,recu=0.000,reip=0.000,cl=1,cld=1,fgs=0"; Spam="Unknown"; VOD="Unknown" X-Spam-Status: No, score=0.3 required=5.0 tests=BAYES_50, HEADER_FROM_DIFFERENT_DOMAINS, KAM_DMARC_STATUS, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, SPF_HELO_PASS, SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org 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: , X-List-Received-Date: Tue, 08 Mar 2022 07:54:09 -0000 Hello I'm currently working with a gdb 11.2.90.20220208, used for cross-compiled .elf files for PowerPC and ARM. There are no problems with elf files from gcc 7 or 10 or clang 12. However an elf file from a gcc 4.7 leads to an internal error in gdb. Somehow it can't detect the architecture. It should be PowerPC as readelf is able to confirm. ---------------------------- Reading symbols from inos_testing.elf... ../../gdb/gdbarch.c:3576: internal-error: bool gdbarch_elf_make_msymbol_special_p(gdbarch*): Assertion `gdbarch != NULL' failed. A problem internal to GDB has been detected, further debugging may prove unreliable. Quit this debugging session? ---------------------------- First I wanted to know if this should work at all or is gcc 4.7 too old to be supported by gdb 11? If it should still work, is this a known problem? I couldn't find bugs mentioning gdbarch.c The same elffile works perfectly fine with a gdb 7.6. A workaround seems to be to first start gdb, then set architecture before loading elffile. Thanks bye Fabi