Repository navigation
Add managed SOS command infrastructure and port threadstate, dumpassembly, and dumpdomain - #6295
Open
max-charlamb wants to merge 4 commits into
Open
max-charlamb wants to merge 4 commits into
max-charlamb wants to merge 4 commits into
Conversation
Reuse the mirrored cDAC COM declarations in SOS.Hosting on .NET 8. Add runtime-scoped DAC proxy ownership, shared address and output helpers, and optional debugger COM services for expressions, dump metadata, and minidump safe mode. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 20509674-cc28-401c-a1fa-0f8dbe23d5f0
Preserve assembly output and accept debugger expressions for the assembly address. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 20509674-cc28-401c-a1fa-0f8dbe23d5f0
Preserve domain enumeration and rendering, and validate explicit zero and debugger expressions. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 20509674-cc28-401c-a1fa-0f8dbe23d5f0
Decode thread-state flags in managed code and cover debugger expressions and zero. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 20509674-cc28-401c-a1fa-0f8dbe23d5f0
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds the shared infrastructure for implementing SOS commands in managed code and ports the first three commands (
threadstate,dumpassembly,dumpdomain) end-to-end as the initial PR of the managed SOS command migration.Infrastructure
ISOSDacInterface,IXCLRData,ICLRData,IMetaDataImport, and marshalling helpers) inSOS.Hosting.RuntimeWrapper.GetSosDac) with explicitComObjectfinal release (ComWrapper.FinalReleaseUniqueProxy).SosDacCommandBase(DAC acquisition, pointer-size-awareAsDacAddress/AsTargetAddress, and expression-aware address parsing) andDacCommandHelpers(DML links, assembly/module/domain formatting).IDebuggerExpressionService/INativeDebuggerExpressionServicein DbgEng (DbgEngServices), LLDB (LLDBServices), andSOS.Extensions(DebuggerComService<T>), and disables response-file expansion inCommandServicefor DbgEng/LLDB so expressions like@$t0pass through.SupportsDmldynamically inConsoleServiceFromDebuggerServices.Ported commands
Each command includes managed implementation,
AnalysisModuleregistration, native DbgEng forwarding stub (managedcommands.cpp), LLDB managed-command routing (lldbplugin/soscommand.cpp), removal of the native Strike implementation, and test coverage:threadstate(ThreadStatealias): non-DAC command that decodes thread-state bitmasks, honoring the debugger expression evaluator and handling0/ invalid input.dumpassembly(DumpAssemblyalias,--dml//d): DAC-backed assembly inspection with parent domain, name, and module listing; preservesMINIDUMP_NOT_SUPPORTED().dumpdomain(DumpDomainalias,--dml//d): DAC-backed AppDomain enumeration and single-domain inspection with system/shared domains, heap addresses, stage, assemblies, and modules; preservesMINIDUMP_NOT_SUPPORTED().Validation
src/SOS/SOS.Extensions/SOS.Extensions.csproj(includingSOS.Hosting,Microsoft.Diagnostics.ExtensionCommands, andMicrosoft.Diagnostics.DebugServices) succeeded with 0 warnings and 0 errors.DumpDomainTests.csandMemoryAndDecodeTests.csfor full CI validation across Windows/Linux/macOS and DbgEng/LLDB/dotnet-dump hosts.