From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 411B0306B05 for ; Thu, 5 Mar 2026 20:38:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772743121; cv=none; b=ADSENQmrzSk92a2gpWLECblaV3Zxn3Rb63wBvAsLCczLEmNE55PIJZAUZrh3pnjbCNQF67GhIXa77HHyDQ7fu3mdxjM7rOJds4CFS6/gLZOIWi0zJyoKhP8So0vYkIDV+52gst/rsojx6gPmyzCGWgozFDJrTndkLBLa3W9FVwI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772743121; c=relaxed/simple; bh=OyhqkIWXk13B2dUFWUee7YpH6HaFzM1rp5lNbrEWkHk=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=VruGzhMMlZ/Tgg9m657OicRU9V1T8etjO71NScqApLzM0bCc9Q5ATb2VQyRV+yKMc6CuBrOQZmbJagp8RiClEx3cZt6rnUQY2UKpenqlhVG/oGGSzT+7PBYG/6IY3Um2mTama5KW0pzHVMCzeCDcsDAK/43Scadn6YVL1G8x9FU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=YSOgPcHJ; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="YSOgPcHJ" Received: by smtp.kernel.org (Postfix) with ESMTPSA id A8A89C116C6; Thu, 5 Mar 2026 20:38:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1772743120; bh=OyhqkIWXk13B2dUFWUee7YpH6HaFzM1rp5lNbrEWkHk=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=YSOgPcHJ6IBGuPKSxSbSByh+wMbkksm177sFMdUfXw8qoUMFzWo2S+Iw+knuuvdMe oriOZHwnhYnt8TIspC0/9r6SZab1cuKRw9dpOoA3A8TSxaZ2jJ4DNNMPy+dvyHGT/x Wcwo+vF8lwpM+AXkBFamMalwEqraeu4ABArcJBvZ0yMPg9urq3PgYeQalEw88yGDet z/1koggmNe6GQA5m+U9xa2XO1mOilExBkpfZI8jkgauvMweOJFTPS4qk+WbOVqRTv7 xHlMcJ0aX8XrRALClpETOxNS49KPABlA66qgFz7c/LXwQ/A1nrCe9XzeRl/ZUZnPFw OLfPCCn5cfdMw== Date: Thu, 5 Mar 2026 15:38:39 -0500 From: Sasha Levin To: Masami Hiramatsu Cc: Matthieu Baerts , Andrew Morton , Carlos Llamas , Luca Ceresoli , linux-kernel@vger.kernel.org Subject: Re: [PATCH] decode_stacktrace: Support heuristic caller address search Message-ID: References: <177268753893.3271988.11559821020066428486.stgit@mhiramat.tok.corp.google.com> <20260306013241.4b0c7502d8db152f27f434b1@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline In-Reply-To: <20260306013241.4b0c7502d8db152f27f434b1@kernel.org> On Fri, Mar 06, 2026 at 01:32:41AM +0900, Masami Hiramatsu wrote: >On Thu, 5 Mar 2026 10:51:47 -0500 >Sasha Levin wrote: >> DWARF line tables map address *ranges* to source lines, so any address >> within the CALL instruction resolves to the correct source line. >> return_addr-1 is guaranteed to land inside the CALL instruction (it's >> the last byte of it), so a single addr2line call is sufficient. > >Ah, got it, OK. I also confirmed "addr-1" works. But if there is no lineinfo >entry for the call instruction, shouldn't we check more instructions before >the call? There's no such thing as "no lineinfo entry for the call instruction" - DWARF line tables are range-based, not discrete points. Each row covers all addresses up to the next row, so every address within a function resolves to some source line. addr-1 lands inside the CALL instruction and will always resolve to same line as the CALL itself. We show "??:0" because the address we passed falls outside of any DWARF compilation unit altogether. -- Thanks, Sasha