From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail.ispras.ru (mail.ispras.ru [83.149.199.45]) by mx.groups.io with SMTP id smtpd.web12.618.1584717229411985501 for ; Fri, 20 Mar 2020 08:13:50 -0700 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: ispras.ru, ip: 83.149.199.45, mailfrom: cheptsov@ispras.ru) Received: from [127.0.0.1] (unknown [77.232.9.83]) by mail.ispras.ru (Postfix) with ESMTPSA id 3764F64F; Fri, 20 Mar 2020 18:13:47 +0300 (MSK) From: "Vitaly Cheptsov" Mime-Version: 1.0 (Mac OS X Mail 13.0 \(3608.60.0.2.5\)) Subject: CLANGPDB binary debugging Message-Id: <9804C565-0C9E-4778-92A7-06EA6AD8D694@ispras.ru> Date: Fri, 20 Mar 2020 18:13:45 +0300 Cc: =?utf-8?Q?Marvin_H=C3=A4user?= To: "Gao, Liming" , devel@edk2.groups.io X-Mailer: Apple Mail (2.3608.60.0.2.5) X-Groupsio-MsgNum: 56054 Content-Type: multipart/signed; boundary="Apple-Mail=_0FE59AAF-9363-48BC-BBED-16475FB1170F"; protocol="application/pgp-signature"; micalg=pgp-sha512 --Apple-Mail=_0FE59AAF-9363-48BC-BBED-16475FB1170F Content-Type: multipart/alternative; boundary="Apple-Mail=_A520FC68-3918-4055-ADA3-C8994D5B1CF3" --Apple-Mail=_A520FC68-3918-4055-ADA3-C8994D5B1CF3 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 Hello, We noticed that the original bugzilla, which intended to add new LLVM = toolchain support[1], also wanted to bring ELF format support with DWARF = debugging information. For some reason this did not make its way into = EDK II, and we are currently wondering, how can one debug binaries built = with LLVM 9.0. For macOS and XCODE5 toolchain we use GDB scripts based on Andrei = Warkentin=E2=80=99s work, which allow us to integrate with QEMU and = VMware[2]. It is likely that they should work with little to no work on = Linux with CLANG38/GCC5 with GDB once again. However, CLANGPDB = apparently is using PDB debugging information, which I believe is not = handled with GDB. Could you please provide the details on the matter and let us know about = the recommended route? =E2=80=94 Is dropping CLANGELF just a temporary measure and it should be = resubmitted again? =E2=80=94 Should LLDB, which seems to be aware of PDB, be used instead = of GDB, when building with CLANGPDB? If so, did anybody try that? Thanks! Best regards, Vitaly [1] https://bugzilla.tianocore.org/show_bug.cgi?id=3D1603 [2] = https://github.com/acidanthera/OpenCorePkg/blob/master/Debug/Scripts/gdb_u= efi.py --Apple-Mail=_A520FC68-3918-4055-ADA3-C8994D5B1CF3 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=utf-8 Hello,

We = noticed that the original bugzilla, which intended to add new LLVM = toolchain support[1], also wanted to bring ELF format support with DWARF = debugging information. For some reason this did not make its = way into EDK II, and we are currently wondering, how can one debug = binaries built with LLVM 9.0.

For macOS and XCODE5 = toolchain we use GDB scripts based on Andrei Warkentin=E2=80=99s work, which allow us to integrate = with QEMU and VMware[2]. It is likely that they should work with little = to no work on Linux with CLANG38/GCC5 with GDB once again. However, = CLANGPDB apparently is using PDB debugging information, which I believe = is not handled with GDB.

Could you please provide the details on = the matter and let us know about the recommended route?
=E2=80=94 Is dropping CLANGELF just a temporary measure and = it should be resubmitted again?
=E2=80=94 Should LLDB, which seems to be aware of PDB, be used instead = of GDB, when building with CLANGPDB? If so, did anybody try = that?

Thanks!

Best = regards,
Vitaly

=

= --Apple-Mail=_A520FC68-3918-4055-ADA3-C8994D5B1CF3-- --Apple-Mail=_0FE59AAF-9363-48BC-BBED-16475FB1170F Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP -----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEEsLABAI5Y5VbvBdmpL8K2O86Eyz4FAl503aoACgkQL8K2O86E yz7idA//REuz6preb9j3XP2fLRsEKkHlTjrGcJoSwKnlXNRLNA+eMCN/DTgih0RG LLKHhoIYDs7qMkmFLJX0CNb253ujViH0vB5oLsVLNA6HZ4ZbfVggza7gNXo1vMgw uJi8ELBEd9WGTjbLQoekvcCxjRBgWUhc4KYDcUeEU6x94z1cYAICcBZI5VzSAmCG PknEdw73lBM/lgv1huMPNes+OjrahS3txOFHMfgEnE7wq1fw1nx5BLaKCM0a9bFi YKNLh2ZsM7YPdgfMorhxs/A+v7YEwgrZOsAaB+Jk4pxRr3Jgn/TIPgf6OuKVfT8t rmTeADDrlyMI8cDzoOtig9z8OrqOQW1EteykLdGCAW06SCETNjJG9y/BhtQXbBSr QuqcRex6KW0nIzyeUIxXevVKjcRLEIgOx9zKBF9PCukn/7LMe5psH45UIbl73/LN gFkdvLgVcR1zkGOasGGXQy0N3K4zpKTmYkdnvbe1WCWuKTP0Aft+7f3Epcnyl6Uc p1cAb5hZCH+LgyffQUDJ5kttS2uWvaeMS34UaS9/5y9AJLhvsPci52Z3uxFwrnGa +29CmHN9akD1g2U0UhlUCVBfJDKVf7F9XOMa2RETbuzCG4ac4oM+1bIaltAcOmSs 1NqbNBc2/VSAnwQl3TkXMoQv5omjhxr2xShM4j32DbZnOQ3msio= =PbE2 -----END PGP SIGNATURE----- --Apple-Mail=_0FE59AAF-9363-48BC-BBED-16475FB1170F--