Commit graph

215 commits

Author SHA1 Message Date
degasus
c375111076 Options: merge SCoreStartupParameter into SConfig 2015-06-12 19:07:45 +02:00
Ryan Houdek
59e2225f7d Remove ARMv7 support. 2015-06-07 22:44:13 -05:00
Ryan Houdek
d0ae3f7d24 Break out the disassembler code from the WXWidgets UI.
This cleans up some of the code between core and UI for disassembling and dumping code blocks.
Should help the QT UI in bringing up its debug UI since it won't have to deal with this garbage now.
2015-05-31 18:16:59 -05:00
Tillmann Karras
30ebb2459e Set copyright year to when a file was created 2015-05-25 13:22:31 +02:00
Tillmann Karras
cefcb0ace9 Update license headers to GPLv2+ 2015-05-25 13:22:31 +02:00
Lioncash
5c3fecc8e5 DolphinWX: Add missing breaks to a switch in RegisterView
Technically the fallthrough would never happen, as the row numbers correspond to the grid view (which will always be zero or greater). However, it gets rid of compiler warnings on higher warning levels.
2015-05-23 22:16:39 -04:00
Lioncash
8dc2909c00 JitWindow: Add missing virtual destructor to HostDisassembler
HostDisassemblerLLVM has a destructor, but the class uses a pointer to the base class.
2015-05-20 12:27:47 -04:00
Lioncash
a7e9aea797 DolphinWX: Remove unnecessary includes 2015-05-08 12:39:26 -04:00
Lioncash
88f7536d81 DolphinWX: Remove unnecessary forward declarations
These are all fully defined
2015-04-28 17:32:38 -04:00
Lioncash
263e64e939 DolphinWX: Make some debugger functions/vars private
Some classes expose things that aren't used outside of them (and in some cases, shouldn't be exposed).
2015-04-27 20:42:18 -04:00
comex
3499f2c2d0 To make up for it, make pressing enter on the value textbox set the value. 2015-04-24 22:19:21 -04:00
comex
0c18e5886d Remove mnemonics in MemoryWindow.
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.
2015-04-24 22:06:03 -04:00
comex
37d00cceda Fix wx bullshit which made the watch view assert on my machine.
1) Apparently wxString::Format is type safe, and passing a u32 to it
with the format "%lu" crashes with a meaningless assertion failure.
Sure, it's the wrong type, but the error sure doesn't help...

