mirror of https://github.com/acidanthera/audk.git
Fixed bug of incorrect processing of hexadecimal numbers.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@2567 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
parent
7a743ae481
commit
df13cebafa
|
@ -427,7 +427,7 @@ CSymbolFromString::CSymbolFromString(const string& strSymbol, bool b)
|
||||||
bStatic = b;
|
bStatic = b;
|
||||||
|
|
||||||
istringstream is(strSymbol);
|
istringstream is(strSymbol);
|
||||||
is >> strAddress >> strName >> getUINT64(ullRva) >> strFrom;
|
is >> strAddress >> strName >> hex >> getUINT64(ullRva) >> strFrom;
|
||||||
if (strFrom == "f")
|
if (strFrom == "f")
|
||||||
{
|
{
|
||||||
bFunction = true;
|
bFunction = true;
|
||||||
|
@ -569,14 +569,14 @@ CFvMap::~CFvMap()
|
||||||
delete *i;
|
delete *i;
|
||||||
}
|
}
|
||||||
|
|
||||||
class CFvMapFormatter : public CObjRoot
|
class CFvMapGenerator : public CObjRoot
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
CFvMapFormatter(const IFirmwareVolume *pFv) : m_pFv(pFv) {}
|
CFvMapGenerator(const IFirmwareVolume *pFv) : m_pFv(pFv) {}
|
||||||
CFvMapFormatter(const CFvMapFormatter& r) : m_pFv(r.m_pFv) {}
|
CFvMapGenerator(const CFvMapGenerator& r) : m_pFv(r.m_pFv) {}
|
||||||
|
|
||||||
template <class _E, class _Tr>
|
template <class _E, class _Tr>
|
||||||
friend basic_ostream<_E, _Tr>& operator << (basic_ostream<_E, _Tr>&, CFvMapFormatter);
|
friend basic_ostream<_E, _Tr>& operator << (basic_ostream<_E, _Tr>&, CFvMapGenerator);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
static bool Less(const IModule*, const IModule*);
|
static bool Less(const IModule*, const IModule*);
|
||||||
|
@ -586,10 +586,10 @@ private:
|
||||||
};
|
};
|
||||||
|
|
||||||
template <class _E, class _Tr>
|
template <class _E, class _Tr>
|
||||||
basic_ostream<_E, _Tr>& operator << (basic_ostream<_E, _Tr>& os, CFvMapFormatter fvMapFmt)
|
basic_ostream<_E, _Tr>& operator << (basic_ostream<_E, _Tr>& os, CFvMapGenerator fvMapFmt)
|
||||||
{
|
{
|
||||||
vector<IModule*> rgMods(fvMapFmt.m_pFv->begin(), fvMapFmt.m_pFv->end());
|
vector<IModule*> rgMods(fvMapFmt.m_pFv->begin(), fvMapFmt.m_pFv->end());
|
||||||
sort(rgMods.begin(), rgMods.end(), CFvMapFormatter::Less);
|
sort(rgMods.begin(), rgMods.end(), CFvMapGenerator::Less);
|
||||||
for (vector<IModule*>::iterator i = rgMods.begin(); i != rgMods.end(); i++)
|
for (vector<IModule*>::iterator i = rgMods.begin(); i != rgMods.end(); i++)
|
||||||
{
|
{
|
||||||
os << (*i)->strName << hex << " (BaseAddress=" << putUINT64((*i)->BaseAddress());
|
os << (*i)->strName << hex << " (BaseAddress=" << putUINT64((*i)->BaseAddress());
|
||||||
|
@ -611,7 +611,7 @@ basic_ostream<_E, _Tr>& operator << (basic_ostream<_E, _Tr>& os, CFvMapFormatter
|
||||||
return os;
|
return os;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool CFvMapFormatter::Less(const IModule *pModL, const IModule *pModR)
|
bool CFvMapGenerator::Less(const IModule *pModL, const IModule *pModR)
|
||||||
{
|
{
|
||||||
return pModL->BaseAddress() < pModR->BaseAddress();
|
return pModL->BaseAddress() < pModR->BaseAddress();
|
||||||
}
|
}
|
||||||
|
@ -641,7 +641,7 @@ int CApplication::Run(void)
|
||||||
CMapFileSetFromInfFile mapSet(m_ppszArg[2]);
|
CMapFileSetFromInfFile mapSet(m_ppszArg[2]);
|
||||||
ofstream ofs(m_ppszArg[3]);
|
ofstream ofs(m_ppszArg[3]);
|
||||||
CFvMap fvMap(&ffsSet, &mapSet);
|
CFvMap fvMap(&ffsSet, &mapSet);
|
||||||
ofs << CFvMapFormatter(&fvMap);
|
ofs << CFvMapGenerator(&fvMap);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue