From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 42582 invoked by alias); 17 Jul 2017 04:13:04 -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 42064 invoked by uid 89); 17 Jul 2017 04:13:03 -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=-2.4 required=5.0 tests=AWL,BAYES_00,RP_MATCHES_RCVD,SPF_PASS autolearn=ham version=3.3.2 spammy= X-Spam-Status: No, score=-2.4 required=5.0 tests=AWL,BAYES_00,RP_MATCHES_RCVD,SPF_PASS autolearn=ham version=3.3.2 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on sourceware.org X-Spam-Level: X-HELO: smtpauth4.wiscmail.wisc.edu Received: from wmauth4.doit.wisc.edu (HELO smtpauth4.wiscmail.wisc.edu) (144.92.197.145) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 17 Jul 2017 04:13:02 +0000 MIME-version: 1.0 Content-type: text/plain; charset=iso-8859-1 Received: from avs-daemon.smtpauth4.wiscmail.wisc.edu by smtpauth4.wiscmail.wisc.edu (Oracle Communications Messaging Server 8.0.1.1.0 64bit (built Jun 15 2016)) id <0OT700A00V53GG00@smtpauth4.wiscmail.wisc.edu> for elfutils-devel@sourceware.org; Sun, 16 Jul 2017 23:13:00 -0500 (CDT) X-Spam-Report: AuthenticatedSender=yes, SenderIP=216.32.181.21 X-Spam-PmxInfo: Server=avs-4, Version=6.3.3.2656215, Antispam-Engine: 2.7.2.2107409, Antispam-Data: 2017.7.17.40317, AntiVirus-Engine: 5.38.0, AntiVirus-Data: 2017.6.22.5380000, SenderIP=216.32.181.21 Received: from NAM03-CO1-obe.outbound.protection.outlook.com (mail-co1nam03lp0021.outbound.protection.outlook.com [216.32.181.21]) by smtpauth4.wiscmail.wisc.edu (Oracle Communications Messaging Server 8.0.1.1.0 64bit (built Jun 15 2016)) with ESMTPS id <0OT700LC2VPNQH10@smtpauth4.wiscmail.wisc.edu>; Sun, 16 Jul 2017 23:12:59 -0500 (CDT) Received: from CY1PR0601MB1691.namprd06.prod.outlook.com (10.163.232.29) by CY1PR0601MB1692.namprd06.prod.outlook.com (10.163.232.30) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1261.13; Mon, 17 Jul 2017 04:12:57 +0000 Received: from CY1PR0601MB1691.namprd06.prod.outlook.com ([10.163.232.29]) by CY1PR0601MB1691.namprd06.prod.outlook.com ([10.163.232.29]) with mapi id 15.01.1261.022; Mon, 17 Jul 2017 04:12:57 +0000 From: Sasha Da Rocha Pinheiro To: Mark Wielaard Cc: "elfutils-devel@sourceware.org" Subject: Re: Dwarf_FDE (libdw) Thread-topic: Dwarf_FDE (libdw) Thread-index: AQHS/QVpzQDxCHY/kUq1gBXo+u7+5aJVaRMAgAICk3A= Date: Mon, 17 Jul 2017 04:13:00 -0000 Message-id: References: <20170715213020.GA2445@stream> In-reply-to: <20170715213020.GA2445@stream> Accept-Language: en-US, pt-BR Content-language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: X-Originating-IP: [24.177.125.192] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1;CY1PR0601MB1692;7:beiY95ofpUKe37mwXET+Ny5K0WKFFBF8blephR83VbiXICxq50b1WaOQFFng8Nc8iBhP9YKoP4+dQMInoDRQHbM7KplsCv9bhuFokMxjodVqmXAETfY12XV2D5Jg/Dz2zCXingctm8LLlnC4fatBAIfgUDg/0yPOyhQP5d6zykiEX1D22KjKd+/QBhGDTuinvoWK8SiLOi/dnRkm5oSyPLphyAgX889huOcWDJR0cH6/3PdXO0r7I9zHbSUgoUC3gSFzJsF57cNj8iMhgw0ky0dr+j81eyHzvyylvv+O/83FlSx0fE8GXWuo/ifmfyoYTNhqq0LhGKx7QJz4VnwmlD8jIzeqBkPa1MT6UUStUmi9sOfRA6oyUdXgdZrUQ1umidd4Bm8O+F7z7Vke5OmtRYomm6EcgS+TXaZc/9+TGqe1wtSqeMQeOixPY0mMp5WztHhuaYbLWGP/eKdwb7vMNjccStlEmaeztbTA8vg9PDHVQRSoSWNCDVM8kwTlrGHpddMuWjb6R6+OLOGoHQjFm9Tnx2Ypj/0IAVYxq0B1fpfC/YaXaghb++L57eltL4YSSoX+XXEksLpwIMxRTLfC+bhGd6WwT6jkRR2iY6TV6cD8j+W0s3VDhdtOfNAGZajKxqLx8TNoIgq9x1OCdYvUDxo7Y1rFyE6pSVIWM2Oa7+FXlodIxx52lNE0m/vQyueQMz6A7HNa1wjChSoZ9BL5QzOW+sRcMYlYQlgabL7ffoW8Pw+/y9CsLLrlNxGAwpMuPDlzsAvb3SqtoQ9izO22AWZUMDrgrzkkB8X9qxZNvzs= x-ms-office365-filtering-correlation-id: b0d46eff-558f-4e9e-71f1-08d4ccca1b14 x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:(300000500095)(300135000095)(300000501095)(300135300095)(22001)(300000502095)(300135100095)(2017030254075)(300000503095)(300135400095)(48565401081)(2017052603031)(201703131423075)(201703031133081)(201702281549075)(300000504095)(300135200095)(300000505095)(300135600095)(300000506095)(300135500095);SRVR:CY1PR0601MB1692; x-ms-traffictypediagnostic: CY1PR0601MB1692: x-exchange-antispam-report-test: UriScan:(236129657087228); x-microsoft-antispam-prvs: x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(601004)(2401047)(2017060910075)(5005006)(8121501046)(3002001)(10201501046)(93006095)(93001095)(100000703101)(100105400095)(6055026)(6041248)(201703131423075)(201702281529075)(201702281528075)(201703061421075)(201703061406153)(20161123560025)(20161123555025)(20161123558100)(20161123562025)(20161123564025)(6072148)(100000704101)(100105200095)(100000705101)(100105500095);SRVR:CY1PR0601MB1692;BCL:0;PCL:0;RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095);SRVR:CY1PR0601MB1692; x-forefront-prvs: 0371762FE7 x-forefront-antispam-report: SFV:NSPM;SFS:(10009020)(6009001)(39450400003)(39850400002)(39410400002)(39400400002)(39840400002)(39860400002)(377454003)(24454002)(74316002)(77096006)(305945005)(33656002)(66066001)(2900100001)(2906002)(8676002)(81166006)(5660300001)(14454004)(3660700001)(75432002)(88552002)(6436002)(8936002)(7736002)(3280700002)(6916009)(6116002)(2950100002)(102836003)(3846002)(229853002)(38730400002)(55016002)(6246003)(7696004)(53546010)(99286003)(110136004)(86362001)(53936002)(50986999)(76176999)(9686003)(6506006)(478600001)(54356999)(189998001)(4326008)(25786009);DIR:OUT;SFP:1101;SCL:1;SRVR:CY1PR0601MB1692;H:CY1PR0601MB1691.namprd06.prod.outlook.com;FPR:;SPF:None;MLV:sfv;LANG:en; spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-transfer-encoding: quoted-printable X-OriginatorOrg: wisc.edu X-MS-Exchange-CrossTenant-originalarrivaltime: 17 Jul 2017 04:12:57.3004 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 2ca68321-0eda-4908-88b2-424a8cb4b0f9 X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY1PR0601MB1692 X-SW-Source: 2017-q3/txt/msg00014.txt.bz2 [Resending cause it seems it didn't go] So how do you get the augmentation data out of a Dwarf_Frame? Or how do you= "simulate" the two next functions as libdwarf do? dwarf_get_cie_augmentation_data dwarf_get_fde_augmentation_data From: Mark Wielaard Sent: Saturday, July 15, 2017 4:30 PM To: Sasha Da Rocha Pinheiro Cc: elfutils-devel@sourceware.org Subject: Re: Dwarf_FDE (libdw) =A0=20=20=20 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 =20=20=20=20