diff options
| author | rose <47357290+rose4096@users.noreply.github.com> | 2022-06-09 17:06:30 -0400 |
|---|---|---|
| committer | rose <47357290+rose4096@users.noreply.github.com> | 2022-06-09 17:06:30 -0400 |
| commit | 94649dde0d847aa2407d565632f7d2c3cdff32f5 (patch) | |
| tree | 3af9509057f2fea45c6ae11a8e54d2cd57132bda /debuginfo.cpp | |
| parent | 3556fc9c0cf451739df838ad78b5be52a2d482f3 (diff) | |
Add `IsExternal` callback to debug info API
Diffstat (limited to 'debuginfo.cpp')
| -rw-r--r-- | debuginfo.cpp | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/debuginfo.cpp b/debuginfo.cpp index e8450399..59636d4a 100644 --- a/debuginfo.cpp +++ b/debuginfo.cpp @@ -222,6 +222,12 @@ Ref<DebugInfo> DebugInfoParser::Parse(Ref<BinaryView> view, Ref<DebugInfo> exist } +bool DebugInfoParser::IsExternal() const +{ + return BNIsDebugInfoParserExternal(m_object); +} + + bool DebugInfoParser::IsValidForView(const Ref<BinaryView> view) const { return BNIsDebugInfoParserValidForView(m_object, view->GetObject()); @@ -232,6 +238,12 @@ bool DebugInfoParser::IsValidForView(const Ref<BinaryView> view) const // Plugin registration APIs // ////////////////////////////// +bool CustomDebugInfoParser::IsExternalCallback(void* ctxt) +{ + CustomDebugInfoParser* parser = (CustomDebugInfoParser*)ctxt; + return parser->IsExternal(); +} + bool CustomDebugInfoParser::IsValidCallback(void* ctxt, BNBinaryView* view) { @@ -249,5 +261,5 @@ void CustomDebugInfoParser::ParseCallback(void* ctxt, BNDebugInfo* debugInfo, BN CustomDebugInfoParser::CustomDebugInfoParser(const string& name) : DebugInfoParser( - BNNewDebugInfoParserReference(BNRegisterDebugInfoParser(name.c_str(), IsValidCallback, ParseCallback, this))) + BNNewDebugInfoParserReference(BNRegisterDebugInfoParser(name.c_str(), IsExternalCallback, IsValidCallback, ParseCallback, this))) {} |
