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 62A6F385781D for ; Mon, 22 Nov 2021 15:17:28 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 62A6F385781D Received: from [2001:470:142:3::e] (port=37070 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 1mpB4R-0002qF-S7; Mon, 22 Nov 2021 10:17:27 -0500 Received: from ip5f5a8896.dynamic.kabel-deutschland.de ([95.90.136.150]:56891 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 1mpB4R-0001PZ-NB; Mon, 22 Nov 2021 10:17:27 -0500 Message-ID: <119947dd-d3cc-3e1d-7f6c-2747d40f3f2d@gnu.org> Date: Mon, 22 Nov 2021 16:17:24 +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 Subject: Re: Is there a way to get a function's end address other than `disassemble`? Content-Language: en-US To: Andreas Schwab , Simon Sobisch via Gdb References: <60c53fa8bf160533a2eddf1da280eb50c7461a6a.camel@fit.cvut.cz> <87fsrop6io.fsf@igel.home> From: Simon Sobisch In-Reply-To: <87fsrop6io.fsf@igel.home> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.2 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, 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.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 15:17:29 -0000 Am 22.11.2021 um 16:14 schrieb Andreas Schwab: > On Nov 22 2021, Simon Sobisch via Gdb wrote: > >> `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 end address of a function isn't well defined. Part of the code > could be split off into a separate section, for example. > > Even the start address isn't well defined. The entry address does not > have to point to the lowest address of the function's code. > > Andreas. > That's an interesting point. Does this mean that `disassemble` may not show the complete function, too? If it does - how to get the correct function ranges(!) as `disassemble` does? Simon