Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

+Added an emulator_set_registers function. #60

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions src/emulator-debug.c
Original file line number Diff line number Diff line change
Expand Up @@ -378,6 +378,13 @@ void emulator_disassemble_rom(Emulator* e, u32 rom_addr, char* buffer,

Registers emulator_get_registers(Emulator* e) { return REG; }

void emulator_set_registers(Emulator* e, Registers* r) {
if (!r) {
return;
}
REG = *r;
}

int emulator_get_max_breakpoint_id(void) {
return s_breakpoint_max_id;
}
Expand Down
1 change: 1 addition & 0 deletions src/emulator-debug.h
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,7 @@ int emulator_disassemble(Emulator*, Address, char* buffer, size_t size);
void emulator_disassemble_rom(Emulator*, u32 rom_addr, char* buffer,
size_t size);
Registers emulator_get_registers(Emulator*);
void emulator_set_registers(Emulator*, Registers*);

int emulator_get_max_breakpoint_id(void);
Breakpoint emulator_get_breakpoint(int id);
Expand Down