2) "A MenuItem ID of Zero does not work under Mac".  Thanks for the
helpful assert message, no thanks for making your construct have random
platform-specific differences for no reason (it's not like menu item IDs
directly correspond to a part of Cocoa's menu API like they do on
Win32).
2015-04-24 22:04:46 -04:00
Lioncash
2cddb8f480 Debugger: Update the registers/watches before refreshing grids. 2015-04-15 00:13:13 -04:00
Lioncash
180854c617 Debugger: Fix memory leaks related to grid tables
Incrementing the reference count here isn't necessary, as they construct with a count of 1. Incrementing again results in the attributes not being freed.
2015-04-07 23:16:29 -04:00
Lioncash
5ada887f94 DolphinWX: Get rid of wxGrid-based casts in the debugger.
This technically also fixes a memory leak in WatchView.cpp, because the table setting was done such that the grid wouldn't take ownership of the table, which means said table wouldn't be deleted in the grid's destructor.
2015-03-24 14:09:33 -04:00
skidau
12155ddee4 Added the ability to split the Debugger window horizontally and vertically via the Add Panes menu. 2015-03-07 12:33:33 +11:00
Lioncash
d50c56c2e4 DolphinWX: Remove an unnecessary sizer from the watch window
The AUI manager already has the grid in place. Setting the sizer isn't needed.
2015-02-26 09:58:38 -05:00
skidau
f71f376371 Merge pull request #2117 from lioncash/id
DolphinWX: Remove unnecessary control IDs
2015-02-26 12:49:07 +11:00
Ryan Houdek
d6fcd85110 Merge pull request #2127 from lioncash/aui
DolphinWX: Relocate the address search into the code window
2015-02-25 10:36:07 -06:00
Lioncash
ce4b73388a DolphinWX: Relocate the address search into the code window
It's only function is in this pane. Leaving it on the main application toolbar not only looks gross, but subverts what a user might think it applies to.
2015-02-25 00:16:17 -05:00
Lioncash
792e166f87 Merge pull request #2118 from lioncash/aui
DolphinWX: Use AUI in the code window.
2015-02-24 21:45:16 -05:00
Lioncash
fd11f8fd29 DolphinWX: Use AUI in the code window.
Allows for resizing of the callstack, function call/callers windows etc.
First step in slightly improving the code window.
2015-02-24 21:31:28 -05:00
Lioncash
30c91a3003 DolphinWX: Remove unnecessary control IDs
These don't need to be specifically identified.
2015-02-24 08:31:52 -05:00
Lioncash
d50e7562af DolphinWX: Make RAM watch strings translateable 2015-02-23 11:02:42 -05:00
skidau
57e9d59704 Merge pull request #1978 from lioncash/dspwind
DSPDebugWindow: Fix issue where the DSPLLE window would hang Dolphin on OSX
2015-02-23 12:57:27 +11:00
Lioncash
a60d3306b1 PowerPC: Get rid of magic numbers related to interp/JIT initialization. 2015-02-19 12:16:53 -05:00
Lioncash
50f600c834 DolphinWX: Change Enable(false) calls into Disable() where possible 2015-02-14 16:00:15 -05:00
magumagu
ac54c6a4e2 Make address translation respect the CPU translation mode.
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.
2015-02-11 13:56:22 -08:00
Lioncash
73b77f55ba DSPDebugWindow: Fix issue where the DSPLLE window would hang Dolphin on OSX 2015-01-28 14:01:11 -05:00
Ryan Houdek
95ac48d605 Improve the LLVM disassembler in the debug window.
There are a couple things in this PR.
Fixes a bug where if we hit an invalid instruction we would infinite loop.
Fixes an issue where on AArch64 it would show invalid instructions for all NEON instructions.
This was due to asimd and crc being optional extensions and LLVM not enabling them by default.
So we have to specify a CPU which has the feature. LLVM 3.6 will let us select by features instead of CPUs, but we don't have a release of that quite
yet.

If we are on an architecture that has a known instruction size, we will continue onward after hitting the invalid instruction. If we don't have a
known instruction size like on x86, we will instead just dump the rest of the block.
2015-01-18 15:31:40 -06:00
Stevoisiak
6ad5e54970 DolphinWX/Globals: Variable naming consistency 2014-12-20 21:43:11 -05:00
skidau
5313dd1b8c Merge pull request #1702 from CarlKenner/DebugSymbols
Fix many bugs with the Symbols menu (when run with -d argument).
2014-12-17 22:04:56 +11:00
CarlKenner
6e7eb52211 Rename menu items, stop using PanicAlertT, remove -d when running from visual studio.
I accidentally committed my addition of the -d option that I used for testing, now it's fixed.
2014-12-17 01:12:33 +10:30
CarlKenner
dfd915eb53 Merge bad map file loading into the original function. 2014-12-17 01:11:58 +10:30
CarlKenner
f95f43fdde Apparently c_str doesn't return a C str. 2014-12-17 01:11:52 +10:30
CarlKenner
e246aaf419 Add "Load bad map file" option for map files on disc that don't quite match.
Currently it is very simple and naive, but filters out most of the bad matches.
2014-12-17 01:11:41 +10:30
CarlKenner
f54d9e33c2 Fix many bugs with the Symbols menu (when run with -d argument).
The Symbols menu is now fully useable.
2014-12-17 01:11:36 +10:30
Lioncash
20fc2d5674 MemoryWindow: Remove wxSprintf call, use wxString::Format instead. 2014-12-12 10:29:07 -05:00
Lioncash
04ee0245e2 WatchView: Pass string by reference in SetWatchName 2014-11-15 14:06:12 -05:00
Lioncash
ffc00b42e9 MemoryView: Fix a dealloc of a stack reference
stack allocation only works with the root menu. Any other children must be
heap allocated.

