From a82ea6cf3f333780a85159bd6fcf3a555eab0d3d Mon Sep 17 00:00:00 2001 From: Andrew Wang Date: Fri, 5 Jun 2026 17:37:04 -0700 Subject: [PATCH 1/2] Disable debuginfod by default Change the default for debuginfod from enabled to disabled based on feedback from partner teams. Users can still opt-in by explicitly setting "debuginfod": { "enabled": true } in their launch configuration. Additionally, send an explicit "set debuginfod enabled off" command to GDB when disabled, ensuring debuginfod is fully turned off regardless of GDB config files or system defaults. --- loc/lci/OpenFolderSchema.json.lci | 2 +- src/MICore/JsonLaunchOptions.cs | 2 +- src/MICore/LaunchOptions.cs | 6 +++--- src/MICore/LaunchOptions.xsd | 6 +++--- src/MICore/LaunchOptions.xsd.types.designer.cs | 12 ++++++------ src/MIDebugEngine/Engine.Impl/DebuggedProcess.cs | 4 ++++ src/MIDebugPackage/OpenFolderSchema.json | 6 +++--- 7 files changed, 21 insertions(+), 17 deletions(-) diff --git a/loc/lci/OpenFolderSchema.json.lci b/loc/lci/OpenFolderSchema.json.lci index 25e6a02c5..5db781f7e 100644 --- a/loc/lci/OpenFolderSchema.json.lci +++ b/loc/lci/OpenFolderSchema.json.lci @@ -408,7 +408,7 @@ - + diff --git a/src/MICore/JsonLaunchOptions.cs b/src/MICore/JsonLaunchOptions.cs index 6f872157e..f34021960 100644 --- a/src/MICore/JsonLaunchOptions.cs +++ b/src/MICore/JsonLaunchOptions.cs @@ -324,7 +324,7 @@ public enum UnknownBreakpointHandling public partial class DebuginfodSettings { /// - /// If true (default), GDB's debuginfod support is enabled. + /// If true, GDB's debuginfod support is enabled. Default is false. /// [JsonProperty("enabled")] public bool? Enabled { get; set; } diff --git a/src/MICore/LaunchOptions.cs b/src/MICore/LaunchOptions.cs index c53bc89d0..2a8594fe7 100644 --- a/src/MICore/LaunchOptions.cs +++ b/src/MICore/LaunchOptions.cs @@ -1224,10 +1224,10 @@ public UnknownBreakpointHandling UnknownBreakpointHandling } } - private bool _enableDebuginfod = true; + private bool _enableDebuginfod = false; /// - /// If true (default), GDB's debuginfod support is enabled. + /// If true, GDB's debuginfod support is enabled. Default is false. /// public bool EnableDebuginfod { @@ -1912,7 +1912,7 @@ protected void InitializeCommonOptions(Json.LaunchOptions.BaseOptions options) } this.UnknownBreakpointHandling = options.UnknownBreakpointHandling ?? UnknownBreakpointHandling.Throw; - this.EnableDebuginfod = options.Debuginfod?.Enabled ?? true; + this.EnableDebuginfod = options.Debuginfod?.Enabled ?? false; int debuginfodTimeout = options.Debuginfod?.Timeout ?? 30; this.DebuginfodTimeout = debuginfodTimeout >= 0 ? debuginfodTimeout : 30; } diff --git a/src/MICore/LaunchOptions.xsd b/src/MICore/LaunchOptions.xsd index 5449b012e..6f84e776c 100644 --- a/src/MICore/LaunchOptions.xsd +++ b/src/MICore/LaunchOptions.xsd @@ -207,11 +207,11 @@ - + - If true (default), GDB's debuginfod support is enabled, allowing automatic downloading of debug symbols. - Set to false to disable debuginfod, which can prevent GDB from hanging when debuginfod servers are unavailable. + If true, GDB's debuginfod support is enabled, allowing automatic downloading of debug symbols. + Set to true to enable debuginfod. Default is false. diff --git a/src/MICore/LaunchOptions.xsd.types.designer.cs b/src/MICore/LaunchOptions.xsd.types.designer.cs index ab1b8c954..b4d238504 100644 --- a/src/MICore/LaunchOptions.xsd.types.designer.cs +++ b/src/MICore/LaunchOptions.xsd.types.designer.cs @@ -101,7 +101,7 @@ public partial class AndroidLaunchOptions { /// [System.Xml.Serialization.XmlAttributeAttribute()] - [System.ComponentModel.DefaultValueAttribute(true)] + [System.ComponentModel.DefaultValueAttribute(false)] public bool EnableDebuginfod; /// @@ -115,7 +115,7 @@ public AndroidLaunchOptions() { this.JVMPort = 65534; this.JVMHost = "localhost"; this.WaitDynamicLibLoad = true; - this.EnableDebuginfod = true; + this.EnableDebuginfod = false; this.DebuginfodTimeout = 30; } } @@ -468,7 +468,7 @@ public partial class BaseLaunchOptions { /// [System.Xml.Serialization.XmlAttributeAttribute()] - [System.ComponentModel.DefaultValueAttribute(true)] + [System.ComponentModel.DefaultValueAttribute(false)] public bool EnableDebuginfod; /// @@ -478,7 +478,7 @@ public partial class BaseLaunchOptions { public BaseLaunchOptions() { this.WaitDynamicLibLoad = true; - this.EnableDebuginfod = true; + this.EnableDebuginfod = false; this.DebuginfodTimeout = 30; } } @@ -562,7 +562,7 @@ public partial class IOSLaunchOptions { /// [System.Xml.Serialization.XmlAttributeAttribute()] - [System.ComponentModel.DefaultValueAttribute(true)] + [System.ComponentModel.DefaultValueAttribute(false)] public bool EnableDebuginfod; /// @@ -572,7 +572,7 @@ public partial class IOSLaunchOptions { public IOSLaunchOptions() { this.WaitDynamicLibLoad = true; - this.EnableDebuginfod = true; + this.EnableDebuginfod = false; this.DebuginfodTimeout = 30; } } diff --git a/src/MIDebugEngine/Engine.Impl/DebuggedProcess.cs b/src/MIDebugEngine/Engine.Impl/DebuggedProcess.cs index b5e8d1bd3..804709bc2 100755 --- a/src/MIDebugEngine/Engine.Impl/DebuggedProcess.cs +++ b/src/MIDebugEngine/Engine.Impl/DebuggedProcess.cs @@ -628,6 +628,10 @@ private async Task> GetInitializeCommands() { commands.Add(new LaunchCommand("set debuginfod enabled on", ignoreFailures: true)); } + else + { + commands.Add(new LaunchCommand("set debuginfod enabled off", ignoreFailures: true)); + } } // When user specifies loading directives then the debugger cannot auto load symbols, the MIEngine must intervene at each solib-load event and make a determination diff --git a/src/MIDebugPackage/OpenFolderSchema.json b/src/MIDebugPackage/OpenFolderSchema.json index 0039be008..379da0db3 100644 --- a/src/MIDebugPackage/OpenFolderSchema.json +++ b/src/MIDebugPackage/OpenFolderSchema.json @@ -197,12 +197,12 @@ "debuginfod": { "type": "object", "description": "Controls GDB's debuginfod behavior for automatic downloading of debug symbols.", - "default": { "enabled": true, "timeout": 30 }, + "default": { "enabled": false, "timeout": 30 }, "properties": { "enabled": { "type": "boolean", - "description": "If true (default), GDB's debuginfod support is enabled. Set to false to disable debuginfod, which can prevent GDB from hanging when debuginfod servers are unavailable.", - "default": true + "description": "If true, GDB's debuginfod support is enabled. Set to true to enable debuginfod. Default is false.", + "default": false }, "timeout": { "type": "integer", From bb8f871e2d45313e0ceb6dd8f0419a0eb8c68f65 Mon Sep 17 00:00:00 2001 From: Andrew Wang Date: Sat, 6 Jun 2026 11:00:47 -0700 Subject: [PATCH 2/2] Fix tests --- test/CppTests/Tests/DebuginfodTests.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/test/CppTests/Tests/DebuginfodTests.cs b/test/CppTests/Tests/DebuginfodTests.cs index b14dae27b..176fc2a18 100644 --- a/test/CppTests/Tests/DebuginfodTests.cs +++ b/test/CppTests/Tests/DebuginfodTests.cs @@ -108,7 +108,8 @@ public void DebuginfodDisabledDoesNotHang(ITestSettings settings) { string logContent = File.ReadAllText(engineLogPath); this.Comment("Verifying debuginfod was NOT enabled in GDB"); - Assert.DoesNotContain("debuginfod enabled", logContent); + Assert.DoesNotContain("set debuginfod enabled on", logContent); + Assert.Contains("set debuginfod enabled off", logContent); } } finally