Add external logger interface.

This commit is contained in:
Peter Johnson
2016-12-10 23:49:50 -08:00
parent 2b8b8e7403
commit 28a2ba4bf8
6 changed files with 117 additions and 0 deletions

View File

@@ -265,6 +265,10 @@ void CS_RemoveListener(CS_Listener handle, CS_Status* status) {
int CS_NotifierDestroyed(void) { return cs::NotifierDestroyed(); }
void CS_SetLogger(CS_LogFunc func, unsigned int min_level) {
cs::SetLogger(func, min_level);
}
CS_Source* CS_EnumerateSources(int* count, CS_Status* status) {
llvm::SmallVector<CS_Source, 32> buf;
auto handles = cs::EnumerateSourceHandles(buf, status);