[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 15:36:32 +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=e+kNO7bL8CTwu7FCOsLRrph/IcUFpoDLwm+j3dZN2xs=; b=aPajtMtH3zSmhsSV3Vq11jvkcvy7NFBvlpS+pRSIpnuDsqB5piMDATDUyBJwbeGB/19VtxskAMgCSJsfio9HPdos+qfKKKS+KCuTTXylcGNieECzmVV2tJM/p8JcHBPDUpOQ59gVCcyDP567nutPoMGxZZuDpo3wkvSQYAtk3fV3xsCtPYy7zPHnQy+hgeSz5JwBbnOp9A6h5Gecvj1NVLWaa+a/blBu3EJvyHyDfzsQnvUEUV3sOTdLwyNWE394wOKNZen/Xq+lZED2Fd/0Fl3RIxrd4y6xHlYA2770dviaXbA2AQyneCTPhcnmZJ3ivV0zM9Ayq9IgMJT0z59FXQ==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=KnbV/WSPOkDY9hWVPuYR5nZ3s5x85cdEFf/lY2owHVHnmLQnp2QhNQ+TtR+3bxP1SapYwZ1h5lSNdNOe7Nl888y6ulZHiUtROKlNwyY9h+XrT1n007ZIBb9408TvDUQNGroNfNN2T+b6GmOYHd48KJO+tn1riDwD249Cp0Zt5rDLeD7W3Nbnl+ZtGc6OKaWoid3hi9wr53SfsGIkArxhC3k20/KjFRsZWbXlB+eNx+mgxR/DTM8qLkzqiplk7lqJVxdd+YTYt870w8Il8oczPQv5YPYXYxvkBoHv3grXAGGX4p8LzPstF9lu0lqJu8xXndLq2WOuMtiWgakeD64D9g==
  • Authentication-results: esa4.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 13:36:46 +0000
  • Ironport-data: A9a23:e59aLK6Rq/MrZGznDXnJGgxRtC/HchMFZxGqfqrLsTDasY5as4F+v mpKXmrXO6uPajOkc90gb4m2px8C7ZXRmoBkHQBoris9Hi5G8cbLO4+Ufxz6V8+wwmwvb67FA +E2MISowBUcFyeEzvuVGuG96yE6j8lkf5KkYAL+EnkZqTRMFWFw0XqPp8Zj2tQy2YTgX1vU0 T/Pi5a31GGNimYc3l08s8pvmDs31BglkGpF1rCWTakjUG72zxH5PrpGTU2CByKQrr1vNvy7X 47+IISRpQs1yfuP5uSNyd4XemVSKlLb0JPnZnB+A8BOiTAazsA+PzpS2FPxpi67hh3Q9+2dx umhurSvFyp2L7TukdgQXgJiMzsnPo1K2LvIdC3XXcy7lyUqclPpyvRqSko3IZcZ6qB8BmQmG f4wcW5XKErZ3qTvnez9GrIEascLdaEHOKsFvX5t13fBBOsOSpHfWaTao9Rf2V/cg+gRRK2BP 5pHM1KDajyDXjxWZlEJFK44lbu0rFXFVwFAig6K8P9fD2/7k1UqjemF3MDuUsOObdVYmACfv G2u13T0BFQWOcKSzRKB82mwnanfkCXjQoUQGbaksPlwjzW7xGYeFRkXXluTuuSihwi1XNc3F qAP0nNw9+5orhXtF4SjGU3jyJKZgvICc8UOPrIr8SOE9qfZ+Dy5HDEHbjJhbNNz4afaWgcW/ 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 je2XUow9bY1rSavxdmiApy7VI7SYA==
  • Ironport-hdrordr: A9a23:sfIl5K7F+5xcdEaCRAPXwSqBI+orL9Y04lQ7vn2ZFiY7TiXIra yTdaoguCMc6AxxZJkh8erwX5VoZUmsj6KdhrNhQItKPTOWw1dASbsN0WKM+UyDJ8STzJ856U 4kSdkDNDSSNykKsS+Z2njALz9I+rDum8rJ9ITjJjVWPHlXgslbnnlE422gYytLrWd9dP4E/M 323Ls5m9PsQwVeUu2LQl0+G8TTrdzCk5zrJTYAGh4c8QGLyRel8qTzHRS01goXF2on+8ZpzU H11yjCoomzufCyzRHRk0fV8pRtgdPkjv9OHtaFhMQ5IijlziyoeINicbufuy1dmpDl1H8a1P 335zswNcV67H3cOkmzvBvWwgHllA0j7nfzoGXo9kfLkIjcfnYXGsBBjYVWfl/y8Ew7puxx16 pNwiawq4dXJQmoplWz2/H4EzVR0makq3srluAey1ZFV5EFVbNXpYsDuGtIDZY7Gj7g4oxPKp gjMCjl3ocWTbqmVQGYgoE2q+bcHUjbXy32D3Tqg/blnQS/xxtCvgklLM92pAZ1yHtycegA2w 3+CNUaqFh/dL5nUUtDPpZyfSKWMB26ffueChPaHbzYfJt3Tk4l7aSHpIkI2A==
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On Thu, Apr 14, 2022 at 03:31:26PM +0200, Roger Pau Monné wrote:
> On Thu, Apr 14, 2022 at 02:52:47PM +0200, Jan Beulich wrote:
> > On 14.04.2022 14:40, Roger Pau Monné wrote:
> > > 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__
> > 
> > No, I didn't even consider that. I view such as too obfuscating - there's
> > then e.g. no visual match with the .endm. Furthermore, as outlined in the
> > description, I don't think this wants applying uniformly. There are
> > macros which better don't have this added. Yet I also would prefer to not
> > end up with a mix of .macro and DECLARE_MACRO().
> 
> I think it's a dummy question, but why would we want to add this to
                                              ^n't

Sorry.



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.