[InstrumentationRuntime] Refactor the API (Part 1/N) (NFCI)
authorVedant Kumar <vsk@apple.com>
Thu, 11 Aug 2016 17:28:33 +0000 (17:28 +0000)
committerVedant Kumar <vsk@apple.com>
Thu, 11 Aug 2016 17:28:33 +0000 (17:28 +0000)
commita4fa2e299a983dbe73992648e114d39106185449
tree9e8febb2eb084c0749684544b4d1f1408093c9f1
parent76837df6ff397fddf0ba569115410b9e05004c08
[InstrumentationRuntime] Refactor the API (Part 1/N) (NFCI)

Adapters for instrumentation runtimes have to do two basic things:

  1) Load a runtime library.
  2) Install breakpoints in that library.

This logic is duplicated in the adapters for asan and tsan. Factor it
out and document bits of it to make it easier to add new adapters.

I tested this with check-lldb, and double-checked
testcases/functionalities/{a,t}san.

Differential Revision: https://reviews.llvm.org/D23043

llvm-svn: 278367
lldb/include/lldb/Target/InstrumentationRuntime.h
lldb/source/Plugins/InstrumentationRuntime/AddressSanitizer/AddressSanitizerRuntime.cpp
lldb/source/Plugins/InstrumentationRuntime/AddressSanitizer/AddressSanitizerRuntime.h
lldb/source/Plugins/InstrumentationRuntime/ThreadSanitizer/ThreadSanitizerRuntime.cpp
lldb/source/Plugins/InstrumentationRuntime/ThreadSanitizer/ThreadSanitizerRuntime.h
lldb/source/Target/InstrumentationRuntime.cpp