diff --git a/src/MIDebugEngine/AD7.Impl/AD7Engine.cs b/src/MIDebugEngine/AD7.Impl/AD7Engine.cs index a99f43dd4..82f2b2dc8 100755 --- a/src/MIDebugEngine/AD7.Impl/AD7Engine.cs +++ b/src/MIDebugEngine/AD7.Impl/AD7Engine.cs @@ -270,9 +270,12 @@ private LaunchOptions CreateAttachLaunchOptions(uint processId, IDebugPort2 port { miMode = MIMode.Gdb; } + else if (_engineGuid == EngineConstants.LldbEngine) + { + miMode = MIMode.Lldb; + } else { - // TODO: LLDB support throw new NotImplementedException(); } diff --git a/src/MIDebugEngine/AD7.Impl/EngineConstants.cs b/src/MIDebugEngine/AD7.Impl/EngineConstants.cs index 880e29167..2bff3f6b4 100644 --- a/src/MIDebugEngine/AD7.Impl/EngineConstants.cs +++ b/src/MIDebugEngine/AD7.Impl/EngineConstants.cs @@ -16,5 +16,7 @@ static public class EngineConstants public static readonly Guid EngineId = new Guid("{ea6637c6-17df-45b5-a183-0951c54243bc}"); public static readonly Guid GdbEngine = new Guid("{91744D97-430F-42C1-9779-A5813EBD6AB2}"); + + public static readonly Guid LldbEngine = new Guid("{5D630903-189D-4837-9785-699B05BEC2A9}"); } } diff --git a/src/MIDebugEngine/Microsoft.MIDebugEngine.pkgdef b/src/MIDebugEngine/Microsoft.MIDebugEngine.pkgdef index 291799c05..2f2359ffd 100644 --- a/src/MIDebugEngine/Microsoft.MIDebugEngine.pkgdef +++ b/src/MIDebugEngine/Microsoft.MIDebugEngine.pkgdef @@ -55,6 +55,37 @@ ; WSL Port supplier "2"="{267B1341-AC92-44DC-94DF-2EE4205DD17E}" +; Registration to use lldb with the port suppliers +[$RootKey$\AD7Metrics\Engine\{5D630903-189D-4837-9785-699B05BEC2A9}] +@="MI Debug Engine - lldb" +"Attach"=dword:00000001 +; "AddressBP"=dword:00000001 +"AlwaysLoadLocal"=dword:00000001 +; "CallStackBP"=dword:00000001 +; "ConditionalBP"=dword:00000001 +"DataBP"=dword:00000000 +"Disassembly"=dword:00000001 +"EnginePriority"=dword:00000050 +"Exceptions"=dword:00000001 +; "FunctionBP"=dword:00000001 +; "HitCountBP"=dword:00000000 +; "JustMyCodeStepping"=dword:00000001 +"Name"="Native (LLDB)" +"SetNextStatement"=dword:00000001 +; "SuspendThread"=dword:00000001 +"CLSID"="{0fc2f352-2fc1-4f80-8736-51cd1ab28f16}" +"GlobalVisualizersDirectory"="$PackageFolder$" +"BreakWhenValueChanges"=dword:00000000 +"DataBPAsString"=dword:00000000 + +[$RootKey$\AD7Metrics\Engine\{5D630903-189D-4837-9785-699B05BEC2A9}\PortSupplier] +; SSH Port Supplier +"0"="{3FDDF14E-E758-4695-BE0C-7509920432C9}" + +[$RootKey$\AD7Metrics\Engine\{5D630903-189D-4837-9785-699B05BEC2A9}\IncompatibleList] +"MI Debug Engine - gdb"="{91744D97-430F-42C1-9779-A5813EBD6AB2}" +"vsdbg"="{EF9CD3BB-2C0E-41AD-B54C-63006BC09D19}" + [$RootKey$\OpenFolder\Settings\VSWorkspaceSettings\{EA6637C6-17DF-45B5-A183-0951C54243BC}] @="$PackageFolder$\OpenFolderSchema.json" diff --git a/src/SSHDebugPS/AD7/AD7UnixAsyncShellCommand.cs b/src/SSHDebugPS/AD7/AD7UnixAsyncShellCommand.cs index 1c37becc3..38ad66405 100644 --- a/src/SSHDebugPS/AD7/AD7UnixAsyncShellCommand.cs +++ b/src/SSHDebugPS/AD7/AD7UnixAsyncShellCommand.cs @@ -62,9 +62,10 @@ protected override void OnOutputReceived(object sender, string e) if (_startCommand != null) { - if (line.EndsWith(_startCommand, StringComparison.Ordinal)) + if (line.Contains(_startCommand)) { - // When logged in as root, shell sends a copy of stdin to stdout. + // When logged in as root, shell sends a copy of stdin to stdout. On MacOS + // trailing control characters appear on the line. // This ignores the shell command that was used to launch the debugger. continue; }