top | up | prev | next

FunctionIndex Class

Definition at line 22 of FunctionIndex.hpp

Constructors

FunctionIndex(Module* module_)

Member Functions

void AddFunction(const boost::uuids::uuid& functionId, FunctionSymbol* functionSymbol)
const boost::uuids::uuid& GetMainFunctionId() const
void SetMainFunctionId(const boost::uuids::uuid& functionId)
void Write(BinaryWriter& writer)

Member Variables

std::unordered_map<boost::uuids::uuid, FunctionSymbol*, boost::hash<boost::uuids::uuid>> functionMap
boost::uuids::uuid mainFunctionId
Module* module

Constructor Details

FunctionIndex Constructor

cmajor::symbols::FunctionIndex::FunctionIndex(Module * module_)

Definition at line 16 of FunctionIndex.cpp :
16 : module(module_)mainFunctionId(boost::uuids::nil_uuid())
17 {
18 }


Declaration at line 25 of FunctionIndex.hpp


Member Function Details

AddFunction Member Function

void cmajor::symbols::FunctionIndex::AddFunction(const boost::uuids::uuid& functionId, FunctionSymbol * functionSymbol)

Definition at line 20 of FunctionIndex.cpp :
21 {
22     std::lock_guard<std::recursive_mutex> lock(module->GetLock());
23     if (functionMap.find(functionId) == functionMap.cend())
24     {
25         functionMap[functionId] = functionSymbol;
26     }
27 }


Declaration at line 26 of FunctionIndex.hpp

Calls: cmajor::symbols::Module::GetLock


GetMainFunctionId Member Function

const boost::uuids::uuid& cmajor::symbols::FunctionIndex::GetMainFunctionId() const

Definition at line 28 of FunctionIndex.hpp :
28 { return mainFunctionId; }

Called by: cmajor::symbols::Module::WriteProjectDebugInfoFile


SetMainFunctionId Member Function

void cmajor::symbols::FunctionIndex::SetMainFunctionId(const boost::uuids::uuid& functionId)

Definition at line 29 of FunctionIndex.cpp :
30 {
31     mainFunctionId = functionId;
32 }


Declaration at line 27 of FunctionIndex.hpp


Write Member Function

void cmajor::symbols::FunctionIndex::Write(BinaryWriter& writer)

Definition at line 34 of FunctionIndex.cpp :
35 {
36     int32_t numFunctions = functionMap.size();
37     cmajor::debug::WriteNumberOfFunctionIndexFunctionRecords(writernumFunctions);
38     for (const auto& p : functionMap)
39     {
40         FunctionSymbol* functionSymbol = p.second;
41         cmajor::debug::WriteFunctionIndexFunctionRecord(writerp.firstToUtf8(functionSymbol->FullName())ToUtf8(functionSymbol->MangledName()));
42     }
43 }


Calls: cmajor::symbols::FunctionSymbol::FullName , cmajor::symbols::Symbol::MangledName

Called by: cmajor::symbols::Module::WriteProjectDebugInfoFile


top | up | prev | next