!651 修改DfxArk类的使用方式

Merge pull request !651 from wenlong_12/OpenHarmony_feature_20241121
This commit is contained in:
openharmony_ci 2024-11-22 10:18:15 +00:00 committed by Gitee
commit 3219999c14
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F

View File

@ -937,7 +937,7 @@ public:
HLOGD("symbol file name %s loadOffSet %u abcDataSize_ %u",
filePath_.c_str(), (uint32_t)loadOffSet_, (uint32_t)abcDataSize_);
}
auto ret = DfxArk::ArkCreateJsSymbolExtractor(&arkExtractorptr_);
auto ret = DfxArk::Instance().ArkCreateJsSymbolExtractor(&arkExtractorptr_);
if (ret < 0) {
arkExtractorptr_ = 0;
HLOGE("failed to call ArkCreateJsSymbolExtractor, the symbol file is:%s", filePath_.c_str());
@ -1000,9 +1000,10 @@ public:
JsFunction jsFunc;
std::string module = map->name;
HLOGD("map->name module:%s", module.c_str());
auto ret = DfxArk::ParseArkFrameInfo(static_cast<uintptr_t>(ip), static_cast<uintptr_t>(map->begin),
loadOffSet_, abcDataPtr_.get(), abcDataSize_,
arkExtractorptr_, &jsFunc);
auto ret = DfxArk::Instance().ParseArkFrameInfo(static_cast<uintptr_t>(ip),
static_cast<uintptr_t>(map->begin),
loadOffSet_, abcDataPtr_.get(), abcDataSize_,
arkExtractorptr_, &jsFunc);
if (ret == -1) {
HLOGD("failed to call ParseArkFrameInfo, the symbol file is : %s", map->name.c_str());
return DfxSymbol(ip, "");