Adding modules/functions to the debugger.

This commit is contained in:
Ben Vanik
2015-06-08 21:12:40 -07:00
parent 9d7d6df476
commit 573f190a43
47 changed files with 1427 additions and 128 deletions

View File

@@ -12,6 +12,7 @@
#include <string>
#include "xenia/cpu/module.h"
#include "xenia/kernel/xobject.h"
#include "xenia/xbox.h"
@@ -20,13 +21,23 @@ namespace kernel {
class XModule : public XObject {
public:
XModule(KernelState* kernel_state, const std::string& path);
enum class ModuleType {
// Matches debugger Module type.
kKernelModule = 0,
kUserModule = 1,
};
XModule(KernelState* kernel_state, ModuleType module_type,
const std::string& path);
virtual ~XModule();
ModuleType module_type() const { return module_type_; }
const std::string& path() const { return path_; }
const std::string& name() const { return name_; }
bool Matches(const std::string& name) const;
xe::cpu::Module* processor_module() const { return processor_module_; }
virtual uint32_t GetProcAddressByOrdinal(uint16_t ordinal) = 0;
virtual uint32_t GetProcAddressByName(const char* name) = 0;
virtual X_STATUS GetSection(const char* name, uint32_t* out_section_data,
@@ -35,8 +46,11 @@ class XModule : public XObject {
protected:
void OnLoad();
ModuleType module_type_;
std::string name_;
std::string path_;
xe::cpu::Module* processor_module_;
};
} // namespace kernel