The MemoryWindow.cpp strings should be the same as the
MemoryCheckDlg.cpp strings so that translators don't
have to translate very similar strings twice.
Also adding i18n comments. These strings are *very* easy
to misinterpret in my opinion.
std::string's operator+ will handle this. Also move std::string to where
they're actually needed. There's no need to construct an unnecessary
string if the first failure case occurs.
This is done to remove confusions among potential debugger users and to also make it more accurately tell what this feature is actually doing. Despite being true that it is using a memcheck (and it certianly checks that memory), the idea being to break on a memory access isn't really obvious especially considering that memchecks are also used in full MMU emulation to handle exceptions. It also doesn't help that memchecks are now supported in every builds.
It also changes the corresponding log because this log would be wanted by the user which means it should be more obvious that it was caused by the "memory breakpoint".
Changes:
- MemoryWindow was cleaned up and gives more feedback on searches.
Some bugs were fixed as well:
- A complex bug that allowed tearing off tabs and opening multiple
copies of a debug panel which lead to segfaults
- Another segfault related to right-click menus on code/memory views
when those tools were floating in their own window.
There might be a better way to highlight the options when adding the memory check, but for now, this works and the breakpoint list reports the right settings anyway.
Add the CCodeWindow to the constructor of the memoryWindow so it can call the notify update of the breakpoint list.
Add the case of breakpoint update when receiving an event (the update command was issued, but wasn't managed before).
Run clang format and renamed the code window names.
On OS X, this broke Cmd-V to paste in the text boxes. Apparently wx
thinks having mnemonics (which are Alt-* on Windows) be Cmd-* on OS X,
even if this disables standard shortcuts, is a good idea.
Lioncash suggested just getting rid of the accelerators on non-menu
controls, so I'm doing that rather than disabling them only on OS X.
The PowerPC CPU has bits in MSR (DR and IR) which control whether
addresses are translated. We should respect these instead of mixing
physical addresses and translated addresses into the same address space.
This is mostly mass-renaming calls to memory accesses APIs from places
which expect address translation to use a different version from those
which do not expect address translation.
This does very little on its own, but it's the first step to a correct BAT
implementation.
These ID values would clash with the window parent IDs of all the actual debugger panes (they are in the 350 range as well).
For example, attempting to show and then close the memory window would cause an assertion, because it would attempt to destroy the text control for searching through memory, rather than destroying the actual parent window it's attached to.
These IDs are only used locally, so their value doesn't matter.
Minor other alterations that relate to above as well.
Also added the PanicAlertT version of alerts for some error messages that
use PanicAlert. We want the user to actually understand why the error
occurred.