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

Breakpoints #28

Open
TryTwo opened this issue Dec 12, 2022 · 3 comments
Open

Breakpoints #28

TryTwo opened this issue Dec 12, 2022 · 3 comments

Comments

@TryTwo
Copy link

TryTwo commented Dec 12, 2022

I think there should be an add/remove code breakpoints like there is for memchecks.

Also, it would be nice to specify if any breakpoint should pause on break. For memory breakpoints, specifying read and/or write would also be good.

I could try to add this. Would memory and code breakpoints both go into the same API file? Also not sure the best way to handle the extra args.

@fechan
Copy link

fechan commented May 7, 2023

+1 for resuming after breakpoints

I tried implementing a function that would resume emulation so I could call it after a breakpoint pauses emulation, but calling it doesn't actually resume emulation for some reason and just causes the Play button in the Dolphin window to break for some reason. I don't know how else to try implementing this.

static PyObject* EmulationResume(PyObject* self)
{
  if (Core::GetState() == Core::State::Paused)
  {
    Core::SetState(Core::State::Running);
  }
  Py_RETURN_NONE;
}

The content of the function is what gets run from MainWindow when you press the play button: https://github.com/dolphin-emu/dolphin/blob/2319210d853899a4d0659c120cfa6162a108daed/Source/Core/DolphinQt/MainWindow.cpp#L794

@TryTwo
Copy link
Author

TryTwo commented May 7, 2023

Can you just make a breakpoint without the pause on break flag? That's what I was doing, and the script still stops the game to execute the code.

@fechan
Copy link

fechan commented May 7, 2023

Ah! I didn't realize you could just set "Write to log" when making a breakpoint. Yeah, that does work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants