From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5341 invoked by alias); 13 Jul 2017 17:33: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 2866 invoked by uid 89); 13 Jul 2017 17:33:39 -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=-6.0 required=5.0 tests=AWL,BAYES_00,GIT_PATCH_1,RP_MATCHES_RCVD,SPF_PASS autolearn=ham version=3.3.2 spammy=HContent-type:iso-8859-1, U*mark, HContent-transfer-encoding:sk:quoted-, H*f:sk:1499937 X-Spam-Status: No, score=-6.0 required=5.0 tests=AWL,BAYES_00,GIT_PATCH_1,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; Thu, 13 Jul 2017 17:33:37 +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 <0OT100L00HPDZE00@smtpauth4.wiscmail.wisc.edu> for elfutils-devel@sourceware.org; Thu, 13 Jul 2017 12:33:35 -0500 (CDT) X-Spam-Report: AuthenticatedSender=yes, SenderIP=207.46.163.23 X-Spam-PmxInfo: Server=avs-4, Version=6.3.3.2656215, Antispam-Engine: 2.7.2.2107409, Antispam-Data: 2017.7.13.172716, AntiVirus-Engine: 5.38.0, AntiVirus-Data: 2017.6.22.5380000, SenderIP=207.46.163.23 Received: from NAM03-DM3-obe.outbound.protection.outlook.com (mail-dm3nam03lp0023.outbound.protection.outlook.com [207.46.163.23]) by smtpauth4.wiscmail.wisc.edu (Oracle Communications Messaging Server 8.0.1.1.0 64bit (built Jun 15 2016)) with ESMTPS id <0OT100F1NI3YZ2D0@smtpauth4.wiscmail.wisc.edu>; Thu, 13 Jul 2017 12:33:34 -0500 (CDT) Received: from DM2PR06MB272.namprd06.prod.outlook.com (10.141.100.154) by DM2PR06MB272.namprd06.prod.outlook.com (10.141.100.154) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1240.13; Thu, 13 Jul 2017 17:33:33 +0000 Received: from DM2PR06MB272.namprd06.prod.outlook.com ([fe80::297f:6a7e:3019:1c34]) by DM2PR06MB272.namprd06.prod.outlook.com ([fe80::297f:6a7e:3019:1c34%27]) with mapi id 15.01.1240.020; Thu, 13 Jul 2017 17:33:33 +0000 From: Sasha Da Rocha Pinheiro To: Mark Wielaard Cc: "elfutils-devel@sourceware.org" Subject: Re: File index given line (libdw) Thread-topic: File index given line (libdw) Thread-index: AQHS+25iE5CfcOrVI0yo3Q9kgzQif6JReRGAgACItec= Date: Thu, 13 Jul 2017 17:33:00 -0000 Message-id: References: <1499937069.14595.215.camel@klomp.org> In-reply-to: <1499937069.14595.215.camel@klomp.org> Accept-Language: en-US, pt-BR Content-language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: X-Originating-IP: [128.105.14.107] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1;DM2PR06MB272;7:LMiKW0BhtZQwQWnUcFEqM8s6Nam18xKpP0B6IMPPswOGEmRGNiJUvih1jNsZM9jN0EHODFF+mYBVZjGIp4qflEiRwM0SJWOxfrEcr0jIVuOpbi5dmtRsVN1anvsHvsfX5lnf85a7pJEourLZJBokESE2/tFnJowDRr2ikkwRgtT+qTc/S3xlwvFrP3ULlNJdtzCRe9ex6/TNXIqCFZj/q7LbS0p17Olkn/Tp6c44TiJ3gpavEsCk97Adb9j9rzsR+5G0vGO+DJjF9tBmg89i2gKHueJO4Xk325imLfRVKZS+oqI/4C5HdrRHe+BE3DyoZjzcJ8NIFJI5dqmZYVwIc3/p7KJuh2ZpQjp9/J0EH5ciJ9jLZcUJRHGwoKb+kp0zFtG0Z0sebMNNcTq7/StSQeILKxCKG9iTwsOs6ZnQfKozvK6lVJh0vRO8JV5Vhgg08ejK/npd7C5epYg4K+f1Sw6ORP8zhoVMnFULnM8wDvMlrUGEzps2kIEf2tXfhyU2bGXk/tgpywmVcPpvwT+RT0ZmQctlZIMzQ+S3unyshJPPqrkhR0QJKGsPm338dqAjar4xqLBp/rgmhuAqpM0+ZxgB96rsJbUqWxPtKGvewFLmW73qkthPf03PnySentzC0oBPNI6+2xW+m9zAs0ZXS+A/jpLK1l7ga5OGQQS69LSt2xpr2pJ+P96Maf8JBnM3NlG4PWrE9f9o4b0Et/jSxVRymtZZnRDDN7njehkLwjDWLjlHofVqBgwEMarQSoXDP+SYfLaDGiSnASSgn2dqkl3C04vNUboy2d684BZht5Y= x-ms-office365-filtering-correlation-id: e09a3da5-0c64-4012-a657-08d4ca154930 x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:(300000500095)(300135000095)(300000501095)(300135300095)(22001)(300000502095)(300135100095)(2017030254075)(48565401081)(300000503095)(300135400095)(2017052603031)(201703131423075)(201703031133081)(300000504095)(300135200095)(300000505095)(300135600095)(300000506095)(300135500095);SRVR:DM2PR06MB272; x-ms-traffictypediagnostic: DM2PR06MB272: 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)(10201501046)(3002001)(100000703101)(100105400095)(93006095)(93001095)(6055026)(6041248)(20161123560025)(20161123562025)(20161123558100)(201703131423075)(201702281528075)(201702281529075)(201703061421075)(201703061406153)(20161123555025)(20161123564025)(6072148)(100000704101)(100105200095)(100000705101)(100105500095);SRVR:DM2PR06MB272;BCL:0;PCL:0;RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095);SRVR:DM2PR06MB272; x-forefront-prvs: 0367A50BB1 x-forefront-antispam-report: SFV:NSPM;SFS:(10009020)(6009001)(39840400002)(39450400003)(39860400002)(39410400002)(39400400002)(39850400002)(377424004)(377454003)(24454002)(4326008)(189998001)(99286003)(25786009)(55016002)(38730400002)(2950100002)(66066001)(8676002)(6916009)(7696004)(5660300001)(7736002)(81166006)(305945005)(6436002)(50986999)(8936002)(5250100002)(76176999)(53936002)(75432002)(6246003)(54356999)(88552002)(14454004)(86362001)(74316002)(3846002)(6116002)(102836003)(2900100001)(9686003)(110136004)(478600001)(53546010)(2906002)(3280700002)(33656002)(229853002)(3660700001)(6506006);DIR:OUT;SFP:1101;SCL:1;SRVR:DM2PR06MB272;H:DM2PR06MB272.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: 13 Jul 2017 17:33:33.5727 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 2ca68321-0eda-4908-88b2-424a8cb4b0f9 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM2PR06MB272 X-SW-Source: 2017-q3/txt/msg00005.txt.bz2 Hi Mark,=20 given a Die, I want to associate each line (from dwarf_getsrclines) to a fi= le (from dwarf_getsrcfiles). The only way to do this is get the filename re= turned by dwarf_linesrc, and search in the filenames given by dwarf_getsrcf= iles and dwarf_filesrc. But this is expensive since this has to be done for= each line. Instead, if I could get the file index in the array "struct Dwa= rf_Fileinfo_s info", I wouldn't need to search. =20=20 From: Mark Wielaard Sent: Thursday, July 13, 2017 4:11:09 AM To: Sasha Da Rocha Pinheiro Cc: elfutils-devel@sourceware.org Subject: Re: File index given line (libdw) =A0=20=20=20 Hi Sasha, On Thu, 2017-07-13 at 00:25 +0000, Sasha Da Rocha Pinheiro wrote: > when we get the files given a Die and want to know the file given the > line, the only way to do this is comparing the return of dwarf_linesrc > with the list of filenames we had from dwarf_getsrcfiles? > Why can't we get the index of the file given the line? Just return the un= signed int file in Dwarf_Line_s. There could be a good reason for that. But I might be missing the bigger picture of what you are trying to do. Could you give a more complete code example? What extra information do you want by having the Dwarf_Files index of the Dwarf_Line? Thanks, Mark =20=20=20=20