From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 120087 invoked by alias); 15 Jul 2017 21:30:40 -0000 Mailing-List: contact elfutils-devel-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Post: List-Help: List-Subscribe: Sender: elfutils-devel-owner@sourceware.org Received: (qmail 101437 invoked by uid 89); 15 Jul 2017 21:30:23 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Checked: by ClamAV 0.99.2 on sourceware.org X-Virus-Found: No X-Spam-SWARE-Status: No, score=-0.9 required=5.0 tests=BAYES_00,KAM_LAZY_DOMAIN_SECURITY autolearn=no version=3.3.2 spammy=H*M:stream, Hx-languages-length:1072 X-Spam-Status: No, score=-0.9 required=5.0 tests=BAYES_00,KAM_LAZY_DOMAIN_SECURITY autolearn=no version=3.3.2 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on sourceware.org X-Spam-Level: X-HELO: gnu.wildebeest.org Received: from wildebeest.demon.nl (HELO gnu.wildebeest.org) (212.238.236.112) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Sat, 15 Jul 2017 21:30:22 +0000 Received: from stream.wildebeest.org (deer0x13.wildebeest.org [172.31.17.149]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by gnu.wildebeest.org (Postfix) with ESMTPSA id 68C70302729F; Sat, 15 Jul 2017 23:30:07 +0200 (CEST) Received: by stream.wildebeest.org (Postfix, from userid 1000) id C600810532D; Sat, 15 Jul 2017 23:30:20 +0200 (CEST) Date: Sat, 15 Jul 2017 21:30:00 -0000 From: Mark Wielaard To: Sasha Da Rocha Pinheiro Cc: "elfutils-devel@sourceware.org" Subject: Re: Dwarf_FDE (libdw) Message-ID: <20170715213020.GA2445@stream> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.8.3 (2017-05-23) X-IsSubscribed: yes X-SW-Source: 2017-q3/txt/msg00012.txt.bz2 On Sat, Jul 15, 2017 at 01:00:04AM +0000, Sasha Da Rocha Pinheiro wrote: > I did not understand how to get the augmentation_data of a FDE. > Could anyone explain me? Dwarf_FDE is really low level. It might be easier to use a Dwarf_CFI to get a Dwarf_Frame to extract the information. You get a Dwarf_CFI_Entry from dwarf_next_cfi. This is a union. Use dwarf_cfi_cie_p (entry) to see if it is an CIE, if so you can access the augmentation data from the Dwarf_CIE cie. If not it is an FDE and you can only access to Dwarf_FDE fde values. The Dwarf_Off CIE_pointer can be used with dwarf_next_cfi () as offset to find the corresponding > Also, is the start and end of Dwarf_FDE to be used as > [initial_location, initial_location+address_range)?? No, it is the FDE instructions (encoded). How they are encoded is given by the CIE augmentation data, so you would have to decode that first. That is why you really should use Dwarf_CFI and Dwarf_Frame functions. Those use this low level data structures to decode all the information. Cheers, Mark