@@ -72,6 +72,22 @@ impl Symbol<'_> {
7272#[ repr( C , align( 8 ) ) ]
7373struct Aligned8 < T > ( T ) ;
7474
75+ #[ cfg( not( target_vendor = "win7" ) ) ]
76+ pub unsafe fn resolve ( what : ResolveWhat < ' _ > , cb : & mut dyn FnMut ( & super :: Symbol ) ) {
77+ // Ensure this process's symbols are initialized
78+ let dbghelp = match dbghelp:: init ( ) {
79+ Ok ( dbghelp) => dbghelp,
80+ Err ( ( ) ) => return , // oh well...
81+ } ;
82+ match what {
83+ ResolveWhat :: Address ( _) => resolve_with_inline ( & dbghelp, what. address_or_ip ( ) , None , cb) ,
84+ ResolveWhat :: Frame ( frame) => {
85+ resolve_with_inline ( & dbghelp, frame. ip ( ) , frame. inner . inline_context ( ) , cb)
86+ }
87+ }
88+ }
89+
90+ #[ cfg( target_vendor = "win7" ) ]
7591pub unsafe fn resolve ( what : ResolveWhat < ' _ > , cb : & mut dyn FnMut ( & super :: Symbol ) ) {
7692 // Ensure this process's symbols are initialized
7793 let dbghelp = match dbghelp:: init ( ) {
@@ -100,6 +116,7 @@ pub unsafe fn resolve(what: ResolveWhat<'_>, cb: &mut dyn FnMut(&super::Symbol))
100116///
101117/// This should work all the way down to Windows XP. The inline context is
102118/// ignored, since this concept was only introduced in dbghelp 6.2+.
119+ #[ cfg( target_vendor = "win7" ) ]
103120unsafe fn resolve_legacy (
104121 dbghelp : & dbghelp:: Init ,
105122 addr : * mut c_void ,
0 commit comments