11 breaking releases

new 0.14.0 Mar 19, 2025
0.12.0 Jan 14, 2025
0.11.0 Aug 21, 2024
0.10.0 Feb 25, 2024
0.0.0 Nov 18, 2021

#170 in Debugging

Download history 20/week @ 2024-11-29 84/week @ 2024-12-06 26/week @ 2024-12-13 7/week @ 2024-12-20 6/week @ 2024-12-27 19/week @ 2025-01-03 178/week @ 2025-01-10 98/week @ 2025-01-17 90/week @ 2025-02-14 2/week @ 2025-02-21 3/week @ 2025-02-28 92/week @ 2025-03-14

97 downloads per month

MIT/Apache

8MB
27K SLoC

Contains (Windows DLL, 3.5MB) .windows/arm64/msdia140.dll, (Windows DLL, 2MB) .windows/x64/msdia140.dll, (Windows DLL, 1.5MB) .windows/x86/msdia140.dll, (DOS exe, 145KB) .windows/winmd/Microsoft.Dia.winmd, (static library, 2KB) .windows/arm64/msdia140.lib, (static library, 2KB) .windows/x64/msdia140.lib and 1 more.

crates.io

Rust for Debug Interface Access (DIA) SDK

The Microsoft Debug Interface Access Software Development Kit (DIA SDK) provides access to debug information stored in program database (.pdb) files generated by Microsoft postcompiler tools.

Start by adding windows-core and microsoft-dia dependencies to Cargo.toml:

[dependencies.windows-core]
version = "0.61"

[dependencies.microsoft-dia]
version = "0.14"

Make use of any DIA SDK APIs as needed.

use microsoft_dia::{nsfRegularExpression, DiaSource, IDiaDataSource, SymTagFunction};
use windows_core::*;

fn main() -> Result<()> {
    unsafe {
        let source: IDiaDataSource = microsoft_dia::helpers::NoRegCoCreate(s!("msdia140.dll"), &DiaSource)?;
        let executable = std::env::current_exe().unwrap();
        source.loadDataForExe(&HSTRING::from(executable.as_os_str()), None, None)?;

        let session = source.openSession()?;
        let symbols = session.globalScope()?.findChildren(SymTagFunction, w!("*"), nsfRegularExpression.0 as u32)?;

        println!("Function symbols found in self: ({}):", &executable.to_string_lossy());

        for i in 0..symbols.Count()? {
            println!("\t{}", symbols.Item(i as u32)?.name()?);
        }

        Ok(())
    }
}

Dependencies

~116MB
~2M SLoC