A new debugger.

Lots of bugs/rough edges/etc - issues will be filed.
Old-style debugging still works (just use --emit_source_annotations to get
the helpful movs back and --break_on_instruction will still fire).
This commit is contained in:
Ben Vanik
2015-09-20 21:31:05 -07:00
parent 8046c19898
commit 5d033f9cb3
90 changed files with 4183 additions and 4651 deletions

View File

@@ -28,7 +28,8 @@ KernelModule::KernelModule(KernelState* kernel_state, const char* path)
KernelModule::~KernelModule() {}
uint32_t KernelModule::GetProcAddressByOrdinal(uint16_t ordinal) {
auto export_entry = export_resolver_->GetExportByOrdinal(name(), ordinal);
auto export_entry =
export_resolver_->GetExportByOrdinal(name().c_str(), ordinal);
if (!export_entry) {
// Export (or its parent library) not found.
return 0;

View File

@@ -636,6 +636,10 @@ void XThread::SetActiveCpu(uint32_t cpu_index) {
xe::store_and_swap<uint8_t>(pcr + 0x10C, cpu_index);
}
uint32_t XThread::suspend_count() {
return guest_object<X_KTHREAD>()->suspend_count;
}
X_STATUS XThread::Resume(uint32_t* out_suspend_count) {
--guest_object<X_KTHREAD>()->suspend_count;

View File

@@ -161,6 +161,7 @@ class XThread : public XObject {
uint32_t active_cpu() const;
void SetActiveCpu(uint32_t cpu_index);
uint32_t suspend_count();
X_STATUS Resume(uint32_t* out_suspend_count = nullptr);
X_STATUS Suspend(uint32_t* out_suspend_count);
X_STATUS Delay(uint32_t processor_mode, uint32_t alertable,