<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=utf-8"><meta name=Generator content="Microsoft Word 15 (filtered medium)"><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:12.0pt;
font-family:"Times New Roman",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;}
span.gmailmsg
{mso-style-name:gmail_msg;}
span.EmailStyle18
{mso-style-type:personal-reply;
font-family:"Calibri",sans-serif;
color:#1F497D;}
.MsoChpDefault
{mso-style-type:export-only;
font-family:"Calibri",sans-serif;}
@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><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'>I wonder if lldb isn’t using the windows platform. In the lldb command line, load up your target, then type “target list”. I’d like to see what plaform it chose, and what the triple is.<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'>--<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'>Qualcomm Innovation Center, Inc.<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'>The Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a Linux Foundation Collaborative Project<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'><o:p> </o:p></span></p><div style='border:none;border-left:solid blue 1.5pt;padding:0in 0in 0in 4.0pt'><div><div style='border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0in 0in 0in'><p class=MsoNormal><b><span style='font-size:11.0pt;font-family:"Calibri",sans-serif'>From:</span></b><span style='font-size:11.0pt;font-family:"Calibri",sans-serif'> Russell Greene [mailto:russellgreene8@gmail.com] <br><b>Sent:</b> Monday, April 03, 2017 11:24 AM<br><b>To:</b> Ted Woodward <ted.woodward@codeaurora.org>; LLDB <lldb-dev@lists.llvm.org><br><b>Subject:</b> Re: [lldb-dev] Using LLDB API on windows<o:p></o:p></span></p></div></div><p class=MsoNormal><o:p> </o:p></p><div><p class=MsoNormal>That makes sense, and I'm sure it works great when using MSVC as a compiler, but I think LLDB recognizes mingw as a unix compiler and tries to do GDBRemoteCommunication::StartDebugserverProcess when it should be doing PlatformWindows::DebugProcess. <o:p></o:p></p><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal>Not sure though. All I know is when I try to do a SBTarget::Launch on windows under mingw (msys2) it says cannot find lldb-server...<o:p></o:p></p></div><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal>-Russell<o:p></o:p></p></div></div><p class=MsoNormal><o:p> </o:p></p><div><div><p class=MsoNormal>On Mon, Apr 3, 2017 at 9:32 AM Ted Woodward <<a href="mailto:ted.woodward@codeaurora.org">ted.woodward@codeaurora.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-right:0in'><div><div><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span class=gmailmsg><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'>Hi Russell,</span></span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span class=gmailmsg><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'> </span></span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span class=gmailmsg><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'>I assume you mean for SBTarget::Launch or LaunchSimple to launch a Windows application.</span></span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span class=gmailmsg><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'> </span></span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span class=gmailmsg><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'>The short answer is, this already works.</span></span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span class=gmailmsg><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'> </span></span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span class=gmailmsg><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'>SBTarget::Launch calls Target::Launch, which calls DebugProcess in the relevant platform. For cases where we use lldb-server, the platform make a call that eventually gets to GDBRemoteCommunication::StartDebugserverProcess to start up lldb-server. On Windows, PlatformWindows::DebugProcess calls Process::Launch, which (on Windows) will do the correct thing to start up and connect to a Windows process.</span></span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span class=gmailmsg><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'> </span></span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span class=gmailmsg><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'>See PlatformWindows::DebugProcess in source\Plugins\Platform\Windows\PlatformWindows.cpp and ProcessLauncherWIndows::LaunchProcess in source\Host\windows\ProcessLauncherWindows.cpp .</span></span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span class=gmailmsg><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'> </span></span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span class=gmailmsg><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'>Ted</span></span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span class=gmailmsg><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'> </span></span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span class=gmailmsg><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'>--</span></span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span class=gmailmsg><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'>Qualcomm Innovation Center, Inc.</span></span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span class=gmailmsg><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'>The Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a Linux Foundation Collaborative Project</span></span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span class=gmailmsg><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'> </span></span><o:p></o:p></p><div style='border:none;border-left:solid blue 1.5pt;padding:0in 0in 0in 4.0pt'><div><div style='border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0in 0in 0in'><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span class=gmailmsg><b><span style='font-size:11.0pt;font-family:"Calibri",sans-serif'>From:</span></b></span><span class=gmailmsg><span style='font-size:11.0pt;font-family:"Calibri",sans-serif'> lldb-dev [mailto:<a href="mailto:lldb-dev-bounces@lists.llvm.org" target="_blank">lldb-dev-bounces@lists.llvm.org</a>] <b>On Behalf Of </b>Russell Greene via lldb-dev</span></span><span style='font-size:11.0pt;font-family:"Calibri",sans-serif'><br><span class=gmailmsg><b>Sent:</b> Sunday, April 02, 2017 4:38 PM</span><br><span class=gmailmsg><b>To:</b> <a href="mailto:lldb-dev@lists.llvm.org" target="_blank">lldb-dev@lists.llvm.org</a></span><br><span class=gmailmsg><b>Subject:</b> [lldb-dev] Using LLDB API on windows</span></span><o:p></o:p></p></div></div></div></div></div><div><div><div style='border:none;border-left:solid blue 1.5pt;padding:0in 0in 0in 4.0pt'><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'> <o:p></o:p></p><div><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'>Hey so I am developing a project using LLDB as a debugger and am looking to make it cross-platform. <o:p></o:p></p><div><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'> <o:p></o:p></p></div><div><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'>As I see it, the LLDB API boots up an instance of lldb-server, but lldb-server isn't available on windows. Is there a way to use the LLDB C++ API on windows? <o:p></o:p></p></div><div><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'> <o:p></o:p></p></div><div><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'>On the <a href="https://lldb.llvm.org/status.html" target="_blank">status page</a> I see the lldb commandline tool is OK for windows, which uses the LLDB API, how is this achieved?<o:p></o:p></p></div><div><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'> <o:p></o:p></p></div><div><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'>-Russell<o:p></o:p></p></div></div></div></div></div></blockquote></div></div></div></body></html>