@@ -72,6 +72,22 @@ impl Symbol<'_> {
72
72
#[ repr( C , align( 8 ) ) ]
73
73
struct Aligned8 < T > ( T ) ;
74
74
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" ) ]
75
91
pub unsafe fn resolve ( what : ResolveWhat < ' _ > , cb : & mut dyn FnMut ( & super :: Symbol ) ) {
76
92
// Ensure this process's symbols are initialized
77
93
let dbghelp = match dbghelp:: init ( ) {
@@ -100,6 +116,7 @@ pub unsafe fn resolve(what: ResolveWhat<'_>, cb: &mut dyn FnMut(&super::Symbol))
100
116
///
101
117
/// This should work all the way down to Windows XP. The inline context is
102
118
/// ignored, since this concept was only introduced in dbghelp 6.2+.
119
+ #[ cfg( target_vendor = "win7" ) ]
103
120
unsafe fn resolve_legacy (
104
121
dbghelp : & dbghelp:: Init ,
105
122
addr : * mut c_void ,
0 commit comments