MCPcopy Create free account
hub / github.com/Vector35/binaryninja-api / QueryBoardNames

Method QueryBoardNames

firmwareninja.cpp:422–445  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

420
421
422std::vector<std::string> FirmwareNinja::QueryBoardNames()
423{
424 std::vector<std::string> result;
425 char** boards;
426 auto platform = m_view->GetDefaultPlatform();
427 if (!platform)
428 return result;
429
430 auto arch = platform->GetArchitecture();
431 if (!arch)
432 return result;
433
434 int count = BNFirmwareNinjaQueryBoardNamesForArchitecture(m_object, arch->GetObject(), &boards);
435 if (count <= 0)
436 return result;
437
438 result.reserve(count);
439 for (size_t i = 0; i < count; i++)
440 result.push_back(boards[i]);
441
442 BNFirmwareNinjaFreeBoardNames(boards, count);
443 sort(result.begin(), result.end());
444 return result;
445}
446
447
448std::vector<FirmwareNinjaDevice> FirmwareNinja::QueryDevicesForBoard(const std::string& board)

Callers

nothing calls this directly

Calls 6

GetDefaultPlatformMethod · 0.80
push_backMethod · 0.80
GetArchitectureMethod · 0.45
GetObjectMethod · 0.45
beginMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected