Commit Graph

340 Commits

Author SHA1 Message Date
Henrik Rydgard
c80510fb3b MemMap should not be included in MIPS.h. 2014-03-15 10:45:39 +01:00
chinhodado
481250931c Avoid using an invalidated iterator 2014-03-07 16:43:02 -05:00
Henrik Rydgård
374e12afc3 Merge pull request #5590 from unknownbrackets/xbox
Merge more parts of #4716
2014-03-03 13:37:21 +07:00
Ced2911
d82911de58 [Xbox] fixes 2014-03-02 11:27:20 -08:00
Ced2911
cc9f238d36 [xbox] 360 support for Core 2014-03-02 11:22:02 -08:00
Unknown W. Brackets
e3506ead69 Clear the symbol map between each test.
This way we could, for example, test function replacement properly.

Actually slows down tests because it spends more time correctly
determining the function boundaries.
2014-03-02 10:20:40 -08:00
Unknown W. Brackets
d22793e257 Avoid a dangerous cast in LoadSymbolMap().
Not sure if we can have any safety with an int cast like that...
2014-02-15 16:23:18 -08:00
Unknown W. Brackets
8948990871 Optimize searching for existing symbols.
Checking every time is slow, we should just skip by the address.  Some is
just the locking overhead.
2014-02-14 22:26:35 -08:00
Unknown W. Brackets
04776c8125 Small optimization: avoid fallback if possible.
Speeds up symbol map loading a little bit (when inserting new items.)
2014-02-14 22:07:39 -08:00
Unknown W. Brackets
26b4335637 Optimize symbol map in debug mode a bit more.
Avoid UpdateActiveSymbols().
2014-02-14 21:49:20 -08:00
Unknown W. Brackets
d279dcd454 Fix renaming a function from disassembly. 2014-02-11 07:45:13 -08:00
Henrik Rydgård
0f4ccf52f4 Update README. Avoid recursing the symbolmap lock when we don't need to. 2014-02-11 14:21:40 +01:00
Henrik Rydgård
b1d6eefb8a Call UpdateActiveSymbols only once from MIPSAnalyst instead of for every recognized function.
Reduces startup slowdown when using a function signature file drastically.
2014-02-11 11:21:56 +01:00
Henrik Rydgard
aae787168e Did not mean to commit this line. 2014-02-09 23:48:31 +01:00
Henrik Rydgard
ca500b0bf4 Add setting for Kitkat Immersive Mode on Android. 2014-02-09 23:16:08 +01:00
Kingcom
880be6d41d Module list in Windows debugger 2014-01-27 00:35:16 +01:00
Unknown W. Brackets
199552bc1b Small merge fix. 2014-01-26 14:13:43 -08:00
Henrik Rydgård
efd44a6933 Merge branch 'debugger2' of https://github.com/unknownbrackets/ppsspp into unknownbrackets-debugger2
Conflicts:
	Core/Debugger/Breakpoints.cpp
2014-01-26 23:10:37 +01:00
Unknown W. Brackets
fe2b62c27d Make the "on change" checkbox for memchecks work.
But, for now, only on sw and similar instructions, the rest don't work
yet and just always break.
2014-01-26 11:57:39 -08:00
Unknown W. Brackets
6b06494940 Oops, missed a c_str() conversion. 2014-01-26 01:56:28 -08:00
Unknown W. Brackets
983e195dd2 Fix possible module index overlap. 2014-01-26 00:02:01 -08:00
Unknown W. Brackets
76afb2a8d5 Avoid returning points from the symbol map.
Now that it uses a lookup, this is even more dangerous.  But, the maps
could be reordered while it's trying to print the pointer and cause that
data to become invalid.

This should be safe from race conditions.
2014-01-25 21:40:23 -08:00
Unknown W. Brackets
b1af4f4911 Write symbol maps as ".ppmap" instead.
This has some benefits:
 * They are smaller, but zgrep/zcat etc. still work.
 * Since the format is slightly different, bisecting won't overwrite.
 * It avoids conflicts with .map file associations.
2014-01-25 21:12:16 -08:00
Unknown W. Brackets
a2fa53d5c4 Track modules in the symbol map.
This makes it so things don't overlap confusingly, and also so that we can
replace funcs more correctly and sanely.

