Merge pull request #13691 from TryTwo/PR_Notes

Debugger Add note-type symbols .
This commit is contained in:
JMC47
2025-06-22 01:05:42 -04:00
committed by GitHub
12 changed files with 519 additions and 65 deletions

View File

@ -51,6 +51,7 @@ void SymbolDB::Clear(const char* prefix)
{
// TODO: honor prefix
m_functions.clear();
m_notes.clear();
m_checksum_to_function.clear();
}

View File

@ -29,6 +29,16 @@ struct SCall
u32 call_address;
};
struct Note
{
std::string name;
u32 address = 0;
u32 size = 0;
int layer = 0;
Note() = default;
};
struct Symbol
{
enum class Type
@ -71,6 +81,7 @@ class SymbolDB
{
public:
using XFuncMap = std::map<u32, Symbol>;
using XNoteMap = std::map<u32, Note>;
using XFuncPtrMap = std::map<u32, std::set<Symbol*>>;
SymbolDB();
@ -86,6 +97,7 @@ public:
std::vector<Symbol*> GetSymbolsFromHash(u32 hash);
const XFuncMap& Symbols() const { return m_functions; }
const XNoteMap& Notes() const { return m_notes; }
XFuncMap& AccessSymbols() { return m_functions; }
bool IsEmpty() const;
void Clear(const char* prefix = "");
@ -94,6 +106,7 @@ public:
protected:
XFuncMap m_functions;
XNoteMap m_notes;
XFuncPtrMap m_checksum_to_function;
};
} // namespace Common