<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<!--[if !mso]><style>v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style><![endif]--><style><!--
/* Font Definitions */
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:purple;
text-decoration:underline;}
p.msonormal0, li.msonormal0, div.msonormal0
{mso-style-name:msonormal;
mso-margin-top-alt:auto;
margin-right:0in;
mso-margin-bottom-alt:auto;
margin-left:0in;
font-size:11.0pt;
font-family:"Calibri",sans-serif;}
span.EmailStyle19
{mso-style-type:personal-reply;
font-family:"Calibri",sans-serif;
color:windowtext;}
.MsoChpDefault
{mso-style-type:export-only;
font-size:10.0pt;}
@page WordSection1
{size:8.5in 11.0in;
margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-US" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal">Hi Aaron, thanks.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">I’ll take a look in the morning (currently 1:47am).<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Just a quick question though, is this fix for lldb compiled with native PDB support or with DIA support?<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">As for getting the module addresses, I’m familiar with the PE image layout (having worked on the Windows Kernel team in the past and having built my own PE based OS – including a hand written x86-64 assembly PE loader from scratch) and
with DIA (to some degree), so I will have a look at what’s required to potentially get that working.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Thanks,<o:p></o:p></p>
<p class="MsoNormal">Salah<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<div style="border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><b>From:</b> Aaron Smith <aaron.smith@microsoft.com> <br>
<b>Sent:</b> Tuesday, July 10, 2018 10:47 PM<br>
<b>To:</b> Zachary Turner <zturner@google.com><br>
<b>Cc:</b> Salahuddin Khan <sjkhan@outlook.com>; Adrian McCarthy <amccarth@google.com>; Stella Stamenova <stilis@microsoft.com>; lldb-dev@lists.llvm.org<br>
<b>Subject:</b> Re: [lldb-dev] How LLDB plug-ins loaded on Windows?<o:p></o:p></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<div>
<div>
<div>
<p class="MsoNormal">Here’s a more recent version of the change. It’s accepted and not sure why it hasn’t been committed.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal"><a href="https://reviews.llvm.org/D39314">https://reviews.llvm.org/D39314</a><o:p></o:p></p>
</div>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
</div>
<div>
<p class="MsoNormal"> <o:p></o:p></p>
</div>
<div class="MsoNormal" align="center" style="text-align:center">
<hr size="2" width="98%" align="center">
</div>
<div id="divRplyFwdMsg">
<p class="MsoNormal"><b><span style="color:black">From:</span></b><span style="color:black"> Zachary Turner <<a href="mailto:zturner@google.com">zturner@google.com</a>><br>
<b>Sent:</b> Wednesday, July 11, 2018 1:19 PM<br>
<b>To:</b> Aaron Smith<br>
<b>Cc:</b> Salahuddin Khan; Adrian McCarthy; Stella Stamenova; <a href="mailto:lldb-dev@lists.llvm.org">
lldb-dev@lists.llvm.org</a><br>
<b>Subject:</b> Re: [lldb-dev] How LLDB plug-ins loaded on Windows? <o:p></o:p></span></p>
<div>
<p class="MsoNormal"><span style="color:black"> <o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal">Is it? If lldb is totally broken without that patch we should upstream it no?<o:p></o:p></p>
<div>
<div>
<p class="MsoNormal">On Tue, Jul 10, 2018 at 8:52 PM Aaron Smith <<a href="mailto:aaron.smith@microsoft.com">aaron.smith@microsoft.com</a>> wrote:<o:p></o:p></p>
</div>
<blockquote style="border:none;border-left:solid #CCCCCC 1.0pt;padding:0in 0in 0in 6.0pt;margin-left:4.8pt;margin-right:0in">
<div>
<div>
<div>
<div>
<p class="MsoNormal">This patch is needed for lldb to work on Windows.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal"><a href="https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Freviews.llvm.org%2FD12245&data=02%7C01%7Caaron.smith%40microsoft.com%7C50f42a2f0ed140ee6e1e08d5e6e56f1d%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C636668795447521815&sdata=B4bO4%2BrPD7YIEG48EstI29sYrNiQ08KTIWXR6wxb970%3D&reserved=0" target="_blank">https://reviews.llvm.org/D12245</a><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
</div>
<div>
<p class="MsoNormal"> <o:p></o:p></p>
</div>
<div class="MsoNormal" align="center" style="text-align:center">
<hr size="2" width="98%" align="center">
</div>
<div id="m_-3813746167923391620divRplyFwdMsg">
<p class="MsoNormal"><b><span style="color:black">From:</span></b><span style="color:black"> Zachary Turner <<a href="mailto:zturner@google.com" target="_blank">zturner@google.com</a>><br>
<b>Sent:</b> Friday, July 6, 2018 5:17 AM<br>
<b>To:</b> Salahuddin Khan<br>
<b>Cc:</b> Aaron Smith; Adrian McCarthy; Stella Stamenova; <a href="mailto:lldb-dev@lists.llvm.org" target="_blank">
lldb-dev@lists.llvm.org</a></span><o:p></o:p></p>
</div>
</div>
</div>
<div>
<div>
<div id="m_-3813746167923391620divRplyFwdMsg">
<p class="MsoNormal"><span style="color:black"><br>
<b>Subject:</b> Re: [lldb-dev] How LLDB plug-ins loaded on Windows? <o:p></o:p></span></p>
<div>
<p class="MsoNormal"><span style="color:black"> <o:p></o:p></span></p>
</div>
</div>
<div>
<div>
<p class="MsoNormal">It’s been a while since i was close to this code, so adding people who have been in there more recently <o:p></o:p></p>
</div>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<div>
<p class="MsoNormal">On Thu, Jul 5, 2018 at 1:12 PM Salahuddin Khan <<a href="mailto:sjkhan@outlook.com" target="_blank">sjkhan@outlook.com</a>> wrote:<o:p></o:p></p>
</div>
<blockquote style="border:none;border-left:solid #CCCCCC 1.0pt;padding:0in 0in 0in 6.0pt;margin-left:4.8pt;margin-right:0in">
<div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">Hi Zachary,<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">Ahh ok, thanks for your quick response.<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">I was hoping to use LLDB on Windows (to debug Go code), which I know is DWARF based (and I thought would work on Windows), but since I couldn’t seem to set a breakpoint in C/C++/Go,
so I thought perhaps plug-ins weren’t being loaded (although it’s not possible to ‘load’ a .lib file, they have to be included during link time).<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">However, longer term I’m also hoping to replace the kernel debugger for my own operating system (a personal OS written from scratch) with LLDB. My OS uses the PE file format and
has PDBs too – currently compiled on Windows using a very old version of the Windows DDK. I’m in the process of moving to a new build system using clang. I was using DIA to some degree and debugging from Windows, but I eventually hope to be able to debug one
system from another also running the OS, so non-Windows support would be good.<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">Any idea which pieces are missing on Windows? I’m probably going to start debugging lldb to figure it out, but knowing what is needed would help significantly.<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">Thanks,<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">Salah<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><b>From:</b> Zachary Turner <<a href="mailto:zturner@google.com" target="_blank">zturner@google.com</a>>
<br>
<b>Sent:</b> Thursday, July 05, 2018 12:56 PM<br>
<b>To:</b> Salahuddin Khan <<a href="mailto:sjkhan@outlook.com" target="_blank">sjkhan@outlook.com</a>><br>
<b>Cc:</b> <a href="mailto:lldb-dev@lists.llvm.org" target="_blank">lldb-dev@lists.llvm.org</a><br>
<b>Subject:</b> Re: [lldb-dev] How LLDB plug-ins loaded on Windows?<o:p></o:p></p>
</div>
</div>
<div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">Plugin is a bit misleading. All “plugins” are compiled into lldb. Plugins are really just a layering abstraction.<br>
<br>
To answer your question, pdb works currently but is limited in functionality. First, it only supports limited usage scenarios, and second it requires Windows. It’s currently built on top of DIA. If you need PDB support on non Windows it will be quite a bit
of work (although there’s people making gradual progress on it). If you need it on Windows it basically works but you’ll have to fill in some missing pieces. Several other people have been submitting patches in this area as well recently
<o:p></o:p></p>
<div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">On Thu, Jul 5, 2018 at 12:47 PM Salahuddin Khan via lldb-dev <<a href="mailto:lldb-dev@lists.llvm.org" target="_blank">lldb-dev@lists.llvm.org</a>> wrote:<o:p></o:p></p>
</div>
<blockquote style="border:none;border-left:solid #CCCCCC 1.0pt;padding:0in 0in 0in 6.0pt;margin-left:4.8pt;margin-top:5.0pt;margin-right:0in;margin-bottom:5.0pt">
<div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">Hi All,<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">I’m somewhat puzzled by the plug-ins in LLDB, specifically on Windows.<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">When examining the lib directory after building LLVM/LLDB, I noticed at lot of lldbPlugin*.lib files. However, it’s not clear if or how these are included in LLDB.<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">Here’s one example:<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">lldbPluginSymbolFilePDB.lib<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">Are these compiled into lldb.exe and if so, how are they invoked? I’m trying to determine if PDB symbols are currently working, and if not, what would be required to make them work.<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">Thanks,<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">Salah<o:p></o:p></p>
</div>
</div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">_______________________________________________<br>
lldb-dev mailing list<br>
<a href="mailto:lldb-dev@lists.llvm.org" target="_blank">lldb-dev@lists.llvm.org</a><br>
<a href="https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Flists.llvm.org%2Fcgi-bin%2Fmailman%2Flistinfo%2Flldb-dev&data=02%7C01%7Caaron.smith%40microsoft.com%7C50f42a2f0ed140ee6e1e08d5e6e56f1d%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C636668795447531824&sdata=CRo2lc35gOar%2BVuPTcGk8QRpMX7Ds%2BId83chZiGHToM%3D&reserved=0" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-dev</a><o:p></o:p></p>
</blockquote>
</div>
</div>
</div>
</blockquote>
</div>
</div>
</div>
</div>
</blockquote>
</div>
</div>
</div>
</body>
</html>