From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id E36WBzmvm2ENfQAAWB0awg (envelope-from ) for ; Mon, 22 Nov 2021 09:54:49 -0500 Received: by simark.ca (Postfix, from userid 112) id 1558F1F0CE; Mon, 22 Nov 2021 09:54:49 -0500 (EST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RDNS_DYNAMIC,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from sourceware.org (ip-8-43-85-97.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id A02FD1E940 for ; Mon, 22 Nov 2021 09:54:48 -0500 (EST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 0DDF03857C4B for ; Mon, 22 Nov 2021 14:54:48 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 0DDF03857C4B DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1637592888; bh=8YdbgJHiNQaq9dw5F+Kz4Te2NzVINhX47F6YMG0/izs=; h=Date:To:References:Subject:In-Reply-To:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=k/kiPuRtvxmQqPkIQ7II0ztKsQcPNJp7kYnDn1j8LbiBtztbmugT0c3bGWDTyOcB/ StLlgdnaOxun/4PJ7CQFMS6QzmMvTCIm8iW6B8lCQXl4vPHUbzvEyyUUpINPWA/Pbn zIArIi80EhP5Gcvc7Ey/JttExY+jSTfebBHJ30Gg= Received: from eggs.gnu.org (eggs.gnu.org [209.51.188.92]) by sourceware.org (Postfix) with ESMTPS id A721D3858D35 for ; Mon, 22 Nov 2021 14:54:22 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org A721D3858D35 Received: from [2001:470:142:3::e] (port=35768 helo=fencepost.gnu.org) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mpAi6-0006kL-0k for gdb@sourceware.org; Mon, 22 Nov 2021 09:54:22 -0500 Received: from ip5f5a8896.dynamic.kabel-deutschland.de ([95.90.136.150]:56744 helo=[192.168.111.41]) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mpAi5-0007T3-Tb for gdb@sourceware.org; Mon, 22 Nov 2021 09:54:22 -0500 Message-ID: Date: Mon, 22 Nov 2021 15:54:18 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.3.1 To: gdb@sourceware.org References: <60c53fa8bf160533a2eddf1da280eb50c7461a6a.camel@fit.cvut.cz> Content-Language: en-US Subject: Is there a way to get a function's end address other than `disassemble`? In-Reply-To: <60c53fa8bf160533a2eddf1da280eb50c7461a6a.camel@fit.cvut.cz> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit 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: , From: Simon Sobisch via Gdb Reply-To: Simon Sobisch Errors-To: gdb-bounces+public-inbox=simark.ca@sourceware.org Sender: "Gdb" `info address func_name` will show the *start address* of the given function, but is there any built-in way to get the *end address* other than executing the `disassemble` command? The use case here is "if the size of the current function is too big, don't use `disassemble` but limit to N instructions around $pc"; using a fixed calculation like disassemble $pc - 50, $pc + 150 may get "over" the last instruction of the function... Simon