From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by sourceware.org (Postfix) with ESMTPS id 6CDEB3858C20 for ; Tue, 16 Aug 2022 09:33:12 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 6CDEB3858C20 Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-83-dalnGsybNRW6c9dZgUaA_Q-1; Tue, 16 Aug 2022 05:33:08 -0400 X-MC-Unique: dalnGsybNRW6c9dZgUaA_Q-1 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 7EBD180231E; Tue, 16 Aug 2022 09:33:08 +0000 (UTC) Received: from [10.33.36.178] (unknown [10.33.36.178]) by smtp.corp.redhat.com (Postfix) with ESMTP id 0918918ECC; Tue, 16 Aug 2022 09:33:07 +0000 (UTC) Message-ID: <2271bb26-4534-44ce-b7e4-551343ffa871@redhat.com> Date: Tue, 16 Aug 2022 10:33:07 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.11.0 To: hilbert , Luis Machado Cc: gdb@sourceware.org References: <700833f8.5150.182a59bc271.Coremail.swdtian@163.com> <217b746f-65e8-66c0-1678-376eb8cb1aca@arm.com> <5c30085e.8da0.182a5f3377d.Coremail.swdtian@163.com> From: Andrew Dinn Subject: Re: How does GDB get the function call stack In-Reply-To: <5c30085e.8da0.182a5f3377d.Coremail.swdtian@163.com> X-Scanned-By: MIMEDefang 2.79 on 10.11.54.5 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Language: en-GB Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-3.4 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, NICE_REPLY_A, RCVD_IN_DNSWL_LOW, SPF_HELO_NONE, SPF_NONE, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) 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: Tue, 16 Aug 2022 09:33:14 -0000 On 16/08/2022 10:19, hilbert via Gdb wrote: > @Luis Machado > Thank you very much . > What does the sentence “functions without debug information”mean? Does it refer to the call stack information from the rpb register? > If there is no debug information, the call stack can be obtained. Why does gdb still need DWARF2 unwind information? When it says without debug information I believe that means without DWARF info. This info is located either in .debug_xxx sections embedded in the binary or, alternatively, supplied in a separate dwinfo/dwz file that is tied to the binary (e.g. by search path and file name or by a build id). DWARF .debug_frame info can specify a lot more than how to do a stack unwind. So, while the other methods enable this specific operation they do not enable many other useful actions that gdb might need to establish frame context and which DWARF info may enable. For full details see the DWARF standard(s). regards, Andrew Dinn ----------- Red Hat Distinguished Engineer Red Hat UK Ltd Registered in England and Wales under Company Registration No. 03798903 Directors: Michael Cunningham, Michael ("Mike") O'Neill