These however, will be freed by wxWidgets.
2014-11-13 20:10:40 -05:00
Lioncash
892bbdade6 DolphinWX: Eliminate some memory leaks
Since the menus aren't actually assigned a parent, they would not be freed by wx. Plus, these should have initially been constructed on the stack in the first place.
Technically any time someone right-clicked the game list they would be leaking memory.
2014-11-11 09:50:16 -05:00
Lioncash
ac387031a4 DolphinWX: Kill off trivial event tables
Also fixes some of the wonky stuff in Main where we would fire an event to do post-init stuff which isn't necessary anymore.
2014-11-09 00:08:33 -05:00
Lioncash
210567a919 DolphinWX: Remove unnecessary forward declarations 2014-11-07 22:16:13 -05:00
Lioncash
ee22d091a0 DolphinWX: Eliminate most usages of event tables in the debugger.
Moves things over to Bind.
2014-11-05 23:03:06 -05:00
Jasper St. Pierre
dd0aadac97 MemoryWindow: Use p_pFakeVMEM, not the virtual mirror
They point to the same contents, so there's no reason to use the
mirror. This lets us make all the mirrors static.
2014-11-02 16:34:17 -08:00
skidau
dbddc5f8e2 Fixed a warning in the add memcheck from Watch window 2014-10-31 11:26:17 +11:00
Rohit Nirmal
55f91ecba4 DolphinWX: Fix -Wsign-compare warnings. 2014-10-28 21:07:48 -05:00
Rohit Nirmal
b70a75776e DolphinWX: Remove unused variable. 2014-10-28 21:02:47 -05:00
skidau
4570dd7eeb Fixed a crash that would occur if a new watch were added by entering a watch name.
Code style updates.
2014-10-26 23:23:45 +11:00
skidau
73dca1ca33 Added a new option to add memchecks from the Watch window.
Fixed watch labels from being truncated at the first whitespace.
2014-10-26 16:14:17 +11:00
skidau
8d2931cf18 Breakpoints and watches are now loaded and saved on start/stop.
Saved Breakpoints and watches per game in the game ini.
2014-10-26 14:56:03 +11:00
skidau
b73130af77 Added Load/Save function for the Watch window.
Made the floating windows toolbars dockable.
Scaled down the breakpoint toolbar icons to 16x16.
2014-10-26 14:56:03 +11:00
skidau
b34e220086 Added a "Delete watch" context menu to the Watch window.
Added a "View memory" command to the context menu.
2014-10-26 14:56:03 +11:00
skidau
290e1bed37 Disable block linking while debugger stepping or if there are breakpoints 2014-10-26 14:56:02 +11:00
skidau
d0a3bb7650 Added "Add to watch" context menu items to the Memory and Register windows.
Added "View memory" context menu item to the Register window.
2014-10-26 14:56:02 +11:00
skidau
613cae613a Added a RAM Watch window to the debugger
Conflicts:
	Source/Core/Core/HW/Memmap.cpp
	Source/Core/Core/HW/Memmap.h
	Source/Core/DolphinWX/Debugger/CodeWindow.h
2014-10-26 14:56:02 +11:00
skidau
df37649b9f Changed the step over routine to a single stepping version that steps until a blr is encountered.
Cleared out all temporary breakpoints on each step to prevent phantom breakpoints from stopping the debugger.
2014-10-26 14:56:02 +11:00
skidau
219a5078e8 Added a "Step Out" (aka "Step return") function to the debugger.
Conflicts:
	Source/Core/DolphinWX/Debugger/CodeWindow.h
2014-10-26 14:56:01 +11:00
Ryan Houdek
cb10bef9a4 Implements LLVM based disassembler for the debugger.
This will work for all of our platforms, x86, ARMv7, and AArch64.
Main issue with this is that LLVM's cmake files aren't correctly finding the LLVM install.
Not sure if this is Ubuntu's issue or not, it may just work on other operating systems.

We could potentially improve this, you can pass in a specific CPU in to the LLVM disassembler. This would probably affect latency times that are
reported by LLVM's disassembly? This needs to be further investigated later.
2014-10-24 18:10:21 -05:00
Ryan Houdek
ecf65d6f1f Cleans up the JIT block viewer in the WX UI.
This code was an absolute mess. It had allocated an arbitrarily large string buffer to hold instructions that were disassembled.

Strip out all of the nasty raw C string manipulation and replaces it with ostringstream usage.
Fixes an issue where if you didn't have a JIT recompiler running then Dolphin would instantly crash if you tried comparing PPC to x86 code.
Changed the disassembly of the host side code from being inline to the function to instead being in a class, this will be required when I add support
for ARMv7 and AArch64 to this window.
2014-10-21 12:27:59 -05:00
Lioncash
635408b686 Debugger: Fix class indentation 2014-10-18 22:55:23 -04:00
skidau
fc774f0232 Merge pull request #1062 from zhuowei/master
Parse input as hex instead of decimal to match display values in the register view
2014-10-16 13:58:56 +11:00
comex
47faf7c4fd Merge branch 'Remove-MMU-Speed-Hack-option' of https://github.com/skidau/dolphin into skidau-Remove-MMU-Speed-Hack-option
Conflicts:
	Source/Core/Core/PowerPC/Jit64/JitAsm.cpp
2014-10-14 01:08:20 -04:00
skidau
01359a481b Merge pull request #1265 from skidau/debugger-registers-mmu
Added some of the MMU registers into the debugger Register window
2014-10-14 12:47:47 +11:00
Lioncash
9f2b48ab07 Core: Use an enum for indicating CPU cores 2014-10-13 10:35:31 -04:00
skidau
6d9990585c Added some of the MMU registers into the debugger Register window 2014-10-12 20:03:29 +11:00
skidau
8738b1879c Removed the MMU Speed Hack option. The TLBHack is now enabled if the MMU option is disabled. This will help catch cases where a game requires the TLBHack but the option has not been set in the game ini. It also removes the possibility to mistakenly enable both the MMU and TLBHack. 2014-10-11 11:31:16 +11:00
Fiora
8bf2cf0641 Debug: fix disable block linking option
Previously it did the opposite of what it was supposed to; when checked, it'd
turn block linking on, and when unchecked, it'd turn it off.

