Merge pull request #32 from jakcron/codeobj-development

[nxtool] Add get() methods to Nso & Nro Processes for access to .ro data
This commit is contained in:
Jack 2018-07-10 23:17:07 +08:00 committed by GitHub
commit b67ac235e7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 45 additions and 0 deletions

View file

@ -91,6 +91,11 @@ void NroProcess::setAssetRomfsExtractPath(const std::string& path)
mAssetProc.setRomfsExtractPath(path);
}
const RoMetadataProcess& NroProcess::getRoMetadataProcess() const
{
return mRoMeta;
}
void NroProcess::importHeader()
{
fnd::Vec<byte_t> scratch;

View file

@ -31,6 +31,8 @@ public:
void setAssetIconExtractPath(const std::string& path);
void setAssetNacpExtractPath(const std::string& path);
void setAssetRomfsExtractPath(const std::string& path);
const RoMetadataProcess& getRoMetadataProcess() const;
private:
const std::string kModuleName = "NroProcess";

View file

@ -66,6 +66,11 @@ void NsoProcess::setListSymbols(bool listSymbols)
mRoMeta.setListSymbols(listSymbols);
}
const RoMetadataProcess& NsoProcess::getRoMetadataProcess() const
{
return mRoMeta;
}
void NsoProcess::importHeader()
{
fnd::Vec<byte_t> scratch;

View file

@ -24,6 +24,8 @@ public:
void setInstructionType(nx::npdm::InstructionType type);
void setListApi(bool listApi);
void setListSymbols(bool listSymbols);
const RoMetadataProcess& getRoMetadataProcess() const;
private:
const std::string kModuleName = "NsoProcess";

View file

@ -74,6 +74,31 @@ void RoMetadataProcess::setListSymbols(bool listSymbols)
mListSymbols = listSymbols;
}
const std::vector<SdkApiString>& RoMetadataProcess::getSdkVerApiList() const
{
return mSdkVerApiList;
}
const std::vector<SdkApiString>& RoMetadataProcess::getPublicApiList() const
{
return mPublicApiList;
}
const std::vector<SdkApiString>& RoMetadataProcess::getDebugApiList() const
{
return mDebugApiList;
}
const std::vector<SdkApiString>& RoMetadataProcess::getPrivateApiList() const
{
return mPrivateApiList;
}
const fnd::List<ElfSymbolParser::sElfSymbol>& RoMetadataProcess::getSymbolList() const
{
return mSymbolList.getSymbolList();
}
void RoMetadataProcess::importApiList()
{
if (mApiInfo.size > 0)

View file

@ -27,6 +27,12 @@ public:
void setInstructionType(nx::npdm::InstructionType type);
void setListApi(bool listApi);
void setListSymbols(bool listSymbols);
const std::vector<SdkApiString>& getSdkVerApiList() const;
const std::vector<SdkApiString>& getPublicApiList() const;
const std::vector<SdkApiString>& getDebugApiList() const;
const std::vector<SdkApiString>& getPrivateApiList() const;
const fnd::List<ElfSymbolParser::sElfSymbol>& getSymbolList() const;
private:
const std::string kModuleName = "RoMetadataProcess";