Skip to content

Commit

Permalink
Show memory view
Browse files Browse the repository at this point in the history
  • Loading branch information
emoon committed Feb 17, 2024
1 parent 74f6d94 commit d9de694
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/debugger/debugger.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,8 @@ Debugger* Debugger_create() {
style.Colors[ImGuiCol_WindowBg].w = 1.0f;
}

debugger->memory_view = new MemoryView();

return debugger;
}

Expand Down Expand Up @@ -220,6 +222,9 @@ static void draw_debugger_window(Debugger* self) {
}
*/

uae_u8* addr = memory_get_real_address(0x00c000000);
self->memory_view->draw_window("Memory View", addr, 512 * 1024);

// 1. Show the big demo window (Most of the sample code is in ImGui::ShowDemoWindow()! You can browse its code to
// learn more about Dear ImGui!).
// if (show_demo_window)
Expand Down
3 changes: 3 additions & 0 deletions src/debugger/debugger.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
#include <capstone/capstone.h>
#include <stdint.h>

#include "memory_view.h"

struct SDL_Window;
struct SDL_Renderer;
union SDL_Event;
Expand All @@ -13,6 +15,7 @@ struct Debugger {
SDL_Window* window;
SDL_Renderer* renderer;
csh capstone;
MemoryView* memory_view;
};

enum DebuggerMode {
Expand Down

0 comments on commit d9de694

Please sign in to comment.