Also update JITIL's block linking disabling in debug mode to match the behavior
of the regular JIT.
2014-10-08 19:03:25 -07:00
Fiora
85547d94be JIT: properly remove FIFO write addresses when code is invalidated
Fixes a bug caused by interaction with carry optimizations; might fix other
issues too.
2014-09-30 01:00:23 -07:00
skidau
6379d3983a Merge pull request #1137 from lioncash/debugger-crash
DolphinWX: Fix case where the debugger would crash on hiding a pane.
2014-09-22 14:48:29 +10:00
Lioncash
95660a5563 DolphinWX: Fix case where the debugger would crash on hiding a pane.
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.
2014-09-21 14:06:27 -04:00
Lioncash
dc65ef33ba DolphinWX: Fix the memory view in the debugger 2014-09-21 11:47:52 -04:00
Ryan Houdek
2e1377ab7e Merge pull request #1107 from FioraAeterna/opcodesearch
Debugger: make opcode search a bit better
2014-09-19 15:50:54 -05:00
Fiora
20c3a0f2d8 Debugger: scroll by multiples of 4 bytes
Avoids that weird effect where scrolling offsets code from 4-byte boundaries,
showing nonsense 75% of the time.
2014-09-18 03:54:57 -07:00
Fiora
8ce4676605 Debugger: make opcode search a bit better
Search a wider range (not all games fit in the originally searched range).
Print a notice if the opcode isn't found, instead of silently failing.
2014-09-18 03:47:46 -07:00
Zhuowei Zhang
3eaeeee41d Parse input as hex instead of decimal to match display values in the debugger's register view 2014-09-12 00:21:49 -04:00
Rohit Nirmal
c0f7cab3f5 Remove extra semicolons at the ends of some lines. 2014-09-10 12:17:38 -04:00
Ryan Houdek
71cb09f1ca Merge pull request #1027 from rohit-n/change-include
Include CommonTypes.h instead of Common.h.
2014-09-10 00:35:16 -05:00
Rachel Bryk
f93aa7087c Kill Core::g_CoreStartupParameter. 2014-09-09 00:24:49 -04:00
Rohit Nirmal
fbc64984ca Include CommonTypes.h instead of Common.h. 2014-09-08 15:39:58 -04:00
Lioncash
9db370ea40 DolphinWX: Use std::string over char arrays in MemoryView 2014-09-07 20:36:02 -04:00
shuffle2
46c1a0f03b Merge pull request #733 from lioncash/readability
DolphinWX: More readable variable names in BreakpointView
2014-09-03 01:28:17 -07:00
Lioncash
8553b0f27b DolphinWX: Clean up brace placements 2014-08-30 18:06:48 -04:00
Lioncash
1d706b2311 Get rid of C-style empty function parameter indicators 2014-08-30 15:23:48 -04:00
Lioncash
f239ea3853 DolphinWX: Parenthesize some expressions in CodeView.cpp 2014-08-24 15:40:19 -04:00
Lioncash
c3e41809d9 DolphinWX: Move the CodeView debugger view over to wxGraphicsContext
This is a more advanced drawing 'backend' over the previous one and allows us to control things like transparency and anti-aliasing, etc.
2014-08-24 15:40:05 -04:00
Lioncash
6a74f5e8f6 Merge pull request #817 from archshift/disabledcolor
Fixed toolbar's disabled button color.
2014-08-23 05:08:26 -04:00
Lioncash
6a8dfda0ea DolphinWX: Use the typesafe equivalents for declaring wx event types
The others were used when wx 2.4 was around
2014-08-17 16:18:58 -04:00
archshift
b7f3797689 Wx: further cleanup to toolbar creation process 2014-08-17 12:57:44 -07:00
archshift
b74a34795b Fixed toolbar's disabled button color. 2014-08-17 12:57:44 -07:00
Dolphin Bot
1d88091e0b Merge pull request #821 from FioraAeterna/fixjitcompare
Debugger: fix JIT block viewer PPC view
2014-08-17 07:29:25 +02:00
Fiora
a317dac089 Debugger: fix JIT block viewer PPC view
The JIT block compare code didn't set the same options for the PPCAnalyzer
as the actual JIT did, which made the PPC side of the JIT block viewer stop
at the first branch instead of the end of the block.
2014-08-16 22:25:49 -07:00
Lioncash
07f72b1afc Merge pull request #811 from FioraAeterna/fixblowup
Debugger: fix blowup calculation again
2014-08-16 12:42:27 -04:00
Lioncash
cf46ac7dc9 Core: Kill off Host_ShowJitResults
Another host function that can be killed off by simple wx event handling
2014-08-15 15:18:28 -04:00
Fiora
56cc0227c3 Debugger: fix blowup calculation again
Wasn't quiiite right in 3c2567 either.
2014-08-15 10:24:35 -07:00
lioncash
77ccfa1967 DolphinWX: Fix variable styling in BreakpointView 2014-08-15 09:51:29 -04:00
Lioncash
2848ff342f DolphinWX: More readable variable names in BreakpointView
Also doesn't make everything rely on a single temp variable.
2014-08-15 09:49:09 -04:00
Fiora
6741cdbe84 Debugger: fix blowup calculation 2014-08-14 13:40:34 -07:00
shuffle2
0b27e0f3f0 Merge pull request #761 from archshift/better-toolbar
Changed main toolbar to be flush with the rest of the window.
2014-08-11 20:12:24 -07:00