mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-22 22:00:39 -06:00
Debugger symbols: Add new symbol type: Notes.. Notes are for naming single instructions, or small groups of instructions.
Notes are separate from function symbols, and can be searched separately. Unlike functions, notes of different length can overlap each other. In the instruction window, a note will always display over the function symbol.
This commit is contained in:
@ -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
|
||||
|
Reference in New Issue
Block a user