From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 72769 invoked by alias); 25 Jan 2016 14:22:33 -0000 Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org Received: (qmail 72743 invoked by uid 89); 25 Jan 2016 14:22:32 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD,SPF_HELO_PASS autolearn=ham version=3.3.2 spammy=build-id, buildid, ped, DEBUG X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Mon, 25 Jan 2016 14:22:31 +0000 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by mx1.redhat.com (Postfix) with ESMTPS id 63002461C8; Mon, 25 Jan 2016 14:22:30 +0000 (UTC) Received: from host1.jankratochvil.net (ovpn-116-93.ams2.redhat.com [10.36.116.93]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u0PEMQGQ004189 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Mon, 25 Jan 2016 09:22:29 -0500 Date: Mon, 25 Jan 2016 14:22:00 -0000 From: Jan Kratochvil To: Bogdan Harjoc Cc: gdb@sourceware.org Subject: Re: Adding a missing NT_FILES note to a core file so gdb can load solibs for it Message-ID: <20160125142226.GA5665@host1.jankratochvil.net> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.24 (2015-08-30) X-IsSubscribed: yes X-SW-Source: 2016-01/txt/msg00051.txt.bz2 On Mon, 25 Jan 2016 15:06:05 +0100, Bogdan Harjoc wrote: > So I'd like to ask whether this has any chance of working. No. GDB does not support NT_FILE reading. GDB follows DT_DEBUG: readelf -d execbinary|grep -w DEBUG Besides that it would not be completely correct, depending on the point of view. mmap()ped shared library will be present in NT_FILE but GDB will not shows it as it was not dlopen()ed (either by a call or via DT_NEEDED). When GDB cannot read shared libraries it usually means your executable does not exactly match the one that was core dumped. To make them matching one should match build-id from the core file with that of the executable: eu-unstrip -n --core=corefile readelf -n execbinary|grep -A1 NT_GNU_BUILD_ID IIRC ld-linux.so also needs to match, I cannot remember why now. Jan