Skip to content

Commit

Permalink
Merge pull request #479 from LucaCanali/master
Browse files Browse the repository at this point in the history
Fix for find_symbol method, issue #478
  • Loading branch information
drzaeus77 committed Apr 6, 2016
2 parents 5cb8de7 + eea0bbf commit fd604b4
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/python/bcc/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -464,7 +464,8 @@ def find_symbol(cls, path, sym):
return symbols[sym]

with os.popen("""/usr/bin/objdump -tT %s | \
awk -v sym=%s '$NF == sym && $4 == ".text" \
awk -v sym=%s '$NF == sym && ($4 == ".text" \
|| $4 == "text.hot" || $4 == "text.unlikely") \
{ print $1; exit }'""" % (path, sym)) as f:
data = f.read().rstrip()
if not data:
Expand Down

0 comments on commit fd604b4

Please sign in to comment.