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

Discussing Breakpoint improvements #4158

Closed
mchubby opened this issue Oct 13, 2013 · 2 comments
Closed

Discussing Breakpoint improvements #4158

mchubby opened this issue Oct 13, 2013 · 2 comments

Comments

@mchubby
Copy link

mchubby commented Oct 13, 2013

PPSSPP has made huge leaps recently in the debugging department thanks to great contributions by @Kingcom and @unknownbrackets (#2584, #3366).

I'm opening this meta-issue to discuss what improvements could be made to make it even awesomer.

  • What is your use case of bps, mem bps, ge bps?
  • What feels the most usable, or conversely needs rework?

Feel free to input your opinion below.

Here is the current state of the Breakpoint Window:

Breakpoint Dialog
#1 - Improvements to breakpoints (logging, etc.)

Log breakpoints are not a specific type of breakpoint, rather it is a breakpoint which triggers an action, which is logging an expression.
They offer the choice to not enter debug mode when hit.

Let's review what options are offered in other debuggers:

  • OllyDbg 1.x:
    OllyDbg offers to execute diverse actions depending on whether a condition is fulfilled, etc. It can also cast the logged expression to a struct/string/etc. pointer for proper display.

Log bp in OllyDbg 1

  • OllyDbg 2.x:
    OllyDbg goes a bit further, removes support for plugin (temp?) and is able to log several expressions

Log bp in OllyDbg 2 ss1
Log bp in OllyDbg 2 ss2

  • Visual Studio:
    VS has more basic logging, but being a source-based debugger, can support symbols as well.

Log bp in VS2010 ss1
Log bp in VS2010 ss2

Actions

  • Add a textedit for an expression. When bp is hit & conditions are met (in pseudo-language)

if bp.expr.valid(): log(expr.eval(currMIPS))

  • Add a checkbox to continue execution
  • Take screenshot on bp?
    Cannot build on ArchLinux 64bit #2 - Enhancements to memory view
  • Have the memory view set viewport at a particular expression (e.g. a1+4) when bp is hit
  • Keep navigation stack so you can return to a previous location instead of typing it again.
  • Right-click on location => in contextual menu, offer option to set or modify a memory bp / dump with this location as base address / highlight (change background color)
  • location under cursor to be interpreted with base conversion (8-bit, 16-bit, 32-bit). Detect if it is an address pointing to a code / variable section
  • select range (mouse selection or R-click, select x bytes from here) and ability to copy / dump selection, may be useful for tile extractors? Offer inline string decoding options (e.g. display converted SJIS)
  • Enable more interactions with the symbols list?

Actions

  • Add a textedit for an expression. When bp is hit & conditions are met, update memory view

Mockup

mockup

Other improvements

  • Auto-load (auto-save?) Map symbols
  • Remember bps when emulator is restarted
  • Label breakpoints / comment field?
  • how to handle memory bps when a system library writes into a buffer? (no break currently)

Sorry if it looks like a wishlist of mine... Also, I do not use the Ge debugger so can't comment on it.

@unknownbrackets
Copy link
Collaborator

Logging doesn't seem crazy, but I don't really see myself using it much. I could definitely be wrong.

Definitely one could do a lot more with the memory view.

Well, iirc, "on change" doesn't work. It could work by, every time it breaks, checking the value and setting the old historic value if it changed or something.

Symbols - there's a config setting for that, AutoSaveSymbolMap. Set it in ppsspp.ini.

I actually like it "forgetting" breakpoints on restart, which is what Visual Studio does I thought. I wouldn't mind if it remembered them and just had them disabled by default, though. They're almost "bookmarks" (which is a feature of Visual Studio I use quite a bit.) Labels probably make sense if we keep them.

Memory breakpoints when HLE writes is a pain. The biggest problem is that it will cause a performance impact (even when there are no breakpoints) if done the most obvious way. But we'll want to do it eventually.

-[Unknown]

@unknownbrackets
Copy link
Collaborator

Log messages now exist - and now that we have a debugger API (#10909), a lot of these features could be automated via API client for specific use cases - which I think is more powerful.

We also do now have a navigation stack (so does the web debugger UI already.)

I'm going to close this - we can open specific issues for specific improvements.

-[Unknown]

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

No branches or pull requests

2 participants