File tree Expand file tree Collapse file tree 1 file changed +8
-0
lines changed
Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -206,6 +206,7 @@ func (s *Symbolizer) ProcessEvent(e *kevent.Kevent) (bool, error) {
206206 delete (s .procs , pid )
207207 return true , nil
208208 }
209+
209210 if e .IsLoadImage () || e .IsUnloadImage () {
210211 filename := e .GetParamAsString (kparams .ImagePath )
211212 addr := e .Kparams .TryGetAddress (kparams .ImageBase )
@@ -231,14 +232,17 @@ func (s *Symbolizer) ProcessEvent(e *kevent.Kevent) (bool, error) {
231232 log .Error (err )
232233 }
233234 }
235+
234236 if ! e .Kparams .Contains (kparams .Callstack ) {
235237 return true , nil
236238 }
237239 defer e .Kparams .Remove (kparams .Callstack )
240+
238241 err := s .processCallstack (e )
239242 if err != nil {
240243 callstackProcessErrors .Add (1 )
241244 }
245+
242246 return true , nil
243247}
244248
@@ -332,6 +336,10 @@ func (s *Symbolizer) processCallstack(e *kevent.Kevent) error {
332336 // and resolve the module name that contains the function
333337 if addr != 0 {
334338 mod := e .PS .FindModuleByVa (addr )
339+ // perform lookup against parent modules
340+ if mod == nil && e .PS .Parent != nil {
341+ mod = e .PS .Parent .FindModuleByVa (addr )
342+ }
335343 symbol := s .symbolizeAddress (pid , addr , mod )
336344
337345 if symbol != "" && symbol != "?" {
You can’t perform that action at this time.
0 commit comments