microsoft / microsoft/WinDbg-Samples

Add samples to operate with ELF-dumps

Open
#115 0 comments 2 reactions 1 assignee View on GitHub

@wmessmer-msft is already working on this.

Since Apr 4, 2025.

Dominant language
C++
Stars
827
Forks
135
PR merge metrics
No merged PRs in 30d

Description

WindDbgX since 1.2402.24001.0 supports ELF-dumps and debuginfod as a symbol-server.
But unfortunately, such feature is not available via dbgeng public API.
It reduces possibilities for automation in some cases.

Following code:

m_libDbgEng.Load(_T("dbgeng.dll"));

typedef HRESULT(__stdcall *PDebugCreate)(REFIID  InterfaceId, PVOID* Interface);
PDebugCreate debugCreate = m_libDbgEng.GetProcAddress<PDebugCreate>("DebugCreate");

ATLENSURE_SUCCEEDED(debugCreate(__uuidof(IDebugClient4), (void**)&m_spClient));
...
ATLENSURE_SUCCEEDED(m_spClient->OpenDumpFile(...));

works well for windows-dumps but for linux-dumps it fails due to invalid file format:

> 
> ************* Path validation summary **************
> Response                         Time (ms)     Location
> Deferred                                       srv**https://mysymbols/symbols
> 
> ************* Preparing the environment for Debugger Extensions Gallery repositories **************
>    ExtensionRepository : Implicit
>    UseExperimentalFeatureForNugetShare : true
>    AllowNugetExeUpdate : true
>    NonInteractiveNuget : true
>    AllowNugetMSCredentialProviderInstall : true
>    AllowParallelInitializationOfLocalRepositories : true
>    EnableRedirectToChakraJsProvider : false
> 
>    -- Configuring repositories
>       ----> Repository : LocalInstalled, Enabled: true
>       ----> Repository : UserExtensions, Enabled: true
> 
> >>>>>>>>>>>>> Preparing the environment for Debugger Extensions Gallery repositories completed, duration 0.031 seconds
> 
> ************* Waiting for Debugger Extensions Gallery to Initialize **************
> 
> >>>>>>>>>>>>> Waiting for Debugger Extensions Gallery to Initialize completed, duration 0.000 seconds
>    ----> Repository : LocalInstalled, Enabled: true, Packages count: 0
>    ----> Repository : UserExtensions, Enabled: true, Packages count: 0
> 
> Microsoft (R) Windows Debugger Version 10.0.27725.1000 AMD64
> Copyright (c) Microsoft Corporation. All rights reserved.
> 
> 
> Loading Dump File [elf.core]
> Could not match Dump File signature - invalid file format
>

It would be nice to provide public API and example of code to operate with ELF-cores.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.