[lldb-dev] Using LLDB API on windows

Ted Woodward via lldb-dev lldb-dev at lists.llvm.org
Mon Apr 3 09:54:11 PDT 2017


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.

 

--

Qualcomm Innovation Center, Inc.

The Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a Linux Foundation Collaborative Project

 

From: Russell Greene [mailto:russellgreene8 at gmail.com] 
Sent: Monday, April 03, 2017 11:24 AM
To: Ted Woodward <ted.woodward at codeaurora.org>; LLDB <lldb-dev at lists.llvm.org>
Subject: Re: [lldb-dev] Using LLDB API on windows

 

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. 

 

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...

 

-Russell

 

On Mon, Apr 3, 2017 at 9:32 AM Ted Woodward <ted.woodward at codeaurora.org <mailto:ted.woodward at codeaurora.org> > wrote:

Hi Russell,

 

I assume you mean for SBTarget::Launch or LaunchSimple to launch a Windows application.

 

The short answer is, this already works.

 

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.

 

See PlatformWindows::DebugProcess in source\Plugins\Platform\Windows\PlatformWindows.cpp and ProcessLauncherWIndows::LaunchProcess in source\Host\windows\ProcessLauncherWindows.cpp .

 

Ted

 

--

Qualcomm Innovation Center, Inc.

The Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a Linux Foundation Collaborative Project

 

From: lldb-dev [mailto:lldb-dev-bounces at lists.llvm.org <mailto:lldb-dev-bounces at lists.llvm.org> ] On Behalf Of Russell Greene via lldb-dev
Sent: Sunday, April 02, 2017 4:38 PM
To: lldb-dev at lists.llvm.org <mailto:lldb-dev at lists.llvm.org> 
Subject: [lldb-dev] Using LLDB API on windows

 

Hey so I am developing a project using LLDB as a debugger and am looking to make it cross-platform. 

 

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? 

 

On the status page <https://lldb.llvm.org/status.html>  I see the lldb commandline tool is OK for windows, which uses the LLDB API, how is this achieved?

 

-Russell

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/lldb-dev/attachments/20170403/49411901/attachment-0001.html>


More information about the lldb-dev mailing list