Skip to content

Commit

Permalink
Merge pull request #1267 from microsoft/main
Browse files Browse the repository at this point in the history
Merge 'main' into 'release-cpptools'
  • Loading branch information
WardenGnaw authored Jan 29, 2022
2 parents 4325db0 + c3ea386 commit 997a5da
Show file tree
Hide file tree
Showing 25 changed files with 582 additions and 21 deletions.
18 changes: 18 additions & 0 deletions loc/lcl/CHS/OpenFolderSchema.json.lcl
Original file line number Diff line number Diff line change
Expand Up @@ -865,6 +865,24 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";debugExtensions.cppdbg.schema.definitions.cpp_schema.properties.useExtendedRemote.description" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[If true, use gdb extended-remote mode to connect to gdbserver.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[如果为 true,则使用 gdb 扩展远程模式连接到 gdbserver。]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";debugExtensions.cppdbg.schema.definitions.cpp_schema.properties.useExtendedRemote.type" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[boolean]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[布尔]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";debugExtensions.cppdbg.schema.definitions.cpp_schema.type" ItemType="0" PsrId="306" InstFlg="true" Leaf="true">
<Str Cat="Text" UsrLk="true">
<Val><![CDATA[object]]></Val>
Expand Down
18 changes: 18 additions & 0 deletions loc/lcl/CHT/OpenFolderSchema.json.lcl
Original file line number Diff line number Diff line change
Expand Up @@ -865,6 +865,24 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";debugExtensions.cppdbg.schema.definitions.cpp_schema.properties.useExtendedRemote.description" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[If true, use gdb extended-remote mode to connect to gdbserver.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[若為 true,請使用 gdb 延伸-遠端模式連線至 gdbserver。]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";debugExtensions.cppdbg.schema.definitions.cpp_schema.properties.useExtendedRemote.type" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[boolean]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[布林值]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";debugExtensions.cppdbg.schema.definitions.cpp_schema.type" ItemType="0" PsrId="306" InstFlg="true" Leaf="true">
<Str Cat="Text" UsrLk="true">
<Val><![CDATA[object]]></Val>
Expand Down
18 changes: 18 additions & 0 deletions loc/lcl/CSY/OpenFolderSchema.json.lcl
Original file line number Diff line number Diff line change
Expand Up @@ -865,6 +865,24 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";debugExtensions.cppdbg.schema.definitions.cpp_schema.properties.useExtendedRemote.description" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[If true, use gdb extended-remote mode to connect to gdbserver.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Pokud je nastaveno na true, připojte se k gdbserveru pomocí rozšířeného vzdáleného režimu gdb.]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";debugExtensions.cppdbg.schema.definitions.cpp_schema.properties.useExtendedRemote.type" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[boolean]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[logická hodnota]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";debugExtensions.cppdbg.schema.definitions.cpp_schema.type" ItemType="0" PsrId="306" InstFlg="true" Leaf="true">
<Str Cat="Text" UsrLk="true">
<Val><![CDATA[object]]></Val>
Expand Down
18 changes: 18 additions & 0 deletions loc/lcl/DEU/OpenFolderSchema.json.lcl
Original file line number Diff line number Diff line change
Expand Up @@ -865,6 +865,24 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";debugExtensions.cppdbg.schema.definitions.cpp_schema.properties.useExtendedRemote.description" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[If true, use gdb extended-remote mode to connect to gdbserver.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Wenn TRUE, verwenden Sie den erweiterten gdb-Remotemodus, um eine Verbindung mit dem gdbserver herzustellen.]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";debugExtensions.cppdbg.schema.definitions.cpp_schema.properties.useExtendedRemote.type" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[boolean]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[boolesch]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";debugExtensions.cppdbg.schema.definitions.cpp_schema.type" ItemType="0" PsrId="306" InstFlg="true" Leaf="true">
<Str Cat="Text" UsrLk="true">
<Val><![CDATA[object]]></Val>
Expand Down
18 changes: 18 additions & 0 deletions loc/lcl/ESN/OpenFolderSchema.json.lcl
Original file line number Diff line number Diff line change
Expand Up @@ -814,6 +814,24 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";debugExtensions.cppdbg.schema.definitions.cpp_schema.properties.useExtendedRemote.description" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[If true, use gdb extended-remote mode to connect to gdbserver.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Si es true, use el modo extended-remote de gdb para conectarse a gdbserver.]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";debugExtensions.cppdbg.schema.definitions.cpp_schema.properties.useExtendedRemote.type" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[boolean]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[booleano]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";debugExtensions.cppdbg.schema.definitions.cpp_schema.type" ItemType="0" PsrId="306" InstFlg="true" Leaf="true">
<Str Cat="Text" UsrLk="true">
<Val><![CDATA[object]]></Val>
Expand Down
18 changes: 18 additions & 0 deletions loc/lcl/JPN/OpenFolderSchema.json.lcl
Original file line number Diff line number Diff line change
Expand Up @@ -865,6 +865,24 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";debugExtensions.cppdbg.schema.definitions.cpp_schema.properties.useExtendedRemote.description" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[If true, use gdb extended-remote mode to connect to gdbserver.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[true の場合、gdb 拡張リモート モードを使用して gdbserver に接続します。]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";debugExtensions.cppdbg.schema.definitions.cpp_schema.properties.useExtendedRemote.type" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[boolean]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[ブール値]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";debugExtensions.cppdbg.schema.definitions.cpp_schema.type" ItemType="0" PsrId="306" InstFlg="true" Leaf="true">
<Str Cat="Text" UsrLk="true">
<Val><![CDATA[object]]></Val>
Expand Down
18 changes: 18 additions & 0 deletions loc/lcl/KOR/OpenFolderSchema.json.lcl
Original file line number Diff line number Diff line change
Expand Up @@ -865,6 +865,24 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";debugExtensions.cppdbg.schema.definitions.cpp_schema.properties.useExtendedRemote.description" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[If true, use gdb extended-remote mode to connect to gdbserver.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[true이면 gdb 확장 원격 모드를 사용하여 gdbserver에 연결합니다.]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";debugExtensions.cppdbg.schema.definitions.cpp_schema.properties.useExtendedRemote.type" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[boolean]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[부울]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";debugExtensions.cppdbg.schema.definitions.cpp_schema.type" ItemType="0" PsrId="306" InstFlg="true" Leaf="true">
<Str Cat="Text" UsrLk="true">
<Val><![CDATA[object]]></Val>
Expand Down
18 changes: 18 additions & 0 deletions loc/lcl/RUS/OpenFolderSchema.json.lcl
Original file line number Diff line number Diff line change
Expand Up @@ -814,6 +814,24 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";debugExtensions.cppdbg.schema.definitions.cpp_schema.properties.useExtendedRemote.description" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[If true, use gdb extended-remote mode to connect to gdbserver.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Если присвоено значение true, используйте расширенный удаленный режим gdb для подключения к gdbserver.]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";debugExtensions.cppdbg.schema.definitions.cpp_schema.properties.useExtendedRemote.type" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[boolean]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[логический]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";debugExtensions.cppdbg.schema.definitions.cpp_schema.type" ItemType="0" PsrId="306" InstFlg="true" Leaf="true">
<Str Cat="Text" UsrLk="true">
<Val><![CDATA[object]]></Val>
Expand Down
5 changes: 3 additions & 2 deletions src/DebugEngineHost.VSCode/HostMarshal.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
using Microsoft.DebugEngineHost.VSCode;
using Microsoft.VisualStudio.Debugger.Interop;
using System;
using System.Runtime.InteropServices;

namespace Microsoft.DebugEngineHost
{
Expand Down Expand Up @@ -110,7 +111,7 @@ public static IDebugFunctionPosition2 GetDebugFunctionPositionForIntPtr(IntPtr f
/// <returns></returns>
public static string GetDataBreakpointStringForIntPtr(IntPtr stringId)
{
throw new NotImplementedException();
return Marshal.PtrToStringBSTR(stringId);
}

/// <summary>
Expand All @@ -120,7 +121,7 @@ public static string GetDataBreakpointStringForIntPtr(IntPtr stringId)
/// <returns>IntPtr to a BSTR which can be returned to VS.</returns>
public static IntPtr GetIntPtrForDataBreakpointAddress(string address)
{
throw new NotImplementedException();
return Marshal.StringToBSTR(address);
}

/// <summary>
Expand Down
7 changes: 7 additions & 0 deletions src/DebugEngineHost.VSCode/VSCode/EngineConfiguration.cs
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ public sealed class EngineConfiguration
private bool _conditionalBP;
private bool _functionBP;
private bool _clipboardContext;
private bool _dataBP;

// NOTE: CoreCLR doesn't support providing a code base when loading assemblies. So all debug engines
// must be placed in the directory of OpenDebugAD7.exe
Expand Down Expand Up @@ -74,6 +75,12 @@ public bool ClipboardContext
set { SetProperty(out _clipboardContext, value); }
}

public bool DataBP
{
get { return _dataBP; }
set { SetProperty(out _dataBP, value); }
}


/// <summary>
/// Provides the directory of the debug adapter. This is the directory where
Expand Down
2 changes: 1 addition & 1 deletion src/IOSDebugLauncher/Launcher.cs
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ void IPlatformAppLauncher.SetupForDebugging(out LaunchOptions debuggerLaunchOpti
return _client.ServerCertificateValidationCallback(sender, (X509Certificate)certificate, (X509Chain)chain, sslPolicyErrors);
};
}

debuggerLaunchOptions.TargetArchitecture = _launchOptions.TargetArchitecture;
debuggerLaunchOptions.AdditionalSOLibSearchPath = _launchOptions.AdditionalSOLibSearchPath;
debuggerLaunchOptions.DebuggerMIMode = MIMode.Lldb;
Expand Down
10 changes: 10 additions & 0 deletions src/MICore/JsonLaunchOptions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,12 @@ public abstract partial class BaseOptions
[JsonProperty("miDebuggerServerAddress", DefaultValueHandling = DefaultValueHandling.Ignore)]
public string MiDebuggerServerAddress { get; set; }

/// <summary>
/// If true, use gdb extended-remote mode to connect to gdbserver.
/// </summary>
[JsonProperty("useExtendedRemote", DefaultValueHandling = DefaultValueHandling.Ignore)]
public bool? UseExtendedRemote { get; set; }

/// <summary>
/// Optional source file mappings passed to the debug engine. Example: '{ "/original/source/path":"/current/source/path" }'
/// </summary>
Expand Down Expand Up @@ -137,6 +143,7 @@ public AttachOptions(
string miDebuggerPath = null,
string miDebuggerArgs = null,
string miDebuggerServerAddress = null,
bool? useExtendedRemote = null,
HardwareBreakpointInfo hardwareBreakpointInfo = null,
Dictionary<string, object> sourceFileMap = null,
PipeTransport pipeTransport = null,
Expand All @@ -152,6 +159,7 @@ public AttachOptions(
this.MiDebuggerPath = miDebuggerPath;
this.MiDebuggerArgs = miDebuggerArgs;
this.MiDebuggerServerAddress = miDebuggerServerAddress;
this.UseExtendedRemote = useExtendedRemote;
this.ProcessId = processId;
this.HardwareBreakpointInfo = hardwareBreakpointInfo;
this.SourceFileMap = sourceFileMap;
Expand Down Expand Up @@ -390,6 +398,7 @@ public LaunchOptions(
string miDebuggerPath = null,
string miDebuggerArgs = null,
string miDebuggerServerAddress = null,
bool? useExtendedRemote = null,
bool? stopAtEntry = null,
string debugServerPath = null,
string debugServerArgs = null,
Expand Down Expand Up @@ -421,6 +430,7 @@ public LaunchOptions(
this.MiDebuggerPath = miDebuggerPath;
this.MiDebuggerArgs = miDebuggerArgs;
this.MiDebuggerServerAddress = miDebuggerServerAddress;
this.UseExtendedRemote = useExtendedRemote;
this.StopAtEntry = stopAtEntry;
this.DebugServerPath = debugServerPath;
this.DebugServerArgs = debugServerArgs;
Expand Down
23 changes: 21 additions & 2 deletions src/MICore/LaunchOptions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -443,6 +443,18 @@ public LocalLaunchOptions(string MIDebuggerPath, string MIDebuggerServerAddress,
this.MIDebuggerArgs = MIDebuggerArgs;
}

public LocalLaunchOptions(string MIDebuggerPath, string MIDebuggerServerAddress, bool UseExtendedRemote) :
this(MIDebuggerPath, MIDebuggerServerAddress)
{
this.UseExtendedRemote = UseExtendedRemote;
}

public LocalLaunchOptions(string MIDebuggerPath, string MIDebuggerServerAddress, string MIDebuggerArgs, bool UseExtendedRemote) :
this(MIDebuggerPath, MIDebuggerServerAddress, MIDebuggerArgs)
{
this.UseExtendedRemote = UseExtendedRemote;
}

private void InitializeServerOptions(Json.LaunchOptions.LaunchOptions launchOptions)
{
if (!String.IsNullOrWhiteSpace(launchOptions.DebugServerPath))
Expand Down Expand Up @@ -533,7 +545,8 @@ static internal LocalLaunchOptions CreateFromJson(JObject parsedOptions)

LocalLaunchOptions localLaunchOptions = new LocalLaunchOptions(RequireAttribute(miDebuggerPath, nameof(miDebuggerPath)),
launchOptions.MiDebuggerServerAddress,
launchOptions.MiDebuggerArgs
launchOptions.MiDebuggerArgs,
launchOptions.UseExtendedRemote.GetValueOrDefault(false)
);

// Load up common options
Expand Down Expand Up @@ -561,7 +574,8 @@ static internal LocalLaunchOptions CreateFromXml(Xml.LaunchOptions.LocalLaunchOp
var options = new LocalLaunchOptions(
RequireAttribute(miDebuggerPath, "MIDebuggerPath"),
source.MIDebuggerServerAddress,
source.MIDebuggerArgs);
source.MIDebuggerArgs,
source.UseExtendedRemote);
options.InitializeCommonOptions(source);
options.InitializeServerOptions(source);
options._useExternalConsole = source.ExternalConsole;
Expand Down Expand Up @@ -666,6 +680,11 @@ private static string EnsureDebuggerPath(string miDebuggerPath, string debuggerB
/// </summary>
public string MIDebuggerServerAddress { get; private set; }

/// <summary>
/// [Optional] If true, use gdb extended-remote mode to connect to gdbserver.
/// </summary>
public bool UseExtendedRemote { get; private set; }

/// <summary>
/// [Optional] MI Debugger Server exe, if non-null then the MIEngine will start the debug server before starting the debugger
/// </summary>
Expand Down
5 changes: 5 additions & 0 deletions src/MICore/LaunchOptions.xsd
Original file line number Diff line number Diff line change
Expand Up @@ -230,6 +230,11 @@
<xs:documentation>Network address of the MI Debugger Server to connect to (example: localhost:1234).</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="UseExtendedRemote" type="xs:boolean" use="optional">
<xs:annotation>
<xs:documentation>If true, use gdb extended-remote mode to connect to gdbserver.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="DebugServer" type="xs:string" use="optional">
<xs:annotation>
<xs:documentation>Full path to the server executable. If non-null then the MIEngine will start the server.</xs:documentation>
Expand Down
6 changes: 5 additions & 1 deletion src/MICore/LaunchOptions.xsd.types.designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 997a5da

Please sign in to comment.