[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 1/2] x86: improve .debug_line contents for assembly sources
- To: Jan Beulich <jbeulich@xxxxxxxx>
- From: Roger Pau Monné <roger.pau@xxxxxxxxxx>
- Date: Thu, 14 Apr 2022 14:40:08 +0200
- Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=citrix.com; dmarc=pass action=none header.from=citrix.com; dkim=pass header.d=citrix.com; arc=none
- Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=zzXlpB20U4qtIGwny9tQ/KffctDeZlpyzaQOOpVpUKI=; b=KHBI3dLjXoB33jSQeVxH7hmTQ2XTiXF+be8nmDdAknfuLCmel2HSklpZguo3l9mgYkgljKTgK43NNjf/yw5gRhFkVf4MC8TSOjpM/Hm6SPEjRhytB6ix3gY+GVrrIZyqTJX59xtZImzhgkyTrkzKQZUJd4ghZoJxjS/Ol9FxqFusj5FypyENxiSt/7XSrbDCF+9ltYyxgvCDG7aHcnXB4lKYSDxi9qMTzBqe5HliSOps2cu906RtOO1efin8gVmaAZPA118RcBtCo+5vcxNWLX9pNnq3oe6SOS6+IHXj0lsqD89ZB8L03n0SkPxXkuc4Vyh/YQPUANh3Zx1zmB7SGw==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=H14Qr6BO+J/wBzDi69dO53Gl1uP26BtEE1ZELPCCTSHuFGyPFJXo9OW5MVjnVwntKFhakDD9TpOPdMFBPMvVH6g15ZGKEuWYp8+wm7bZUbdoD8c6YyPStOt6vY/1HDUANfLAtxkmanhoAXmnnND4y5VT0ir1XU+Xw0Ezr2Ox4di2p8r2AXKJlJ6XbMjxBq5EcsiJkFwyjAAEritdRE3Oj7iqaSdbI0ygkWGt06BsuiiGZHABoTFmlxCDfTNN8j4JitldcTrleWfGv6anusoobG9G593y11OV0LwkgGyzmR9FKqYiErBl7lYYZmZdBpu7uUAVCIS+MOhg3jtXO0LS/w==
- Authentication-results: esa3.hc3370-68.iphmx.com; dkim=pass (signature verified) header.i=@citrix.onmicrosoft.com
- Cc: "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>, "Andrew Cooper" <andrew.cooper3@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>
- Delivery-date: Thu, 14 Apr 2022 12:40:28 +0000
- Ironport-data: A9a23:RVo8VK55wJQeuY3Icfjd2wxRtC/HchMFZxGqfqrLsTDasY5as4F+v mdNUTrSM6nfZmT1Ko10a9jj80sCu5bUzYRqTlA6rihjHi5G8cbLO4+Ufxz6V8+wwmwvb67FA +E2MISowBUcFyeEzvuVGuG96yE6j8lkf5KkYAL+EnkZqTRMFWFw0XqPp8Zj2tQy2YTgX1vU0 T/Pi5a31GGNimYc3l08s8pvmDs31BglkGpF1rCWTakjUG72zxH5PrpGTU2CByKQrr1vNvy7X 47+IISRpQs1yfuP5uSNyd4XemVSKlLb0JPnZnB+A8BOiTAazsA+PzpS2FPxpi67hh3Q9+2dx umhurSwRBkGB6zqndgAVh5HQzBlMvNv95XYdC3XXcy7lyUqclPpyvRqSko3IZcZ6qB8BmQmG f4wcW5XKErZ3qTvnez9GrIEascLdaEHOKsFvX5t13fBBOsOSpHfWaTao9Rf2V/cg+gQTaeDP pVCMlKDajzMbRcWI2o3BqsCp+eJp3zzMDxxlnma8P9fD2/7k1UqjemF3MDuUsOObdVYmACfv G2u13T0BFQWOcKSzRKB82mwnanfkCXjQoUQGbaksPlwjzW7xGYeFRkXXluTuuSihwi1XNc3F qAP0nNw9+5orhXtF4SjGU3jyJKZgvICc9pdDcID6SeI9rfR5BnJF3MLEBdOQsNz4afaWgcW/ lOOmtroAxlmv7uUVW+R+9+okN+iBcQGBTRcPHFZFGPp9/Gm+dhu1UyXEr6PBYbv1rXI9SfML ydmRcTUr5EaloY12qqy5jgraBr898GSHmbZCug6N19JDz+Vhqb4P+RECnCBtJ6sybp1qHHb7 RDofODEsogz4WmlznDlfQn0NOjBCwy5GDPdm0VzOJIq6i6g/XWuFagJvm0vdB0xa5hYImS0C KM2he+3zMUCVJdNRfUpC79d9uxwlfSwfTgbfq28giVyjmhZK1bcoXAGib+41GHxikk8+ZzTy r/AGftA+U0yUPw9pBLvHr91+eZymkgWmDOCLbimnk/P+efPOxaopUItbQLmghYRt/jf/m04M r93aqO39vmoeLSnPHKGoNJJcAhiwLpSLcmelvG7v9Wre2JOMGogF+XQ0fUmfYlklL5SjeDG4 je2XUow9bY1rSSvxdmiApy7VI7SYA==
- Ironport-hdrordr: A9a23:uoGx16DoERTMVp/lHehCsceALOsnbusQ8zAXPh9KJyC9I/b2qy nxppgmPH/P6Ar4WBkb6La90Y27MA7hHP9OkPMs1NKZPTUO11HYSb2KgbGSpwEIXheOitK1tp 0QApSWaueAdWSS5PySiGLTfqdCsbu6GeKT9JzjJh9WPH9Xgspbnn5E42igYypLrF4sP+tHKH PQ3LsOmxOQPVAsKuirDHgMWObO4/XNiZLdeBYDQzoq8hOHgz+E4KPzV0Hw5GZVbxp/hZMZtU TVmQ3w4auu99m91x/nzmfWq7BbgsHoxNdvDNGFzuIVNjLvoAC1Y5kJYczIgBkF5MWUrHo6mt jFpBkte+x19nPqZ2mw5SDg3gHxuQxenEPK+Bu9uz/OsMb5TDU1B45qnoRCaCbU7EImoZVVzL 9L93jxjesZMTrw2ADGo/TYXRBjkUS55VA4l/QIsnBZWYwCLJdMsI0k+l9PGptoJlO31GkeKp guMCjg3ocXTbvDBEqp/VWHgebcE0jbJy32DHTr4aeuonprdHMQ9Tpt+CVQpAZEyHsHceg22w 31CNUZqFhwdL5lUUtcPpZ2fSLlMB2FffrzWFjiVGgPUpt3f07wlw==
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
On Tue, Apr 12, 2022 at 12:27:34PM +0200, Jan Beulich wrote:
> While future gas versions will allow line number information to be
> generated for all instances of .irp and alike [1][2], the same isn't
> true (nor immediately intended) for .macro [3]. Hence macros, when they
> do more than just invoke another macro or issue an individual insn, want
> to have .line directives (in header files also .file ones) in place.
>
> Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>
>
> [1]
> https://sourceware.org/git?p=binutils-gdb.git;a=commitdiff;h=7992631e8c0b0e711fbaba991348ef6f6e583725
> [2]
> https://sourceware.org/git?p=binutils-gdb.git;a=commitdiff;h=2ee1792bec225ea19c71095cee5a3a9ae6df7c59
> [3]
> https://sourceware.org/git?p=binutils-gdb.git;a=commitdiff;h=6d1ace6861e999361b30d1bc27459ab8094e0d4a
> ---
> Using .file has the perhaps undesirable side effect of generating a fair
> amount of (all identical) STT_FILE entries in the symbol table. We also
> can't use the supposedly assembler-internal (and hence undocumented)
> .appfile anymore, as it was removed [4]. Note that .linefile (also
> internal/undocumented) as well as the "# <line> <file>" constructs the
> compiler emits, leading to .linefile insertion by the assembler, aren't
> of use anyway as these are processed and purged when processing .macro
> [3].
>
> [4]
> https://sourceware.org/git?p=binutils-gdb.git;a=commitdiff;h=c39e89c3aaa3a6790f85e80f2da5022bc4bce38b
>
> --- a/xen/arch/x86/include/asm/spec_ctrl_asm.h
> +++ b/xen/arch/x86/include/asm/spec_ctrl_asm.h
> @@ -24,6 +24,8 @@
> #include <asm/msr-index.h>
> #include <asm/spec_ctrl.h>
>
> +#define FILE_AND_LINE .file __FILE__; .line __LINE__
Seeing as this seems to get added to all macros below, I guess you did
consider (and discarded) introducing a preprocessor macro do to the
asm macro definitons:
#define DECLARE_MACRO(n, ...) \
.macro n __VA_ARGS__ \
.file __FILE__; .line __LINE__
Thanks, Roger.
|