From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 116726 invoked by alias); 5 Apr 2017 12:46:39 -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 116157 invoked by uid 89); 5 Apr 2017 12:46:38 -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=-1.8 required=5.0 tests=AWL,BAYES_00,KAM_LAZY_DOMAIN_SECURITY autolearn=no version=3.3.2 spammy=our X-Spam-Status: No, score=-1.8 required=5.0 tests=AWL,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 Message-ID: <1491396394.8380.78.camel@klomp.org> Subject: Re: dwfl_attach_state alternative taking Ebl? From: Mark Wielaard To: Milian Wolff Cc: elfutils-devel@sourceware.org Date: Wed, 05 Apr 2017 12:46:00 -0000 In-Reply-To: <1563796.tLH0IFhUAp@milian-kdab2> References: <2572422.AxEj1gHkJW@milian-kdab2> <1662463.uA56NKcFP1@agathebauer> <1490871453.6461.169.camel@klomp.org> <1563796.tLH0IFhUAp@milian-kdab2> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Mailer: Evolution 3.12.11 (3.12.11-22.el7) Mime-Version: 1.0 X-SW-Source: 2017-q2/txt/msg00022.txt.bz2 On Thu, 2017-03-30 at 13:14 +0200, Milian Wolff wrote: > > OK. How do you know the Elf architecture in that case? How and by what > > is it given? Is that an EM constant or some architecture string? >=20 > In our case we either get it from perf, or the user specifies it directly= on=20 > the command line. In both cases it is a string like "x86_64", "arm" or=20 > "aarch64". We map that to a list of architectures we know about, see e.g.: >=20 > http://code.qt.io/cgit/qt-creator/perfparser.git/tree/app/ > perfregisterinfo.h#n29 >=20 > So, any API that would allow us to map these architectures directly to a = dwfl/ > elf counterpart would simplify our code, or at least would make it easier= to=20 > understand, as we wouldn't have to wait for an Elf file we can open befor= e=20 > calling dwfl_attach_state. So you map from simple architecture name like "x86" or "powerpc". But what mechanism do you have to whether that is 32 or 64 bit, and big or little endian? Thanks, Mark