summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--binaryninjaapi.cpp6
-rw-r--r--binaryninjaapi.h2
-rw-r--r--binaryninjacore.h2
3 files changed, 10 insertions, 0 deletions
diff --git a/binaryninjaapi.cpp b/binaryninjaapi.cpp
index 202019ed..70cd9e54 100644
--- a/binaryninjaapi.cpp
+++ b/binaryninjaapi.cpp
@@ -596,3 +596,9 @@ std::optional<size_t> BinaryNinja::FuzzyMatchSingle(const std::string& target, c
}
return result;
}
+
+
+void BinaryNinja::SetThreadName(const std::string& name)
+{
+ BNSetThreadName(name.c_str());
+}
diff --git a/binaryninjaapi.h b/binaryninjaapi.h
index 49f57fad..f601c635 100644
--- a/binaryninjaapi.h
+++ b/binaryninjaapi.h
@@ -1998,6 +1998,8 @@ namespace BinaryNinja {
std::map<std::string, uint64_t> GetMemoryUsageInfo();
+ void SetThreadName(const std::string& name);
+
/*!
\ingroup databuffer
*/
diff --git a/binaryninjacore.h b/binaryninjacore.h
index 18bd2faf..3c45ff88 100644
--- a/binaryninjacore.h
+++ b/binaryninjacore.h
@@ -6619,6 +6619,8 @@ extern "C"
BINARYNINJACOREAPI size_t BNGetWorkerThreadCount(void);
BINARYNINJACOREAPI void BNSetWorkerThreadCount(size_t count);
+ BINARYNINJACOREAPI void BNSetThreadName(const char* name);
+
// Background task progress reporting
BINARYNINJACOREAPI BNBackgroundTask* BNBeginBackgroundTask(const char* initialText, bool canCancel);
BINARYNINJACOREAPI void BNFinishBackgroundTask(BNBackgroundTask* task);