Commit graph

72 commits

Author SHA1 Message Date
Unknown W. Brackets
97c18e7f0e Comment out a few unsafe replacement funcs. 2014-04-22 08:07:10 -07:00
Unknown W. Brackets
7326c6e716 Fix a race condition on shutdown with hashmap.
Also, always need to init the blocks, they are not zero initialized.
2014-04-20 21:44:10 -07:00
Henrik Rydgard
f35168e0e0 Hardcode a bunch of function hashes so we can replace them.
Without needing an external file.
2014-04-18 19:00:08 +02:00
Unknown W. Brackets
dde2f3ade6 Re-replace functions after loading a savestate.
Might need to clear before saving too... anyway, this makes testing a bit
easier for certain areas.

Also, correctly decrease downcount on x86.
2014-04-12 15:49:20 -07:00
Unknown W. Brackets
76e61e10a9 Fix hashmap crashes with games that load modules.
This should properly unload and reload the functions as necessary.
2014-04-12 01:16:32 -07:00
Unknown W. Brackets
05ab192c9c Reduce includes in Core/HLE/.
Especially templates.
2014-03-15 11:22:19 -07:00
Unknown W. Brackets
c7437bbe8e Fix some minor warnings. 2014-03-03 00:08:32 -08:00
Unknown W. Brackets
eca06c60c7 Spend a bit less time in Read_Instruction on load. 2014-03-02 10:20:40 -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
7c2d36e802 Don't add to the symbol map what was found there.
Wasn't hurting anything, but slight hit on performance.
2014-02-14 22:13:32 -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
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 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
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
pal1000
e7672655d3 Fix warning in MIPS/MIPSAnalyst.cpp 2014-01-06 10:48:52 +02:00
Unknown W. Brackets
1abb001e7f Don't hashmap functions smaller than 16 bytes.
Otherwise, small stub funcs "replicate" annoyingly.
2014-01-04 01:36:36 -08:00
Henrik Rydgård
ce378b231f Delete CPU.cpp/h , cleanup 2013-12-30 00:11:29 +01:00
Unknown W. Brackets
bde1d14f25 Update hashmap before deciding to abort.
Otherwise, if you delete it, it can never generate one.
2013-12-27 00:29:37 -08:00
Henrik Rydgard
455a73bba7 Bugfix replace function inlining (compilerPC needs to be increased). Misc. 2013-12-20 15:37:37 +01:00
Henrik Rydgard
a53a032120 Prevent hashes from coming out differently after replacement. 2013-12-20 13:53:03 +01:00
Unknown W. Brackets
9bb03072e6 Increase the min size of an "interesting" func.
Seeing a bunch of forwarders and stuff that won't hash safely.
2013-12-18 23:58:45 -08:00
Henrik Rydgard
6937719c3b Minor fixes around function replacement, a couple of math funcs 2013-12-18 10:35:50 +01:00
Henrik Rydgard
2eab4aa1bf Play around with function replacement. Turned off by default of course. 2013-12-17 23:40:27 +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
b74c62b6a6 Switch to a 64-bit function hash. 2013-12-14 14:56:04 -08:00
Unknown W. Brackets
0636a65ad9 Use ReadEntireFile() a few more places.
This fixes one or two minor memory leaks.
2013-12-08 12:02:37 -08:00
Unknown W. Brackets
f4890288ce Oops, fix a bad sort for the hashmap.
Fixes assertion warnings.  Thanks @Kingcom.
2013-12-06 21:19:05 -08:00
Unknown W. Brackets
2ec73a65ed Use a common func to generate default func names. 2013-12-06 00:17:20 -08:00
Unknown W. Brackets
735968ba9b Add a setting to maintain a global func hash map.
This makes it easier to deal with functions that have a common
implementation between multiple games, e.g. libc funcs.
2013-12-06 00:11:49 -08:00
Unknown W. Brackets
505f509503 Detect tail call when scanning functions. 2013-12-01 22:08:39 -08:00
Unknown W. Brackets
1bccfa4141 Look for downward jumps for elses when scanning.
Otherwise, we often end the function earlier than it should be.
2013-12-01 21:28:09 -08:00
Unknown W. Brackets
43be44947f Correctly reuse symbol map entries when scanning.
Before we created one huge function in place of the old.
2013-12-01 20:25:51 -08:00
Unknown W. Brackets
b2971314b8 Fix hash detection of branches to jr ra.
This makes it more correctly identify functions.
2013-12-01 20:23:16 -08:00
Kingcom
5844d0107b Rewrite SymbolTable 2013-11-27 13:33:30 +01:00
Kingcom
a277706489 Workaround for symbols defined in .sym files 2013-11-16 10:53:47 +01:00
Kingcom
aae08173f1 Extend follow functionality of disassembly 2013-11-05 21:20:21 +01:00
Kingcom
95b466fc4f Fix step over for jalr 2013-11-03 10:58:31 +01:00
Kingcom
eeb86fc105 Fix step over handling of fpu branches 2013-11-03 09:54:58 +01: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
adrian17
7e3f35dfe3 Removed redundant includes 2013-09-30 19:05:04 +02:00
Unknown W. Brackets
efe92666fb Allow more cases in IsDelaySlotNiceVFPU(). 2013-09-05 23:24:31 -07:00
Unknown W. Brackets
9a048e9cf6 Don't assume GPRs can't be used with vfpu. 2013-09-05 23:12:14 -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
97aa1a631e Improve typesafety in the x86 regalloc. 2013-08-24 19:41:10 -07:00
Unknown W. Brackets
52d6080fb4 Pass in some analysis results, don't use yet. 2013-08-24 15:36:24 -07: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
4495559b75 Clean up register usage analysis a bit. 2013-08-24 15:36:23 -07:00
Unknown W. Brackets
b37f09cedf Make MIPSInfo a struct for typesafety.
Found a bug in ReadsFromReg().
2013-08-24 13:22:10 -07:00