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 846A3384B0C1 for ; Mon, 22 Jun 2020 18:17:48 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 846A3384B0C1 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.11] (173-246-6-90.qc.cable.ebox.net [173.246.6.90]) (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 130EC1ED00; Mon, 22 Jun 2020 14:17:48 -0400 (EDT) Subject: Re: GDB reading eh_frame/eh_frame_hdr from disk To: Jan Kratochvil , Mitch Souders Cc: gdb@sourceware.org References: <20200622181453.GA3471048@host1.jankratochvil.net> From: Simon Marchi Message-ID: <05424d4d-eb4d-6214-6467-8ccf239a8731@simark.ca> Date: Mon, 22 Jun 2020 14:17:47 -0400 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.9.0 MIME-Version: 1.0 In-Reply-To: <20200622181453.GA3471048@host1.jankratochvil.net> Content-Type: text/plain; charset=utf-8 Content-Language: fr Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-4.3 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@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: Mon, 22 Jun 2020 18:17:49 -0000 On 2020-06-22 2:14 p.m., Jan Kratochvil via Gdb wrote: > On Fri, 19 Jun 2020 00:37:42 +0200, Mitch Souders wrote: >> Is there any way to tell gdb to use the in-memory representation from the >> inferior of the .eh_frame/.eh_frame_hdr sections when doing stack >> unwinding? As best I can determine, gdb always reaches out to disk to find >> .eh_frame/.eh_frame_hdr to do stack unwinding. Our product is doing some >> runtime manipulation of these sections and gdb's current behavior is >> undesired. > > I am not aware GDB (nor LLDB) could do that. elfutils stack (eu-stack) can do > that. One can test it by deleting the file on disk (such as during update of > a running daemon) and backtrace it. Ah, I guess it's because these sections are read by dwarf/read.c from the BFD directly, these reads don't pass through target_ops? Simon