32-bit lldb cannot debug a 64-bit application on Windows
| 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.
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.
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).
assigned to @amccarth-google