diff options
author | Sergey Matveev <earthdok@google.com> | 2015-05-12 16:46:54 +0000 |
---|---|---|
committer | Sergey Matveev <earthdok@google.com> | 2015-05-12 16:46:54 +0000 |
commit | 4901406799702394d9ca0b820852d850ed187f6e (patch) | |
tree | 677dd16526cac5a33dcfeba8955218dc302ef187 /lib/sanitizer_common/scripts | |
parent | b3c87bc2068be2991f891cafe1db25b8e510e56a (diff) |
[sanitizer] Update "sancov.py missing" to allow __sanitizer_cov_with_check().
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@237149 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/sanitizer_common/scripts')
-rwxr-xr-x | lib/sanitizer_common/scripts/sancov.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/sanitizer_common/scripts/sancov.py b/lib/sanitizer_common/scripts/sancov.py index c6cc4ba0d..a5ae9574a 100755 --- a/lib/sanitizer_common/scripts/sancov.py +++ b/lib/sanitizer_common/scripts/sancov.py @@ -180,8 +180,12 @@ def RawUnpack(files): UnpackOneRawFile(f, f_map) def GetInstrumentedPCs(binary): + # This looks scary, but all it does is extract all offsets where we call: + # - __sanitizer_cov() or __sanitizer_cov_with_check(), + # - with call or callq, + # - directly or via PLT. cmd = "objdump -d %s | " \ - "grep '^\s\+[0-9a-f]\+:.*\scall\(q\|\)\s\+[0-9a-f]\+ <__sanitizer_cov\(@plt\|\)>' | " \ + "grep '^\s\+[0-9a-f]\+:.*\scall\(q\|\)\s\+[0-9a-f]\+ <__sanitizer_cov\(_with_check\|\)\(@plt\|\)>' | " \ "grep '^\s\+[0-9a-f]\+' -o" % binary proc = subprocess.Popen(cmd, stdin=subprocess.PIPE, stdout=subprocess.PIPE, shell=True) |