llvm-project icon indicating copy to clipboard operation
llvm-project copied to clipboard

32-bit lldb cannot debug a 64-bit application on Windows

Open amccarth-google opened this issue 7 years ago • 3 comments

Bugzilla Link 40697
Resolution WONTFIX
Resolved on Mar 08, 2019 12:55
Version unspecified
OS Windows NT

Extended Description

If you try to launch a GUI application on Windows, lldb reports:

error: process launch failed: The request is not supported.

It works when trying to launch a console (tty) application. The problem seems related to the fact that there aren't standard I/O handles in a typical GUI application, causing a complaint in FinalizeFileActions in Target::Launch.

amccarth-google avatar Feb 12 '19 00:02 amccarth-google

There's nothing practical to be done at this time.

If running 64-bit inferiors from a 32-bit lldb becomes important in the future, lldb will have to have a 64-bit helper process.

amccarth-google avatar Mar 08 '19 20:03 amccarth-google

GUI/Console and the standard i/o handles appear to be irrelevant.

The limitation seems to be that a 32-bit process on Windows (like lldb) cannot call CreateProcess to launch a 64-bit process for debugging. I've updated the bug title to reflect this.

I've not found supporting documentation, but that's consistent with all my experiments so far. The Visual Studio debugger is a 64-bit helper application driven by the 32-bit IDE. That may indeed be because of this limitation.

A 64-bit lldb can launch and debug 32- or 64-bit targets. So the simple answer may be to always use 64-bit lldb on Windows, but I want to think on it some more and run some more experiments (and to give the community a chance to tell me I'm wrong and point out my error).

amccarth-google avatar Feb 21 '19 00:02 amccarth-google

assigned to @amccarth-google

amccarth-google avatar Feb 12 '19 00:02 amccarth-google