top | up | prev | next

GlobalUnwindInfo Class

Definition at line 44 of Unwind.cpp

Constructors

GlobalUnwindInfo()

Member Functions

void AddUnwindInfo(void* functionAddress, const char* functionName, const char* sourceFilePath)
void DisposeCallStack(UnwindInfo* unwindInfoList)
void Done() static
const char* GetCallStack(UnwindInfo* unwindInfoList)
void Init() static
bool Initialized() static
GlobalUnwindInfo& Instance() static

Member Variables

std::unordered_map<void*, std::string*> callStackMap
std::unique_ptr<GlobalUnwindInfo> instance static
std::unordered_map<void*, FunctionUnwindInfo*> unwindInfoMap
std::vector<std::unique_ptr<FunctionUnwindInfo>> unwindInfoVec

Constructor Details

GlobalUnwindInfo Constructor

GlobalUnwindInfo::GlobalUnwindInfo()

Definition at line 74 of Unwind.cpp :
 75 {
 76 }


Declaration at line 56 of Unwind.cpp


Member Function Details

AddUnwindInfo Member Function

void GlobalUnwindInfo::AddUnwindInfo(void * functionAddress, const char * functionName, const char * sourceFilePath)

Definition at line 78 of Unwind.cpp :
 79 {
 80     auto it = unwindInfoMap.find(functionAddress);
 81     if (it == unwindInfoMap.cend())
 82     {
 83         FunctionUnwindInfo* unwindInfo = new FunctionUnwindInfo(functionNamesourceFilePath);
 84         unwindInfoVec.push_back(std::unique_ptr<FunctionUnwindInfo>(unwindInfo));
 85         unwindInfoMap[functionAddress] = unwindInfo;
 86     }
 87 }


Declaration at line 51 of Unwind.cpp


DisposeCallStack Member Function

void GlobalUnwindInfo::DisposeCallStack(UnwindInfo * unwindInfoList)

Definition at line 120 of Unwind.cpp :
121 {
122     auto it = callStackMap.find(unwindInfoList);
123     if (it != callStackMap.cend())
124     {
125         delete it->second;
126         callStackMap.erase(unwindInfoList);
127     }
128 }


Declaration at line 53 of Unwind.cpp


Done Member Function

void GlobalUnwindInfo::Done() static

Definition at line 67 of Unwind.cpp :
 68 {
 69     instance.reset();
 70 }


Declaration at line 48 of Unwind.cpp


GetCallStack Member Function

const char * GlobalUnwindInfo::GetCallStack(UnwindInfo * unwindInfoList)

Definition at line 89 of Unwind.cpp
Declaration at line 52 of Unwind.cpp


Init Member Function

void GlobalUnwindInfo::Init() static

Definition at line 62 of Unwind.cpp :
 63 {
 64     instance.reset(new GlobalUnwindInfo());
 65 }


Declaration at line 47 of Unwind.cpp


Initialized Member Function

bool GlobalUnwindInfo::Initialized() static

Definition at line 49 of Unwind.cpp :
 49 { return instance != nullptr; }


Instance Member Function

GlobalUnwindInfo & GlobalUnwindInfo::Instance() static

Definition at line 50 of Unwind.cpp :
 50 { return *instance; }


top | up | prev | next