From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: 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 From: Simon Sobisch 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-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, SPF_HELO_PASS, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) 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 Nov 2021 14:54:24 -0000 `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