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 4FD163858D39 for ; Wed, 8 Feb 2023 21:50:56 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 4FD163858D39 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=simark.ca Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=simark.ca Received: from [10.0.0.11] (unknown [217.28.27.60]) (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 D8E981E110; Wed, 8 Feb 2023 16:50:55 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=simark.ca; s=mail; t=1675893056; bh=YNSTapk0NtezOsSvw6gwFv4ui9MIWc0CcevV1SJlz78=; h=Date:Subject:To:References:From:In-Reply-To:From; b=RY5EmTFx5PEpdHDvFD1kOAYLMBRHQBxlebmuwH/jeXu+oBxr79IBCAQjhPRTKhVdM wRrOmaZ4AnNzY5O77lSe7r78ip/1PzxaJ3BmSee5pxpLEdKHsx78fuwBgXAkIMy7ww bbmhu5zJXqU2Z4/G3tnpcNAdrq9NZrSmmNDpJEo8= Message-ID: <807c2500-1ed2-b886-b1ea-093a0971dfba@simark.ca> Date: Wed, 8 Feb 2023 16:50:55 -0500 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.7.1 Subject: Re: How frame command with address works Content-Language: en-US To: Roger Phillips , "gdb@sourceware.org" References: From: Simon Marchi In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-5.4 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,SPF_HELO_PASS,SPF_PASS,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: On 2/8/23 05:01, Roger Phillips via Gdb wrote: > Greetings, > > I have to analyze a coredump on an Aarch64 system. The callstack is > broken so I only see the bottom frame. However, if I manually unwind > the stack via $x29 register then I see what looks like intact stack > frames. Now I try to use the frame / frame address command with the > addresses from the $x29 registers which should point to the bases of > the stackframes (the location where the address of the next frame is). > However it always tells me "No frame at address ...". > > What does frame address need to correctly parse a frame? I think you want to use the "frame view" or "select-frame view" command, which lets you specify arbitrary SP and PC addresses. GDB makes a frame_info object out of those and shows it to you. It used to be that "frame
" would do that, but it was error-prone, as explained here, so was chanted to "frame view" and "select-frame view": https://gitlab.com/gnutools/binutils-gdb/-/commit/f67ffa6a785bee26bc23550670f85c6db578641f I know a bit about that feature because it was in the way of some change I wanted to do recently (frame_info_ptr, if someone wants to search the git log). I think the intent of the feature is exactly your scenario. However, I'm under the impression that it's a bit broken right now. When selecting an arbitrary frame with "select-frame view", you can't do up/down to see callers of that frame, and "backtrace" shows you the "real" stack. I've been told that these commands used to work with user-created frames though, probably a long time ago. But since that feature wasn't tested at all, I guess it got broken. Simon