From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca (simark.ca [158.69.221.121]) by sourceware.org (Postfix) with ESMTPS id 43524385BF81 for ; Sun, 17 May 2020 14:01:30 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 43524385BF81 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=simark.ca Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=simark@simark.ca Received: from [10.0.0.193] (unknown [192.222.164.54]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by simark.ca (Postfix) with ESMTPSA id 7A3751E5F9; Sun, 17 May 2020 10:01:29 -0400 (EDT) Subject: Re: [PATCH] [PR 25678] gdb crashes with "internal-error: sect_index_text not initialized" when .text To: Andreas Schwab Cc: mlimber , gdb-patches@sourceware.org References: <072e4b2b-4d71-b343-c8ef-0edbc6ab6804@simark.ca> <59eeb6ee-1ab2-e5aa-000a-2fb6d522b8d0@simark.ca> <87367zt57j.fsf@linux-m68k.org> From: Simon Marchi Message-ID: <5241b0d8-494a-2222-95cb-eeb8d7beed9d@simark.ca> Date: Sun, 17 May 2020 10:01:28 -0400 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.7.0 MIME-Version: 1.0 In-Reply-To: <87367zt57j.fsf@linux-m68k.org> Content-Type: text/plain; charset=utf-8 Content-Language: tl Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, KAM_DMARC_STATUS, SPF_HELO_PASS, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 17 May 2020 14:01:33 -0000 On 2020-05-17 3:01 a.m., Andreas Schwab wrote: > On Mai 16 2020, Simon Marchi wrote: > >> All the versions of libicudata.so I found in Ubuntu/Debian do have a .text >> section. > > This is a debian local patch. By default, libicudata is linked with > -nodefaultlibs -nostdlib, and the only included object file has no .text > section. > > Andreas. Thanks Andreas for the tip, I didn't think of checking the distro patches. I was able to reproduce with this: $ cat allo.c int salut; $ gcc allo.c -fPIC -o allo.o -g3 -O0 -c $ gcc allo.o -shared -nostdlib -nodefaultlibs -o allo.so $ ./gdb -q -nx a.out Reading symbols from a.out... (gdb) start Temporary breakpoint 1 at 0x1136: file test.c, line 1. Starting program: /home/smarchi/build/binutils-gdb/gdb/a.out /home/smarchi/src/binutils-gdb/gdb/objfiles.h:524: internal-error: sect_index_text not initialized A problem internal to GDB has been detected, further debugging may prove unreliable. Quit this debugging session? (y or n) Simon