This is unfortunately a bunch more complicated...
2014-01-25 20:59:53 -08:00
Unknown W. Brackets
4de20258eb Don't bother writing an empty symbol map.
For example, when accidentally opening an invalid file.
2014-01-19 21:34:16 -08:00
Henrik Rydgård
e5e17fbc6e More include cleanup. Hoping for very slightly faster compile times.. 2013-12-30 10:49:05 +01:00
Henrik Rydgård
00c32ddadb Mostly get rid of including "Globals.h" 2013-12-30 10:17:11 +01:00
Unknown W. Brackets
db77dcd149 Fix some includes on Windows/etc. 2013-12-29 15:59:36 -08:00
Henrik Rydgård
be74da8f3c More include cleanup, hopefully buildfix Symbian 2013-12-30 00:23:04 +01:00
Henrik Rydgård
ce378b231f Delete CPU.cpp/h , cleanup 2013-12-30 00:11:29 +01:00
Henrik Rydgard
2140892074 Initial preparations for ability to replace game functions with custom implementations.
Also auto-saves hashmap additions and reapplies the hashmap on function
rename so that if you rename a function that exists in several copies
they will all be labelled.

Note that actual function replacement is not activated yet.
2013-12-17 12:27:20 +01:00
Unknown W. Brackets
12713a44a1 Attempt to prevent shutdown crash in debugger. 2013-12-14 14:56:04 -08:00
Henrik Rydgård
cfbd1b07e8 Some code reformatting in SymbolMap 2013-12-02 15:30:03 +01:00
Henrik Rydgård
16369dde47 Protect against a buffer overflow in symbolmap 2013-12-02 15:29:35 +01:00
pal1000
cfcfb20622 Warning fix in DisassemblyManager.cpp (Visual Studio 2013) 2013-12-02 12:39:01 +02:00
Henrik Rydgård
1c04e923f6 Merge pull request #4706 from Kingcom/Debugger
Automatically pause core when changing breakpoints
2013-12-02 01:51:15 -08:00
Kingcom
df40850617 Automatically pause core when changing breakpoints 2013-12-02 10:42:20 +01:00
Unknown W. Brackets
7de0b28961 Fix an unhandled case value warning. 2013-12-01 11:21:17 -08:00
Unknown W. Brackets
dd2e996838 Fix some type comparison warnings. 2013-12-01 11:21:16 -08:00
Henrik Rydgård
1296aad6c7 Merge pull request #4675 from Kingcom/Debugger
Small debugger fixes and enhancements
2013-11-29 08:30:08 -08:00
Kingcom
85abd37ed1 Small debugger fixes and enhancements 2013-11-29 17:21:48 +01:00
Unknown W. Brackets
79322103f2 Optimize DisassemblyFunction::getLineNum() a bit.
Improves scrolling performance in some cases in the debugger.
2013-11-28 23:48:12 -08:00
Henrik Rydgård
620bb14d6b Merge pull request #4662 from Kingcom/Debugger
Disassembler fix
2013-11-28 02:04:13 -08:00
Kingcom
cca750aab5 Fix invalid memory access on start, remove combo box code from symbol map 2013-11-28 10:49:02 +01:00
Henrik Rydgård
f8227132f9 Merge pull request #4657 from Kingcom/Debugger
Create data directives in disassembler
2013-11-28 01:20:21 -08:00
Unknown W. Brackets
bb41e015b9 Truncate func names when reading symbol maps.
Otherwise they'll get trashed.
2013-11-27 22:11:18 -08:00
Kingcom
577a46be09 Remove useless comment 2013-11-28 00:48:05 +01:00
Kingcom
561379f5c2 Create data directives in disassembler 2013-11-28 00:33:21 +01:00
Kingcom
eeb9667726 Fix QT build (hopefully) 2013-11-27 15:06:41 +01:00
Kingcom
5844d0107b Rewrite SymbolTable 2013-11-27 13:33:30 +01:00
Kingcom
33da416a82 Reduce disassembler memory usage 2013-11-26 22:20:12 +01:00
Kingcom
274632f304 Minor disassembly tweaks 2013-11-26 11:38:01 +01:00
Kingcom
3d4bb3f20b Remove obsolete functions 2013-11-26 00:51:04 +01:00
Kingcom
00a801f6a3 Don't overwrite label name if it already exists, get label value 2013-11-26 00:43:31 +01:00
Kingcom
7c585485bb Save labels separately from symbols 2013-11-26 00:23:17 +01:00
Kingcom
b71bfe5a62 -Get branch lines for opcodes outside of a function
-fix labels causing analyzing issues
2013-11-25 21:53:01 +01:00
Kingcom
8146e7bfb0 Fix stepping 2013-11-25 19:51:16 +01:00
Kingcom
ea38eb4318 Correctly rescan visible data 2013-11-25 17:31:39 +01:00
Kingcom
945dc48ea7 Don't recompute number of lines of a function every time 2013-11-25 16:52:42 +01:00
Kingcom
9a29e8b0bf More efficient "loose" opcode detection, clear entries when symbols were loaded 2013-11-25 16:18:29 +01:00
Kingcom
60987d9217 Minor optimization 2013-11-25 14:19:45 +01:00
Kingcom
42c5fe0164 Massive speed optimizations 2013-11-25 13:56:43 +01:00
Kingcom
aab6f588f1 Fix branch lines 2013-11-24 14:46:53 +01:00
Kingcom
0672458a33 Fix follow branch, display symbols 2013-11-24 13:53:50 +01:00
Kingcom
63e2f34beb Correctly identify the start of a line when changing the address 2013-11-24 13:53:50 +01:00
Kingcom
a928c62ad1 Basic implementation and integration of DisassemblyManager 2013-11-24 13:53:50 +01:00
Kingcom
92e2cdcf59 Read function size from .sym 2013-11-01 14:14:06 +01:00
Peter Tissen
d8b4ec6680 added disasm debugger features to remove and add functions 2013-10-30 16:13:18 +01:00
Unknown W. Brackets
da20bda729 Make memchecks ignore cached/uncached memory.
You usually want both.
2013-10-27 13:15:12 -07:00
Unknown W. Brackets
6b510c1c2f Allow step/run when two breakpoints trip.
If a memcheck and breakpoint were triggered on the same line, you wouldn't
be able to pass it, which is probably not what you'd expect.
2013-10-27 12:50:32 -07:00
Henrik Rydgård
f85b4a4252 Buildfix 2013-10-18 15:07:04 +02:00
Henrik Rydgård
07c818251c Some formatting cleanup.
Yeah, I said we shouldn't do big overhauls..
2013-10-18 14:39:04 +02:00
Kingcom
d12d3058e7 Don't show ListBox if it was hidden before 2013-10-02 09:11:38 +02:00
adrian17
7e3f35dfe3 Removed redundant includes 2013-09-30 19:05:04 +02:00
Unknown W. Brackets
cfb50bf4d6 Add some more locking to prevent crash on reset. 2013-09-15 09:53:49 -07:00
Unknown W. Brackets
7349de55d1 Fix some initialization/sprintf warnings. 2013-09-01 01:15:07 -07:00
Unknown W. Brackets
b558189c37 Just invalidate blocks on ClearCacheAt().
This makes it safe to call from a jitted syscall, etc.
2013-09-01 00:32:43 -07:00
Unknown W. Brackets
8ccd3773d9 Open files using wide functions on win32.
Fixes #3432.
2013-08-27 00:28:46 -07:00
Unknown W. Brackets
18792f64f9 Fix debugger wstring usage. 2013-08-26 23:54:48 -07:00
Henrik Rydgard
55aa3d13c7 Win32: Switch to a UNICODE build. This took quite a bit of fixing. 2013-08-26 19:00:16 +02:00
Unknown W. Brackets
109ad17ac6 Use a typesafe struct for opcodes.
Also, correctly read delayslots using Read_Instruction on ARM.
2013-08-24 15:36:24 -07:00
Unknown W. Brackets
c6c821a0f7 Fix some unitinialized values. 2013-08-12 23:33:11 -07:00
Unknown W. Brackets
8786ec74ca Fix some potential threading probs with SymbolMap.
Got some strange crashes.
2013-08-10 20:54:55 -07:00
Kingcom
a8ef18c039 Add pc, hi, and lo to the register list 2013-07-31 10:24:24 +02:00
Kingcom
584c20a84e Slightly more efficient implementation of getDirectSymbol 2013-07-29 19:38:20 +02:00
Kingcom
862cf047da Basic .sym support 2013-07-29 13:06:01 +02:00
Unknown W. Brackets
7b7801d59a Switch to including Windows.h from an intermediate.
This makes it easier for Xbox which uses a separate header.
2013-07-28 21:04:19 -07:00
Kingcom
0eeebf5221 -display disabled breakpoints with separate icon
-toggling disabled breakpoints will enable them
-confirmation on toggling breakpoints with a custom condition
2013-07-10 10:56:03 +02:00
Unknown W. Brackets
932e0b857c Fix a possible infinite loop in the symbol map. 2013-07-07 01:58:23 -07:00
Unknown W. Brackets
0ca8f5c655 Improve performance of ScanForFunctions().
Mostly affects games with a lot of modules and exports.
2013-07-06 16:58:17 -07:00
Unknown W. Brackets
77670876cd Fix memcheck range intersect check. 2013-07-06 12:08:34 -07:00
Unknown W. Brackets
540bd13222 Correctly match ranges in memchecks with ends. 2013-07-05 01:16:57 -07:00
Kingcom
2521a88207 Use ChangeBreakPointAddCond function 2013-07-02 17:43:34 +02:00
Kingcom
c41b08f9e2 Add expression parser to breakpoints 2013-07-02 11:51:29 +02:00
Henrik Rydgård
c28109dfa0 Merge pull request #2576 from Kingcom/master
Expression parser update
2013-07-01 08:23:42 -07:00
Kingcom
e3d3d75e38 Moved expression parser to native and changed how it's accessed 2013-07-01 01:41:06 +02:00
Unknown W. Brackets
f3e27ad9dd Ensure only the very next instruction is skipped. 2013-06-30 16:35:49 -07:00
Unknown W. Brackets
70cd8798be Actually enforce temp breakpoints having no cond. 2013-06-30 16:35:49 -07:00
Unknown W. Brackets
9d8bdee089 Buffer the breakpoints in UI to avoid overflows. 2013-06-30 16:35:48 -07:00
Unknown W. Brackets
9209a30d9b Add skeleton for conditional breakpoints. 2013-06-30 16:35:47 -07:00
Unknown W. Brackets
d513fab60d Fix names with newlines in the symbol map. 2013-06-30 16:35:47 -07:00
Unknown W. Brackets
6bd4383a8a Give memchecks/breakpoints a consistent interface.
Removes the limit on max breakpoints, and makes everything use accessors
for both that look roughly the same.
2013-06-30 15:16:58 -07:00
Unknown W. Brackets
f7b37ee00a Read symbols with spaces in their names.
Before it was changing "UNK: hex" and "EXP: hex" into "UNK:" and "EXP:".
2013-06-30 10:19:29 -07:00
Unknown W. Brackets
c1834908b1 Keep the symbol map entries unique.
Duplicates are annoying, and we have hacks upstream to prevent them that
cause trouble.
2013-06-30 10:04:48 -07:00
Kingcom
6df25d52f0 -ctrl+g for goto in mem viewer/disassembly
-removed skipping of zz_/z_ in disassembly
-fixes to the expression parser
2013-06-29 22:25:17 +02:00
Unknown W. Brackets
609f8d6340 Allow hitting Go on a breakpoint to continue.
Doesn't work for branches though, because of delay slots.
2013-06-29 11:23:24 -07:00
Kingcom
8ce9ad6cf1 Linux build fix 2013-06-29 17:53:45 +02:00
Kingcom
ab1aa09dce Expression parser 2013-06-29 15:17:00 +02:00
Kingcom
d4214af710 Breakpoint list at the bottom of the disassembly window 2013-06-27 21:07:49 +02:00
Kingcom
76f135e077 -edit register by double clicking
-copy register with ctrl+c
2013-06-27 11:50:59 +02:00
Kingcom
827d13c34f -Fix step over for conditional branches
-don't redraw the disassembly window while waiting for a temporary breakpoint
2013-06-26 23:14:15 +02:00
Kingcom
26c4f57691 Shortcuts for the disassembly view, step over extended, fixes 2013-06-26 21:49:15 +02:00
Kingcom
7d0e6ff199 -disassembly view redesigned
-change the cursor with the mouse or with the keyboard
-displays symbols on the left and in opcode arguments
-press tab to toggle displaying of symbols
-click on the highlighted line to toggle a breakpoint at that position
-press right to follow a branch and left to go back a level
2013-06-25 23:52:56 +02:00
Kingcom
41fc339362 -fixed "Copy value" in memory view
-SetFocus on right click in memory view
-added a few more default symbols to the symbol map
2013-06-25 13:17:27 +02:00
Sacha
b39a572043 Buildfixes.
Fix C++11 usage.
Remove redundancy.
Fix st_*time re-usage.
2013-06-02 13:26:39 +10:00
Unknown W. Brackets
82dd2780f5 Improve perf when loading a large debug map file. 2013-05-26 16:02:08 -07:00
Unknown W. Brackets
832edb0a8f Fix some x64 type conversion warnings. 2013-04-05 20:29:20 -07:00
niepodam
94c2f0cd9d Fix build with gcc 4.8.0 2013-04-04 19:16:15 +02:00
Henrik Rydgard
bb939321bc Fix symbol map loading, Qt fullscreen build 2013-03-29 22:56:57 +01:00
Unknown W. Brackets
10db012237 Improve speed of stepping in debug mode.
Redraw was a killer.  It's still not fast...
2013-03-11 07:53:47 -07:00
Unknown W. Brackets
81db6aaf92 Properly pause the emu on memcheck hit. 2013-03-09 02:41:50 -08:00
Unknown W. Brackets
a926ef6776 Respect read/write only mem breakpoints in x86 jit. 2013-03-09 02:41:49 -08:00
Unknown W. Brackets
15ff927d4d And now the dynamic memory breakpoints in x86 jit.
And add notes that this is interpreter/HLE only for now.
2013-03-09 02:41:49 -08:00
Unknown W. Brackets
de7ada1982 Fix some x64 type warnings. 2013-02-24 10:39:06 -08:00
Unknown W. Brackets
7c3c06fd23 Wait for the runloop to end in savestates/debug.
This way, even if the runloop hasn't checked coreState yet, we will wait.
2013-02-23 13:21:28 -08:00
Unknown W. Brackets
2164a7fdf9 Keep track of whether we're in the runloop or not. 2013-02-23 13:01:00 -08:00
Xele02
69b837f18b Add debug dialogs (DisAsm, Memory, VFPU).
New features : Breakpoint display, thread status, display list status
Update translation and start french translation
2013-02-10 17:33:34 +01:00
Unknown W. Brackets
9db836eb96 Minor typesafety/bounds checking warning fixes. 2013-01-31 00:02:54 -08:00
Unknown W. Brackets
862c88d61a More warning fixes, switches and printfs, etc.
This time ones not reported by Visual Studio.
2013-01-19 18:32:37 -08:00
Unknown W. Brackets
140fd171ef Fix some 64-bit type conversion warnings. 2013-01-19 13:48:20 -08:00
Unknown W. Brackets
beac991a9e Clear jit cache when changing breakpoints.
For now, only when paused.  I don't think clearing the cache while
running is an awesome idea.
2013-01-18 20:12:53 -08:00
Xele02
fd301a000a Implement Qt window like Windows version. 2013-01-14 00:29:42 +01:00
Henrik Rydgard
338a73472b Buildfix 2013-01-13 12:49:54 +01:00
Henrik Rydgard
db92bdda17 Cleanup of horrible ancient symbolmap code - no more global arrays. 2013-01-13 12:12:14 +01:00
Mathias Tillman
b780e39397 Fixed various potential bugs and compiler warnings 2013-01-07 15:57:19 +01:00
Unknown W. Brackets
ec753a3575 Fix some ignored error / shadowing warnings. 2012-12-21 16:23:21 -08:00
Henrik Rydgard
64cc573703 Switch to "GPL 2.0 or later" for various reasons. I wrote most of the code I imported from Dolphin (which is GPL2-but-not-later), so it should be OK. 2012-11-04 23:24:00 +01:00
MrOrdinaire
1ab9943643 fix missing #include's and missing CMake linking directives 2012-11-03 10:33:24 +08:00
MrOrdinaire
c21ac2c81c fix inconsistent file naming 2012-11-03 00:34:42 +08:00
Henrik Rydgard
4f7ad15758 Add snapshot of the whole source code. 2012-11-01 16:19:01 +01:00