diff --git a/CHANGELOG.md b/CHANGELOG.md index f8a4d5027..4fc1167ff 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,18 +7,21 @@ - `PortablePdbDebugSession` now returns files referenced in the Portable PDB file. ([#729](https://github.com/getsentry/symbolic/pull/729)) - `PortablePdbDebugSession` now returns source files embedded in the Portable PDB file. ([#734](https://github.com/getsentry/symbolic/pull/734)) - Implement `symbolic_common::AsSelf` `for SourceMapCache` ([#742](https://github.com/getsentry/symbolic/pull/742)) +- Debug information can now be retrieved from PE's with DWARF debug info. ([#744](https://github.com/getsentry/symbolic/pull/744)) **Breaking changes**: - Demangling functionality is removed from C and Python bindings. ([#730](https://github.com/getsentry/symbolic/pull/730)) - The fields of `FileInfo` and the `compilation_dir` field on `FileEntry` are now private. ([#729](https://github.com/getsentry/symbolic/pull/729)) - `PortablePdbDebugSession` now has a lifetime parameter. ([#729](https://github.com/getsentry/symbolic/pull/729)) +- `PeDebugSession` placeholder has been removed. ([#744](https://github.com/getsentry/symbolic/pull/744)) **Thank you**: Features, fixes and improvements in this release have been contributed by: - [@vaind](https://github.com/vaind) +- [@casept](https://github.com/casept) ## 10.2.1 diff --git a/README.md b/README.md index 7272dc75d..85dafc9a9 100644 --- a/README.md +++ b/README.md @@ -18,7 +18,7 @@ Symbolic provides the following functionality: - Symbolication based on custom cache files (symcache) - Symbol cache file generators from: - Mach, ELF and PE symbol tables - - Mach and ELF embedded DWARF data + - Mach, ELF and PE embedded DWARF data - PDB CodeView debug information - Breakpad symbol files - Demangling support diff --git a/symbolic-debuginfo/src/dwarf.rs b/symbolic-debuginfo/src/dwarf.rs index b2b19c753..30d0ffc5e 100644 --- a/symbolic-debuginfo/src/dwarf.rs +++ b/symbolic-debuginfo/src/dwarf.rs @@ -1,11 +1,13 @@ //! Support for DWARF debugging information, common to ELF and MachO. +//! In rare cases, PE's may contain it as well. //! -//! The central element of this module is the [`Dwarf`] trait, which is implemented by [`ElfObject`] -//! and [`MachObject`]. The dwarf debug session object can be obtained via getters on those types. +//! The central element of this module is the [`Dwarf`] trait, which is implemented by [`ElfObject`], +//! [`MachObject`] and [`PeObject`]. The dwarf debug session object can be obtained via getters on those types. //! //! [`Dwarf`]: trait.Dwarf.html //! [`ElfObject`]: ../elf/struct.ElfObject.html //! [`MachObject`]: ../macho/struct.MachObject.html +//! [`PeObject`]: ../pe/struct.PeObject.html use std::borrow::Cow; use std::collections::BTreeSet; diff --git a/symbolic-debuginfo/src/object.rs b/symbolic-debuginfo/src/object.rs index c69794983..7c98c0894 100644 --- a/symbolic-debuginfo/src/object.rs +++ b/symbolic-debuginfo/src/object.rs @@ -331,7 +331,7 @@ impl<'data> Object<'data> { .map_err(ObjectError::transparent), Object::Pe(ref o) => o .debug_session() - .map(ObjectDebugSession::Pe) + .map(ObjectDebugSession::Dwarf) .map_err(ObjectError::transparent), Object::SourceBundle(ref o) => o .debug_session() @@ -446,7 +446,6 @@ pub enum ObjectDebugSession<'d> { Breakpad(BreakpadDebugSession<'d>), Dwarf(DwarfDebugSession<'d>), Pdb(PdbDebugSession<'d>), - Pe(PeDebugSession<'d>), SourceBundle(SourceBundleDebugSession<'d>), PortablePdb(PortablePdbDebugSession<'d>), } @@ -464,7 +463,6 @@ impl<'d> ObjectDebugSession<'d> { ObjectDebugSession::Breakpad(ref s) => ObjectFunctionIterator::Breakpad(s.functions()), ObjectDebugSession::Dwarf(ref s) => ObjectFunctionIterator::Dwarf(s.functions()), ObjectDebugSession::Pdb(ref s) => ObjectFunctionIterator::Pdb(s.functions()), - ObjectDebugSession::Pe(ref s) => ObjectFunctionIterator::Pe(s.functions()), ObjectDebugSession::SourceBundle(ref s) => { ObjectFunctionIterator::SourceBundle(s.functions()) } @@ -480,7 +478,6 @@ impl<'d> ObjectDebugSession<'d> { ObjectDebugSession::Breakpad(ref s) => ObjectFileIterator::Breakpad(s.files()), ObjectDebugSession::Dwarf(ref s) => ObjectFileIterator::Dwarf(s.files()), ObjectDebugSession::Pdb(ref s) => ObjectFileIterator::Pdb(s.files()), - ObjectDebugSession::Pe(ref s) => ObjectFileIterator::Pe(s.files()), ObjectDebugSession::SourceBundle(ref s) => ObjectFileIterator::SourceBundle(s.files()), ObjectDebugSession::PortablePdb(ref s) => ObjectFileIterator::PortablePdb(s.files()), } @@ -500,9 +497,6 @@ impl<'d> ObjectDebugSession<'d> { ObjectDebugSession::Pdb(ref s) => { s.source_by_path(path).map_err(ObjectError::transparent) } - ObjectDebugSession::Pe(ref s) => { - s.source_by_path(path).map_err(ObjectError::transparent) - } ObjectDebugSession::SourceBundle(ref s) => { s.source_by_path(path).map_err(ObjectError::transparent) } @@ -537,7 +531,6 @@ pub enum ObjectFunctionIterator<'s> { Breakpad(BreakpadFunctionIterator<'s>), Dwarf(DwarfFunctionIterator<'s>), Pdb(PdbFunctionIterator<'s>), - Pe(PeFunctionIterator<'s>), SourceBundle(SourceBundleFunctionIterator<'s>), PortablePdb(PortablePdbFunctionIterator<'s>), } @@ -556,9 +549,6 @@ impl<'s> Iterator for ObjectFunctionIterator<'s> { ObjectFunctionIterator::Pdb(ref mut i) => { Some(i.next()?.map_err(ObjectError::transparent)) } - ObjectFunctionIterator::Pe(ref mut i) => { - Some(i.next()?.map_err(ObjectError::transparent)) - } ObjectFunctionIterator::SourceBundle(ref mut i) => { Some(i.next()?.map_err(ObjectError::transparent)) } @@ -576,7 +566,6 @@ pub enum ObjectFileIterator<'s> { Breakpad(BreakpadFileIterator<'s>), Dwarf(DwarfFileIterator<'s>), Pdb(PdbFileIterator<'s>), - Pe(PeFileIterator<'s>), SourceBundle(SourceBundleFileIterator<'s>), PortablePdb(PortablePdbFileIterator<'s>), } @@ -593,7 +582,6 @@ impl<'s> Iterator for ObjectFileIterator<'s> { Some(i.next()?.map_err(ObjectError::transparent)) } ObjectFileIterator::Pdb(ref mut i) => Some(i.next()?.map_err(ObjectError::transparent)), - ObjectFileIterator::Pe(ref mut i) => Some(i.next()?.map_err(ObjectError::transparent)), ObjectFileIterator::SourceBundle(ref mut i) => { Some(i.next()?.map_err(ObjectError::transparent)) } diff --git a/symbolic-debuginfo/src/pe.rs b/symbolic-debuginfo/src/pe.rs index f61abdff5..9e0e88f9c 100644 --- a/symbolic-debuginfo/src/pe.rs +++ b/symbolic-debuginfo/src/pe.rs @@ -3,14 +3,15 @@ use std::borrow::Cow; use std::error::Error; use std::fmt; -use std::marker::PhantomData; +use gimli::RunTimeEndian; use goblin::pe; use thiserror::Error; use symbolic_common::{Arch, AsSelf, CodeId, DebugId, Uuid}; use crate::base::*; +use crate::dwarf::*; use crate::Parse; pub use goblin::pe::exception::*; @@ -59,7 +60,8 @@ fn is_pe_stub(pe: &pe::PE<'_>) -> bool { /// container, [`PdbObject`]. The PE file contains a reference to the PDB and vice versa to verify /// that the files belong together. /// -/// While in rare instances, PE files might contain debug information, this case is not supported. +/// In rare instances, PE files might contain debug information. +/// This is supported for DWARF debug information. /// /// [`PdbObject`]: ../pdb/struct.PdbObject.html pub struct PeObject<'data> { @@ -108,7 +110,7 @@ impl<'data> PeObject<'data> { /// The debug information identifier of this PE. /// - /// Since debug information is stored in an external + /// Since debug information is usually stored in an external /// [`PdbObject`](crate::pdb::PdbObject), this identifier actually refers to the /// PDB. While strictly the filename of the PDB would also be necessary fully resolve /// it, in most instances the GUID and age contained in this identifier are sufficient. @@ -194,9 +196,10 @@ impl<'data> PeObject<'data> { /// Determines whether this object contains debug information. /// - /// This is always `false`, as debug information is not supported for PE files. + /// Not usually the case, except for PE's generated by some alternative toolchains + /// which contain DWARF debug info. pub fn has_debug_info(&self) -> bool { - false + self.section(".debug_info").is_some() } /// Determines whether this object contains embedded source. @@ -209,9 +212,21 @@ impl<'data> PeObject<'data> { false } - /// Constructs a no-op debugging session. - pub fn debug_session(&self) -> Result, PeError> { - Ok(PeDebugSession { _ph: PhantomData }) + /// Constructs a debugging session. + /// + /// A debugging session loads certain information from the object file and creates caches for + /// efficient access to various records in the debug information. Since this can be quite a + /// costly process, try to reuse the debugging session as long as possible. + /// + /// PE files usually don't have embedded debugging information, + /// but some toolchains (e.g. MinGW) generate DWARF debug info. + /// + /// Constructing this session will also work if the object does not contain debugging + /// information, in which case the session will be a no-op. This can be checked via + /// [`has_debug_info`](struct.PeObject.html#method.has_debug_info). + pub fn debug_session(&self) -> Result, DwarfError> { + let symbols = self.symbol_map(); + DwarfDebugSession::parse(self, symbols, self.load_address() as i64, self.kind()) } /// Determines whether this object contains stack unwinding information. @@ -229,6 +244,17 @@ impl<'data> PeObject<'data> { &self.pe.sections } + /// Returns the `SectionTable` for the section with this name, if present. + pub fn section(&self, name: &str) -> Option { + for s in &self.pe.sections { + let sect_name = s.name(); + if sect_name.is_ok() && sect_name.unwrap() == name { + return Some(s.clone()); + } + } + None + } + /// Returns exception data containing unwind information. pub fn exception_data(&self) -> Option<&ExceptionData<'_>> { if self.is_stub { @@ -277,8 +303,8 @@ impl<'data> Parse<'data> for PeObject<'data> { } impl<'data: 'object, 'object> ObjectLike<'data, 'object> for PeObject<'data> { - type Error = PeError; - type Session = PeDebugSession<'data>; + type Error = DwarfError; + type Session = DwarfDebugSession<'data>; type SymbolIterator = PeSymbolIterator<'data, 'object>; fn file_format(&self) -> FileFormat { @@ -357,54 +383,26 @@ impl<'data, 'object> Iterator for PeSymbolIterator<'data, 'object> { } } -/// Debug session for PE objects. -/// -/// Since debug information in PE containers is not supported, this session consists of NoOps and -/// always returns empty results. -#[derive(Debug)] -pub struct PeDebugSession<'data> { - _ph: PhantomData<&'data ()>, -} - -impl<'data> PeDebugSession<'data> { - /// Returns an iterator over all functions in this debug file. - pub fn functions(&self) -> PeFunctionIterator<'_> { - std::iter::empty() - } - - /// Returns an iterator over all source files referenced by this debug file. - pub fn files(&self) -> PeFileIterator<'_> { - std::iter::empty() - } - - /// Looks up a file's source contents by its full canonicalized path. - /// - /// The given path must be canonicalized. - pub fn source_by_path(&self, _path: &str) -> Result>, PeError> { - Ok(None) +impl<'data> Dwarf<'data> for PeObject<'data> { + fn endianity(&self) -> RunTimeEndian { + // According to https://reverseengineering.stackexchange.com/questions/17922/determining-endianness-of-pe-files-windows-on-arm, + // the only known platform running PE's with big-endian code is the Xbox360. Probably not worth handling. + RunTimeEndian::Little + } + + fn raw_section(&self, name: &str) -> Option> { + // Name is given without leading "." + let sect = self.section(&format!(".{}", name))?; + let start = sect.pointer_to_raw_data as usize; + let end = start + (sect.virtual_size as usize); + let dwarf_data: &'data [u8] = self.data.get(start..end)?; + let dwarf_sect = DwarfSection { + // TODO: What about 64-bit PE+? Still 32 bit? + address: u64::from(sect.virtual_address), + data: Cow::from(dwarf_data), + offset: u64::from(sect.pointer_to_raw_data), + align: 4096, // TODO: Does goblin expose this? For now, assume 4K page size + }; + Some(dwarf_sect) } } - -impl<'session> DebugSession<'session> for PeDebugSession<'_> { - type Error = PeError; - type FunctionIterator = PeFunctionIterator<'session>; - type FileIterator = PeFileIterator<'session>; - - fn functions(&'session self) -> Self::FunctionIterator { - self.functions() - } - - fn files(&'session self) -> Self::FileIterator { - self.files() - } - - fn source_by_path(&self, path: &str) -> Result>, Self::Error> { - self.source_by_path(path) - } -} - -/// An iterator over functions in a PE file. -pub type PeFunctionIterator<'s> = std::iter::Empty, PeError>>; - -/// An iterator over source files in a PE file. -pub type PeFileIterator<'s> = std::iter::Empty, PeError>>; diff --git a/symbolic-debuginfo/tests/snapshots/test_objects__pe_dwarf_files.snap b/symbolic-debuginfo/tests/snapshots/test_objects__pe_dwarf_files.snap new file mode 100644 index 000000000..1fc613ad4 --- /dev/null +++ b/symbolic-debuginfo/tests/snapshots/test_objects__pe_dwarf_files.snap @@ -0,0 +1,15 @@ +--- +source: symbolic-debuginfo/tests/test_objects.rs +expression: "FilesDebug(&files[..10])" +--- +/mxe/tmp-gcc-x86_64-w64-mingw32.static/gcc-11.3.0.build_/mingw-w64-v10.0.0/mingw-w64-crt/crt/crtexe.c +/mxe/tmp-gcc-x86_64-w64-mingw32.static/gcc-11.3.0.build_/mingw-w64-v10.0.0/mingw-w64-crt/crt/crtexe.c +/mxe/usr/x86_64-w64-mingw32.static/include/winnt.h +/mxe/usr/x86_64-w64-mingw32.static/include/psdk_inc/intrin-impl.h +/mxe/usr/x86_64-w64-mingw32.static/include/corecrt.h +/mxe/usr/x86_64-w64-mingw32.static/include/minwindef.h +/mxe/usr/x86_64-w64-mingw32.static/include/basetsd.h +/mxe/usr/x86_64-w64-mingw32.static/include/stdlib.h +/mxe/usr/x86_64-w64-mingw32.static/include/errhandlingapi.h +/mxe/usr/x86_64-w64-mingw32.static/include/processthreadsapi.h + diff --git a/symbolic-debuginfo/tests/snapshots/test_objects__pe_dwarf_functions.snap b/symbolic-debuginfo/tests/snapshots/test_objects__pe_dwarf_functions.snap new file mode 100644 index 000000000..1ae2b97d5 --- /dev/null +++ b/symbolic-debuginfo/tests/snapshots/test_objects__pe_dwarf_functions.snap @@ -0,0 +1,223 @@ +--- +source: symbolic-debuginfo/tests/test_objects.rs +expression: "FunctionsDebug(&functions[..10], 0)" +--- + +> 0x14f0: atexit (0x14) + 0x14f0: crtexe.c:418 (/mxe/tmp-gcc-x86_64-w64-mingw32.static/gcc-11.3.0.build_/mingw-w64-v10.0.0/mingw-w64-crt/crt) + 0x14f4: crtexe.c:419 (/mxe/tmp-gcc-x86_64-w64-mingw32.static/gcc-11.3.0.build_/mingw-w64-v10.0.0/mingw-w64-crt/crt) + 0x14f9: crtexe.c:419 (/mxe/tmp-gcc-x86_64-w64-mingw32.static/gcc-11.3.0.build_/mingw-w64-v10.0.0/mingw-w64-crt/crt) + 0x14ff: crtexe.c:420 (/mxe/tmp-gcc-x86_64-w64-mingw32.static/gcc-11.3.0.build_/mingw-w64-v10.0.0/mingw-w64-crt/crt) + +> 0x1180: __tmainCRTStartup (0x326) + 0x1180: crtexe.c:223 (/mxe/tmp-gcc-x86_64-w64-mingw32.static/gcc-11.3.0.build_/mingw-w64-v10.0.0/mingw-w64-crt/crt) + 0x118f: crtexe.c:227 (/mxe/tmp-gcc-x86_64-w64-mingw32.static/gcc-11.3.0.build_/mingw-w64-v10.0.0/mingw-w64-crt/crt) + 0x11a1: crtexe.c:229 (/mxe/tmp-gcc-x86_64-w64-mingw32.static/gcc-11.3.0.build_/mingw-w64-v10.0.0/mingw-w64-crt/crt) + 0x11a8: crtexe.c:229 (/mxe/tmp-gcc-x86_64-w64-mingw32.static/gcc-11.3.0.build_/mingw-w64-v10.0.0/mingw-w64-crt/crt) + 0x11b4: crtexe.c:233 (/mxe/tmp-gcc-x86_64-w64-mingw32.static/gcc-11.3.0.build_/mingw-w64-v10.0.0/mingw-w64-crt/crt) + 0x11c4: crtexe.c:233 (/mxe/tmp-gcc-x86_64-w64-mingw32.static/gcc-11.3.0.build_/mingw-w64-v10.0.0/mingw-w64-crt/crt) + 0x11c8: crtexe.c:235 (/mxe/tmp-gcc-x86_64-w64-mingw32.static/gcc-11.3.0.build_/mingw-w64-v10.0.0/mingw-w64-crt/crt) + 0x11ca: crtexe.c:243 (/mxe/tmp-gcc-x86_64-w64-mingw32.static/gcc-11.3.0.build_/mingw-w64-v10.0.0/mingw-w64-crt/crt) + 0x11d1: crtexe.c:235 (/mxe/tmp-gcc-x86_64-w64-mingw32.static/gcc-11.3.0.build_/mingw-w64-v10.0.0/mingw-w64-crt/crt) + 0x11d8: crtexe.c:238 (/mxe/tmp-gcc-x86_64-w64-mingw32.static/gcc-11.3.0.build_/mingw-w64-v10.0.0/mingw-w64-crt/crt) + 0x11e1: crtexe.c:243 (/mxe/tmp-gcc-x86_64-w64-mingw32.static/gcc-11.3.0.build_/mingw-w64-v10.0.0/mingw-w64-crt/crt) + 0x11e9: crtexe.c:235 (/mxe/tmp-gcc-x86_64-w64-mingw32.static/gcc-11.3.0.build_/mingw-w64-v10.0.0/mingw-w64-crt/crt) + 0x11f1: crtexe.c:236 (/mxe/tmp-gcc-x86_64-w64-mingw32.static/gcc-11.3.0.build_/mingw-w64-v10.0.0/mingw-w64-crt/crt) + 0x11f6: crtexe.c:245 (/mxe/tmp-gcc-x86_64-w64-mingw32.static/gcc-11.3.0.build_/mingw-w64-v10.0.0/mingw-w64-crt/crt) + 0x11fd: crtexe.c:234 (/mxe/tmp-gcc-x86_64-w64-mingw32.static/gcc-11.3.0.build_/mingw-w64-v10.0.0/mingw-w64-crt/crt) + 0x11ff: crtexe.c:245 (/mxe/tmp-gcc-x86_64-w64-mingw32.static/gcc-11.3.0.build_/mingw-w64-v10.0.0/mingw-w64-crt/crt) + 0x1201: crtexe.c:245 (/mxe/tmp-gcc-x86_64-w64-mingw32.static/gcc-11.3.0.build_/mingw-w64-v10.0.0/mingw-w64-crt/crt) + 0x120a: crtexe.c:249 (/mxe/tmp-gcc-x86_64-w64-mingw32.static/gcc-11.3.0.build_/mingw-w64-v10.0.0/mingw-w64-crt/crt) + 0x120c: crtexe.c:249 (/mxe/tmp-gcc-x86_64-w64-mingw32.static/gcc-11.3.0.build_/mingw-w64-v10.0.0/mingw-w64-crt/crt) + 0x1214: crtexe.c:255 (/mxe/tmp-gcc-x86_64-w64-mingw32.static/gcc-11.3.0.build_/mingw-w64-v10.0.0/mingw-w64-crt/crt) + 0x121e: crtexe.c:257 (/mxe/tmp-gcc-x86_64-w64-mingw32.static/gcc-11.3.0.build_/mingw-w64-v10.0.0/mingw-w64-crt/crt) + 0x1220: crtexe.c:257 (/mxe/tmp-gcc-x86_64-w64-mingw32.static/gcc-11.3.0.build_/mingw-w64-v10.0.0/mingw-w64-crt/crt) + 0x1229: crtexe.c:263 (/mxe/tmp-gcc-x86_64-w64-mingw32.static/gcc-11.3.0.build_/mingw-w64-v10.0.0/mingw-w64-crt/crt) + 0x1231: crtexe.c:266 (/mxe/tmp-gcc-x86_64-w64-mingw32.static/gcc-11.3.0.build_/mingw-w64-v10.0.0/mingw-w64-crt/crt) + 0x123b: crtexe.c:266 (/mxe/tmp-gcc-x86_64-w64-mingw32.static/gcc-11.3.0.build_/mingw-w64-v10.0.0/mingw-w64-crt/crt) + 0x1240: crtexe.c:267 (/mxe/tmp-gcc-x86_64-w64-mingw32.static/gcc-11.3.0.build_/mingw-w64-v10.0.0/mingw-w64-crt/crt) + 0x124c: crtexe.c:269 (/mxe/tmp-gcc-x86_64-w64-mingw32.static/gcc-11.3.0.build_/mingw-w64-v10.0.0/mingw-w64-crt/crt) + 0x1251: crtexe.c:270 (/mxe/tmp-gcc-x86_64-w64-mingw32.static/gcc-11.3.0.build_/mingw-w64-v10.0.0/mingw-w64-crt/crt) + 0x125e: crtexe.c:270 (/mxe/tmp-gcc-x86_64-w64-mingw32.static/gcc-11.3.0.build_/mingw-w64-v10.0.0/mingw-w64-crt/crt) + 0x1265: crtexe.c:274 (/mxe/tmp-gcc-x86_64-w64-mingw32.static/gcc-11.3.0.build_/mingw-w64-v10.0.0/mingw-w64-crt/crt) + 0x126c: crtexe.c:270 (/mxe/tmp-gcc-x86_64-w64-mingw32.static/gcc-11.3.0.build_/mingw-w64-v10.0.0/mingw-w64-crt/crt) + 0x126f: crtexe.c:274 (/mxe/tmp-gcc-x86_64-w64-mingw32.static/gcc-11.3.0.build_/mingw-w64-v10.0.0/mingw-w64-crt/crt) + 0x1274: crtexe.c:276 (/mxe/tmp-gcc-x86_64-w64-mingw32.static/gcc-11.3.0.build_/mingw-w64-v10.0.0/mingw-w64-crt/crt) + 0x1279: crtexe.c:278 (/mxe/tmp-gcc-x86_64-w64-mingw32.static/gcc-11.3.0.build_/mingw-w64-v10.0.0/mingw-w64-crt/crt) + 0x1287: crtexe.c:283 (/mxe/tmp-gcc-x86_64-w64-mingw32.static/gcc-11.3.0.build_/mingw-w64-v10.0.0/mingw-w64-crt/crt) + 0x128c: crtexe.c:226 (/mxe/tmp-gcc-x86_64-w64-mingw32.static/gcc-11.3.0.build_/mingw-w64-v10.0.0/mingw-w64-crt/crt) + 0x128e: crtexe.c:283 (/mxe/tmp-gcc-x86_64-w64-mingw32.static/gcc-11.3.0.build_/mingw-w64-v10.0.0/mingw-w64-crt/crt) + 0x1291: crtexe.c:286 (/mxe/tmp-gcc-x86_64-w64-mingw32.static/gcc-11.3.0.build_/mingw-w64-v10.0.0/mingw-w64-crt/crt) + 0x12a0: crtexe.c:288 (/mxe/tmp-gcc-x86_64-w64-mingw32.static/gcc-11.3.0.build_/mingw-w64-v10.0.0/mingw-w64-crt/crt) + 0x12a7: crtexe.c:288 (/mxe/tmp-gcc-x86_64-w64-mingw32.static/gcc-11.3.0.build_/mingw-w64-v10.0.0/mingw-w64-crt/crt) + 0x12ae: crtexe.c:299 (/mxe/tmp-gcc-x86_64-w64-mingw32.static/gcc-11.3.0.build_/mingw-w64-v10.0.0/mingw-w64-crt/crt) + 0x12b2: crtexe.c:288 (/mxe/tmp-gcc-x86_64-w64-mingw32.static/gcc-11.3.0.build_/mingw-w64-v10.0.0/mingw-w64-crt/crt) + 0x12b5: crtexe.c:288 (/mxe/tmp-gcc-x86_64-w64-mingw32.static/gcc-11.3.0.build_/mingw-w64-v10.0.0/mingw-w64-crt/crt) + 0x12ba: crtexe.c:290 (/mxe/tmp-gcc-x86_64-w64-mingw32.static/gcc-11.3.0.build_/mingw-w64-v10.0.0/mingw-w64-crt/crt) + 0x12c8: crtexe.c:290 (/mxe/tmp-gcc-x86_64-w64-mingw32.static/gcc-11.3.0.build_/mingw-w64-v10.0.0/mingw-w64-crt/crt) + 0x12d0: crtexe.c:301 (/mxe/tmp-gcc-x86_64-w64-mingw32.static/gcc-11.3.0.build_/mingw-w64-v10.0.0/mingw-w64-crt/crt) + 0x12d8: crtexe.c:301 (/mxe/tmp-gcc-x86_64-w64-mingw32.static/gcc-11.3.0.build_/mingw-w64-v10.0.0/mingw-w64-crt/crt) + 0x12dc: crtexe.c:302 (/mxe/tmp-gcc-x86_64-w64-mingw32.static/gcc-11.3.0.build_/mingw-w64-v10.0.0/mingw-w64-crt/crt) + 0x12e0: crtexe.c:301 (/mxe/tmp-gcc-x86_64-w64-mingw32.static/gcc-11.3.0.build_/mingw-w64-v10.0.0/mingw-w64-crt/crt) + 0x12e9: crtexe.c:304 (/mxe/tmp-gcc-x86_64-w64-mingw32.static/gcc-11.3.0.build_/mingw-w64-v10.0.0/mingw-w64-crt/crt) + 0x12f0: crtexe.c:307 (/mxe/tmp-gcc-x86_64-w64-mingw32.static/gcc-11.3.0.build_/mingw-w64-v10.0.0/mingw-w64-crt/crt) + 0x12f8: crtexe.c:310 (/mxe/tmp-gcc-x86_64-w64-mingw32.static/gcc-11.3.0.build_/mingw-w64-v10.0.0/mingw-w64-crt/crt) + 0x12fd: crtexe.c:310 (/mxe/tmp-gcc-x86_64-w64-mingw32.static/gcc-11.3.0.build_/mingw-w64-v10.0.0/mingw-w64-crt/crt) + 0x1308: crtexe.c:309 (/mxe/tmp-gcc-x86_64-w64-mingw32.static/gcc-11.3.0.build_/mingw-w64-v10.0.0/mingw-w64-crt/crt) + 0x130e: crtexe.c:312 (/mxe/tmp-gcc-x86_64-w64-mingw32.static/gcc-11.3.0.build_/mingw-w64-v10.0.0/mingw-w64-crt/crt) + 0x1315: crtexe.c:312 (/mxe/tmp-gcc-x86_64-w64-mingw32.static/gcc-11.3.0.build_/mingw-w64-v10.0.0/mingw-w64-crt/crt) + 0x1386: crtexe.c:313 (/mxe/tmp-gcc-x86_64-w64-mingw32.static/gcc-11.3.0.build_/mingw-w64-v10.0.0/mingw-w64-crt/crt) + 0x138b: crtexe.c:320 (/mxe/tmp-gcc-x86_64-w64-mingw32.static/gcc-11.3.0.build_/mingw-w64-v10.0.0/mingw-w64-crt/crt) + 0x1399: crtexe.c:321 (/mxe/tmp-gcc-x86_64-w64-mingw32.static/gcc-11.3.0.build_/mingw-w64-v10.0.0/mingw-w64-crt/crt) + 0x139f: crtexe.c:320 (/mxe/tmp-gcc-x86_64-w64-mingw32.static/gcc-11.3.0.build_/mingw-w64-v10.0.0/mingw-w64-crt/crt) + 0x13a5: crtexe.c:321 (/mxe/tmp-gcc-x86_64-w64-mingw32.static/gcc-11.3.0.build_/mingw-w64-v10.0.0/mingw-w64-crt/crt) + 0x13b1: crtexe.c:323 (/mxe/tmp-gcc-x86_64-w64-mingw32.static/gcc-11.3.0.build_/mingw-w64-v10.0.0/mingw-w64-crt/crt) + 0x13b7: crtexe.c:321 (/mxe/tmp-gcc-x86_64-w64-mingw32.static/gcc-11.3.0.build_/mingw-w64-v10.0.0/mingw-w64-crt/crt) + 0x13bd: crtexe.c:323 (/mxe/tmp-gcc-x86_64-w64-mingw32.static/gcc-11.3.0.build_/mingw-w64-v10.0.0/mingw-w64-crt/crt) + 0x13c5: crtexe.c:326 (/mxe/tmp-gcc-x86_64-w64-mingw32.static/gcc-11.3.0.build_/mingw-w64-v10.0.0/mingw-w64-crt/crt) + 0x13d3: crtexe.c:330 (/mxe/tmp-gcc-x86_64-w64-mingw32.static/gcc-11.3.0.build_/mingw-w64-v10.0.0/mingw-w64-crt/crt) + 0x13e8: crtexe.c:310 (/mxe/tmp-gcc-x86_64-w64-mingw32.static/gcc-11.3.0.build_/mingw-w64-v10.0.0/mingw-w64-crt/crt) + 0x13f8: crtexe.c:245 (/mxe/tmp-gcc-x86_64-w64-mingw32.static/gcc-11.3.0.build_/mingw-w64-v10.0.0/mingw-w64-crt/crt) + 0x13ff: crtexe.c:240 (/mxe/tmp-gcc-x86_64-w64-mingw32.static/gcc-11.3.0.build_/mingw-w64-v10.0.0/mingw-w64-crt/crt) + 0x1404: crtexe.c:245 (/mxe/tmp-gcc-x86_64-w64-mingw32.static/gcc-11.3.0.build_/mingw-w64-v10.0.0/mingw-w64-crt/crt) + 0x1406: crtexe.c:245 (/mxe/tmp-gcc-x86_64-w64-mingw32.static/gcc-11.3.0.build_/mingw-w64-v10.0.0/mingw-w64-crt/crt) + 0x140f: crtexe.c:247 (/mxe/tmp-gcc-x86_64-w64-mingw32.static/gcc-11.3.0.build_/mingw-w64-v10.0.0/mingw-w64-crt/crt) + 0x1419: crtexe.c:257 (/mxe/tmp-gcc-x86_64-w64-mingw32.static/gcc-11.3.0.build_/mingw-w64-v10.0.0/mingw-w64-crt/crt) + 0x141b: crtexe.c:257 (/mxe/tmp-gcc-x86_64-w64-mingw32.static/gcc-11.3.0.build_/mingw-w64-v10.0.0/mingw-w64-crt/crt) + 0x1424: crtexe.c:259 (/mxe/tmp-gcc-x86_64-w64-mingw32.static/gcc-11.3.0.build_/mingw-w64-v10.0.0/mingw-w64-crt/crt) + 0x1437: crtexe.c:260 (/mxe/tmp-gcc-x86_64-w64-mingw32.static/gcc-11.3.0.build_/mingw-w64-v10.0.0/mingw-w64-crt/crt) + 0x143d: crtexe.c:263 (/mxe/tmp-gcc-x86_64-w64-mingw32.static/gcc-11.3.0.build_/mingw-w64-v10.0.0/mingw-w64-crt/crt) + 0x1445: crtexe.c:264 (/mxe/tmp-gcc-x86_64-w64-mingw32.static/gcc-11.3.0.build_/mingw-w64-v10.0.0/mingw-w64-crt/crt) + 0x1450: crtexe.c:230 (/mxe/tmp-gcc-x86_64-w64-mingw32.static/gcc-11.3.0.build_/mingw-w64-v10.0.0/mingw-w64-crt/crt) + 0x1460: crtexe.c:327 (/mxe/tmp-gcc-x86_64-w64-mingw32.static/gcc-11.3.0.build_/mingw-w64-v10.0.0/mingw-w64-crt/crt) + 0x1465: crtexe.c:329 (/mxe/tmp-gcc-x86_64-w64-mingw32.static/gcc-11.3.0.build_/mingw-w64-v10.0.0/mingw-w64-crt/crt) + 0x146b: crtexe.c:330 (/mxe/tmp-gcc-x86_64-w64-mingw32.static/gcc-11.3.0.build_/mingw-w64-v10.0.0/mingw-w64-crt/crt) + 0x1480: crtexe.c:252 (/mxe/tmp-gcc-x86_64-w64-mingw32.static/gcc-11.3.0.build_/mingw-w64-v10.0.0/mingw-w64-crt/crt) + 0x148e: crtexe.c:251 (/mxe/tmp-gcc-x86_64-w64-mingw32.static/gcc-11.3.0.build_/mingw-w64-v10.0.0/mingw-w64-crt/crt) + 0x1494: crtexe.c:252 (/mxe/tmp-gcc-x86_64-w64-mingw32.static/gcc-11.3.0.build_/mingw-w64-v10.0.0/mingw-w64-crt/crt) + 0x149e: crtexe.c:324 (/mxe/tmp-gcc-x86_64-w64-mingw32.static/gcc-11.3.0.build_/mingw-w64-v10.0.0/mingw-w64-crt/crt) + + > 0x11b4: NtCurrentTeb (0x10) + 0x11b4: winnt.h:9094 (/mxe/usr/x86_64-w64-mingw32.static/include) + + > 0x11b4: __readgsqword (0x10) + 0x11b4: intrin-impl.h:838 (/mxe/usr/x86_64-w64-mingw32.static/include/psdk_inc) + 0x11bd: intrin-impl.h:838 (/mxe/usr/x86_64-w64-mingw32.static/include/psdk_inc) + + > 0x11c8: _InterlockedCompareExchangePointer (0x2) + 0x11c8: intrin-impl.h:1737 (/mxe/usr/x86_64-w64-mingw32.static/include/psdk_inc) + + > 0x11e9: _InterlockedCompareExchangePointer (0x8) + 0x11e9: intrin-impl.h:1737 (/mxe/usr/x86_64-w64-mingw32.static/include/psdk_inc) + + > 0x1315: duplicate_ppstrings (0x71) + 0x1315: crtexe.c:403 (/mxe/tmp-gcc-x86_64-w64-mingw32.static/gcc-11.3.0.build_/mingw-w64-v10.0.0/mingw-w64-crt/crt) + 0x131c: crtexe.c:403 (/mxe/tmp-gcc-x86_64-w64-mingw32.static/gcc-11.3.0.build_/mingw-w64-v10.0.0/mingw-w64-crt/crt) + 0x1328: crtexe.c:405 (/mxe/tmp-gcc-x86_64-w64-mingw32.static/gcc-11.3.0.build_/mingw-w64-v10.0.0/mingw-w64-crt/crt) + 0x132f: crtexe.c:403 (/mxe/tmp-gcc-x86_64-w64-mingw32.static/gcc-11.3.0.build_/mingw-w64-v10.0.0/mingw-w64-crt/crt) + 0x1332: crtexe.c:406 (/mxe/tmp-gcc-x86_64-w64-mingw32.static/gcc-11.3.0.build_/mingw-w64-v10.0.0/mingw-w64-crt/crt) + 0x1340: crtexe.c:408 (/mxe/tmp-gcc-x86_64-w64-mingw32.static/gcc-11.3.0.build_/mingw-w64-v10.0.0/mingw-w64-crt/crt) + 0x134a: crtexe.c:408 (/mxe/tmp-gcc-x86_64-w64-mingw32.static/gcc-11.3.0.build_/mingw-w64-v10.0.0/mingw-w64-crt/crt) + 0x134e: crtexe.c:409 (/mxe/tmp-gcc-x86_64-w64-mingw32.static/gcc-11.3.0.build_/mingw-w64-v10.0.0/mingw-w64-crt/crt) + 0x1356: crtexe.c:410 (/mxe/tmp-gcc-x86_64-w64-mingw32.static/gcc-11.3.0.build_/mingw-w64-v10.0.0/mingw-w64-crt/crt) + 0x1359: crtexe.c:409 (/mxe/tmp-gcc-x86_64-w64-mingw32.static/gcc-11.3.0.build_/mingw-w64-v10.0.0/mingw-w64-crt/crt) + 0x135d: crtexe.c:410 (/mxe/tmp-gcc-x86_64-w64-mingw32.static/gcc-11.3.0.build_/mingw-w64-v10.0.0/mingw-w64-crt/crt) + 0x1362: crtexe.c:409 (/mxe/tmp-gcc-x86_64-w64-mingw32.static/gcc-11.3.0.build_/mingw-w64-v10.0.0/mingw-w64-crt/crt) + 0x1365: crtexe.c:406 (/mxe/tmp-gcc-x86_64-w64-mingw32.static/gcc-11.3.0.build_/mingw-w64-v10.0.0/mingw-w64-crt/crt) + 0x1369: crtexe.c:410 (/mxe/tmp-gcc-x86_64-w64-mingw32.static/gcc-11.3.0.build_/mingw-w64-v10.0.0/mingw-w64-crt/crt) + 0x136e: crtexe.c:406 (/mxe/tmp-gcc-x86_64-w64-mingw32.static/gcc-11.3.0.build_/mingw-w64-v10.0.0/mingw-w64-crt/crt) + 0x1373: crtexe.c:412 (/mxe/tmp-gcc-x86_64-w64-mingw32.static/gcc-11.3.0.build_/mingw-w64-v10.0.0/mingw-w64-crt/crt) + 0x1378: crtexe.c:412 (/mxe/tmp-gcc-x86_64-w64-mingw32.static/gcc-11.3.0.build_/mingw-w64-v10.0.0/mingw-w64-crt/crt) + 0x137f: crtexe.c:413 (/mxe/tmp-gcc-x86_64-w64-mingw32.static/gcc-11.3.0.build_/mingw-w64-v10.0.0/mingw-w64-crt/crt) + + > 0x1445: _InterlockedExchangePointer (0xb) + 0x1445: intrin-impl.h:1748 (/mxe/usr/x86_64-w64-mingw32.static/include/psdk_inc) + +> 0x14d0: mainCRTStartup (0x1d) + 0x14d0: crtexe.c:196 (/mxe/tmp-gcc-x86_64-w64-mingw32.static/gcc-11.3.0.build_/mingw-w64-v10.0.0/mingw-w64-crt/crt) + 0x14d4: crtexe.c:201 (/mxe/tmp-gcc-x86_64-w64-mingw32.static/gcc-11.3.0.build_/mingw-w64-v10.0.0/mingw-w64-crt/crt) + 0x14e1: crtexe.c:202 (/mxe/tmp-gcc-x86_64-w64-mingw32.static/gcc-11.3.0.build_/mingw-w64-v10.0.0/mingw-w64-crt/crt) + 0x14e6: crtexe.c:204 (/mxe/tmp-gcc-x86_64-w64-mingw32.static/gcc-11.3.0.build_/mingw-w64-v10.0.0/mingw-w64-crt/crt) + 0x14e8: crtexe.c:213 (/mxe/tmp-gcc-x86_64-w64-mingw32.static/gcc-11.3.0.build_/mingw-w64-v10.0.0/mingw-w64-crt/crt) + +> 0x14b0: WinMainCRTStartup (0x1d) + 0x14b0: crtexe.c:170 (/mxe/tmp-gcc-x86_64-w64-mingw32.static/gcc-11.3.0.build_/mingw-w64-v10.0.0/mingw-w64-crt/crt) + 0x14b4: crtexe.c:175 (/mxe/tmp-gcc-x86_64-w64-mingw32.static/gcc-11.3.0.build_/mingw-w64-v10.0.0/mingw-w64-crt/crt) + 0x14c1: crtexe.c:176 (/mxe/tmp-gcc-x86_64-w64-mingw32.static/gcc-11.3.0.build_/mingw-w64-v10.0.0/mingw-w64-crt/crt) + 0x14c6: crtexe.c:178 (/mxe/tmp-gcc-x86_64-w64-mingw32.static/gcc-11.3.0.build_/mingw-w64-v10.0.0/mingw-w64-crt/crt) + 0x14c8: crtexe.c:187 (/mxe/tmp-gcc-x86_64-w64-mingw32.static/gcc-11.3.0.build_/mingw-w64-v10.0.0/mingw-w64-crt/crt) + +> 0x1130: pre_cpp_init (0x49) + 0x1130: crtexe.c:155 (/mxe/tmp-gcc-x86_64-w64-mingw32.static/gcc-11.3.0.build_/mingw-w64-v10.0.0/mingw-w64-crt/crt) + 0x1134: crtexe.c:156 (/mxe/tmp-gcc-x86_64-w64-mingw32.static/gcc-11.3.0.build_/mingw-w64-v10.0.0/mingw-w64-crt/crt) + 0x113b: crtexe.c:161 (/mxe/tmp-gcc-x86_64-w64-mingw32.static/gcc-11.3.0.build_/mingw-w64-v10.0.0/mingw-w64-crt/crt) + 0x1150: crtexe.c:156 (/mxe/tmp-gcc-x86_64-w64-mingw32.static/gcc-11.3.0.build_/mingw-w64-v10.0.0/mingw-w64-crt/crt) + 0x1158: crtexe.c:161 (/mxe/tmp-gcc-x86_64-w64-mingw32.static/gcc-11.3.0.build_/mingw-w64-v10.0.0/mingw-w64-crt/crt) + 0x1174: crtexe.c:163 (/mxe/tmp-gcc-x86_64-w64-mingw32.static/gcc-11.3.0.build_/mingw-w64-v10.0.0/mingw-w64-crt/crt) + +> 0x1010: pre_c_init (0x11e) + 0x1010: crtexe.c:127 (/mxe/tmp-gcc-x86_64-w64-mingw32.static/gcc-11.3.0.build_/mingw-w64-v10.0.0/mingw-w64-crt/crt) + 0x1014: crtexe.c:128 (/mxe/tmp-gcc-x86_64-w64-mingw32.static/gcc-11.3.0.build_/mingw-w64-v10.0.0/mingw-w64-crt/crt) + 0x105a: crtexe.c:129 (/mxe/tmp-gcc-x86_64-w64-mingw32.static/gcc-11.3.0.build_/mingw-w64-v10.0.0/mingw-w64-crt/crt) + 0x1061: crtexe.c:128 (/mxe/tmp-gcc-x86_64-w64-mingw32.static/gcc-11.3.0.build_/mingw-w64-v10.0.0/mingw-w64-crt/crt) + 0x1067: crtexe.c:129 (/mxe/tmp-gcc-x86_64-w64-mingw32.static/gcc-11.3.0.build_/mingw-w64-v10.0.0/mingw-w64-crt/crt) + 0x106d: crtexe.c:130 (/mxe/tmp-gcc-x86_64-w64-mingw32.static/gcc-11.3.0.build_/mingw-w64-v10.0.0/mingw-w64-crt/crt) + 0x1077: crtexe.c:134 (/mxe/tmp-gcc-x86_64-w64-mingw32.static/gcc-11.3.0.build_/mingw-w64-v10.0.0/mingw-w64-crt/crt) + 0x107c: crtexe.c:134 (/mxe/tmp-gcc-x86_64-w64-mingw32.static/gcc-11.3.0.build_/mingw-w64-v10.0.0/mingw-w64-crt/crt) + 0x1087: crtexe.c:135 (/mxe/tmp-gcc-x86_64-w64-mingw32.static/gcc-11.3.0.build_/mingw-w64-v10.0.0/mingw-w64-crt/crt) + 0x108c: crtexe.c:135 (/mxe/tmp-gcc-x86_64-w64-mingw32.static/gcc-11.3.0.build_/mingw-w64-v10.0.0/mingw-w64-crt/crt) + 0x1097: crtexe.c:140 (/mxe/tmp-gcc-x86_64-w64-mingw32.static/gcc-11.3.0.build_/mingw-w64-v10.0.0/mingw-w64-crt/crt) + 0x109c: crtexe.c:142 (/mxe/tmp-gcc-x86_64-w64-mingw32.static/gcc-11.3.0.build_/mingw-w64-v10.0.0/mingw-w64-crt/crt) + 0x10a3: crtexe.c:142 (/mxe/tmp-gcc-x86_64-w64-mingw32.static/gcc-11.3.0.build_/mingw-w64-v10.0.0/mingw-w64-crt/crt) + 0x10a8: crtexe.c:151 (/mxe/tmp-gcc-x86_64-w64-mingw32.static/gcc-11.3.0.build_/mingw-w64-v10.0.0/mingw-w64-crt/crt) + 0x10b0: crtexe.c:132 (/mxe/tmp-gcc-x86_64-w64-mingw32.static/gcc-11.3.0.build_/mingw-w64-v10.0.0/mingw-w64-crt/crt) + 0x10c0: crtexe.c:128 (/mxe/tmp-gcc-x86_64-w64-mingw32.static/gcc-11.3.0.build_/mingw-w64-v10.0.0/mingw-w64-crt/crt) + 0x10f8: crtexe.c:144 (/mxe/tmp-gcc-x86_64-w64-mingw32.static/gcc-11.3.0.build_/mingw-w64-v10.0.0/mingw-w64-crt/crt) + 0x1104: crtexe.c:151 (/mxe/tmp-gcc-x86_64-w64-mingw32.static/gcc-11.3.0.build_/mingw-w64-v10.0.0/mingw-w64-crt/crt) + 0x1110: crtexe.c:128 (/mxe/tmp-gcc-x86_64-w64-mingw32.static/gcc-11.3.0.build_/mingw-w64-v10.0.0/mingw-w64-crt/crt) + + > 0x1014: check_managed_app (0x46) + 0x1014: crtexe.c:345 (/mxe/tmp-gcc-x86_64-w64-mingw32.static/gcc-11.3.0.build_/mingw-w64-v10.0.0/mingw-w64-crt/crt) + 0x101b: crtexe.c:351 (/mxe/tmp-gcc-x86_64-w64-mingw32.static/gcc-11.3.0.build_/mingw-w64-v10.0.0/mingw-w64-crt/crt) + 0x101d: crtexe.c:345 (/mxe/tmp-gcc-x86_64-w64-mingw32.static/gcc-11.3.0.build_/mingw-w64-v10.0.0/mingw-w64-crt/crt) + 0x1023: crtexe.c:346 (/mxe/tmp-gcc-x86_64-w64-mingw32.static/gcc-11.3.0.build_/mingw-w64-v10.0.0/mingw-w64-crt/crt) + 0x1030: crtexe.c:347 (/mxe/tmp-gcc-x86_64-w64-mingw32.static/gcc-11.3.0.build_/mingw-w64-v10.0.0/mingw-w64-crt/crt) + 0x103d: crtexe.c:350 (/mxe/tmp-gcc-x86_64-w64-mingw32.static/gcc-11.3.0.build_/mingw-w64-v10.0.0/mingw-w64-crt/crt) + 0x1044: crtexe.c:350 (/mxe/tmp-gcc-x86_64-w64-mingw32.static/gcc-11.3.0.build_/mingw-w64-v10.0.0/mingw-w64-crt/crt) + 0x104b: crtexe.c:353 (/mxe/tmp-gcc-x86_64-w64-mingw32.static/gcc-11.3.0.build_/mingw-w64-v10.0.0/mingw-w64-crt/crt) + 0x104f: crtexe.c:353 (/mxe/tmp-gcc-x86_64-w64-mingw32.static/gcc-11.3.0.build_/mingw-w64-v10.0.0/mingw-w64-crt/crt) + 0x1052: crtexe.c:354 (/mxe/tmp-gcc-x86_64-w64-mingw32.static/gcc-11.3.0.build_/mingw-w64-v10.0.0/mingw-w64-crt/crt) + + > 0x10c0: check_managed_app (0x38) + 0x10c0: crtexe.c:358 (/mxe/tmp-gcc-x86_64-w64-mingw32.static/gcc-11.3.0.build_/mingw-w64-v10.0.0/mingw-w64-crt/crt) + 0x10c4: crtexe.c:358 (/mxe/tmp-gcc-x86_64-w64-mingw32.static/gcc-11.3.0.build_/mingw-w64-v10.0.0/mingw-w64-crt/crt) + 0x10d2: crtexe.c:366 (/mxe/tmp-gcc-x86_64-w64-mingw32.static/gcc-11.3.0.build_/mingw-w64-v10.0.0/mingw-w64-crt/crt) + 0x10df: crtexe.c:368 (/mxe/tmp-gcc-x86_64-w64-mingw32.static/gcc-11.3.0.build_/mingw-w64-v10.0.0/mingw-w64-crt/crt) + + > 0x1110: check_managed_app (0x1e) + 0x1110: crtexe.c:361 (/mxe/tmp-gcc-x86_64-w64-mingw32.static/gcc-11.3.0.build_/mingw-w64-v10.0.0/mingw-w64-crt/crt) + 0x111a: crtexe.c:363 (/mxe/tmp-gcc-x86_64-w64-mingw32.static/gcc-11.3.0.build_/mingw-w64-v10.0.0/mingw-w64-crt/crt) + +> 0x1000: __mingw_invalidParameterHandler (0x1) + 0x1000: crtexe.c:123 (/mxe/tmp-gcc-x86_64-w64-mingw32.static/gcc-11.3.0.build_/mingw-w64-v10.0.0/mingw-w64-crt/crt) + +> 0x1572: main (0x1f) + 0x1572: hello.c:3 (/src) + 0x1576: hello.c:3 (/src) + 0x157b: hello.c:4 (/src) + 0x1587: hello.c:5 (/src) + +> 0x1530: printf (0x42) + 0x1530: stdio.h:369 (/mxe/usr/x86_64-w64-mingw32.static/include) + 0x1548: stdio.h:371 (/mxe/usr/x86_64-w64-mingw32.static/include) + 0x1552: stdio.h:372 (/mxe/usr/x86_64-w64-mingw32.static/include) + 0x1557: stdio.h:372 (/mxe/usr/x86_64-w64-mingw32.static/include) + 0x156b: stdio.h:375 (/mxe/usr/x86_64-w64-mingw32.static/include) + 0x1570: stdio.h:375 (/mxe/usr/x86_64-w64-mingw32.static/include) + +> 0x1650: __main (0x1f) + 0x1650: gccmain.c:55 (/mxe/tmp-gcc-x86_64-w64-mingw32.static/gcc-11.3.0.build_/mingw-w64-v10.0.0/mingw-w64-crt/crt) + 0x165a: gccmain.c:60 (/mxe/tmp-gcc-x86_64-w64-mingw32.static/gcc-11.3.0.build_/mingw-w64-v10.0.0/mingw-w64-crt/crt) + 0x1660: gccmain.c:57 (/mxe/tmp-gcc-x86_64-w64-mingw32.static/gcc-11.3.0.build_/mingw-w64-v10.0.0/mingw-w64-crt/crt) + 0x166a: gccmain.c:58 (/mxe/tmp-gcc-x86_64-w64-mingw32.static/gcc-11.3.0.build_/mingw-w64-v10.0.0/mingw-w64-crt/crt) + diff --git a/symbolic-debuginfo/tests/snapshots/test_objects__pe_dwarf_symbols.snap b/symbolic-debuginfo/tests/snapshots/test_objects__pe_dwarf_symbols.snap new file mode 100644 index 000000000..8ece1000b --- /dev/null +++ b/symbolic-debuginfo/tests/snapshots/test_objects__pe_dwarf_symbols.snap @@ -0,0 +1,5 @@ +--- +source: symbolic-debuginfo/tests/test_objects.rs +expression: SymbolsDebug(&symbols) +--- + diff --git a/symbolic-debuginfo/tests/test_objects.rs b/symbolic-debuginfo/tests/test_objects.rs index 4686477db..88639e5dd 100644 --- a/symbolic-debuginfo/tests/test_objects.rs +++ b/symbolic-debuginfo/tests/test_objects.rs @@ -509,8 +509,42 @@ fn test_pe_64() -> Result<(), Error> { Ok(()) } -// NB: No test for PE symbols because our executable does not export any symbols -// NB: No test for PE functions because we can only read debug info from PDBs +// Tests for PE's containing DWARF debug info +#[test] +fn test_pe_dwarf_symbols() -> Result<(), Error> { + let view = ByteView::open(fixture("windows/hello-dwarf.exe"))?; + let object = Object::parse(&view)?; + + let symbols = object.symbol_map(); + insta::assert_debug_snapshot!("pe_dwarf_symbols", SymbolsDebug(&symbols)); + + Ok(()) +} + +#[test] +fn test_pe_dwarf_files() -> Result<(), Error> { + let view = ByteView::open(fixture("windows/hello-dwarf.exe"))?; + let object = Object::parse(&view)?; + + let session = object.debug_session()?; + let files = session.files().collect::, _>>()?; + assert_eq!(files.len(), 195); + insta::assert_debug_snapshot!("pe_dwarf_files", FilesDebug(&files[..10])); + + Ok(()) +} + +#[test] +fn test_pe_dwarf_functions() -> Result<(), Error> { + let view = ByteView::open(fixture("windows/hello-dwarf.exe"))?; + let object = Object::parse(&view)?; + + let session = object.debug_session()?; + let functions = session.functions().collect::, _>>()?; + insta::assert_debug_snapshot!("pe_dwarf_functions", FunctionsDebug(&functions[..10], 0)); + + Ok(()) +} #[test] fn test_pdb() -> Result<(), Error> { diff --git a/symbolic-testutils/fixtures/windows/hello-dwarf.exe b/symbolic-testutils/fixtures/windows/hello-dwarf.exe new file mode 100755 index 000000000..2f45e87d6 Binary files /dev/null and b/symbolic-testutils/fixtures/windows/hello-dwarf.exe differ