mirror of
https://github.com/libretro/ppsspp.git
synced 2024-12-03 06:32:10 +00:00
Merge pull request #1938 from unknownbrackets/symbol-map
Symbol map fixes
This commit is contained in:
commit
8e6c093eec
@ -262,6 +262,8 @@ void SymbolMap::FillSymbolListBox(HWND listbox,SymbolType symmask)
|
||||
//ListBox_AddString(listbox,"(0x80002000)");
|
||||
//ListBox_SetItemData(listbox,1,0x80002000);
|
||||
|
||||
SendMessage(listbox, WM_SETREDRAW, FALSE, 0);
|
||||
SendMessage(listbox, LB_INITSTORAGE, (WPARAM)entries.size(), (LPARAM)entries.size() * 30);
|
||||
for (size_t i = 0; i < entries.size(); i++)
|
||||
{
|
||||
if (entries[i].type & symmask)
|
||||
@ -272,6 +274,8 @@ void SymbolMap::FillSymbolListBox(HWND listbox,SymbolType symmask)
|
||||
ListBox_SetItemData(listbox,index,entries[i].vaddress);
|
||||
}
|
||||
}
|
||||
SendMessage(listbox, WM_SETREDRAW, TRUE, 0);
|
||||
RedrawWindow(listbox, NULL, NULL, RDW_ERASE | RDW_FRAME | RDW_INVALIDATE | RDW_ALLCHILDREN);
|
||||
|
||||
ShowWindow(listbox,SW_SHOW);
|
||||
}
|
||||
@ -289,6 +293,8 @@ void SymbolMap::FillSymbolComboBox(HWND listbox,SymbolType symmask)
|
||||
//ListBox_AddString(listbox,"(0x80002000)");
|
||||
//ListBox_SetItemData(listbox,1,0x80002000);
|
||||
|
||||
SendMessage(listbox, WM_SETREDRAW, FALSE, 0);
|
||||
SendMessage(listbox, CB_INITSTORAGE, (WPARAM)entries.size(), (LPARAM)entries.size() * 30);
|
||||
for (size_t i = 0; i < entries.size(); i++)
|
||||
{
|
||||
if (entries[i].type & symmask)
|
||||
@ -299,6 +305,8 @@ void SymbolMap::FillSymbolComboBox(HWND listbox,SymbolType symmask)
|
||||
ComboBox_SetItemData(listbox,index,entries[i].vaddress);
|
||||
}
|
||||
}
|
||||
SendMessage(listbox, WM_SETREDRAW, TRUE, 0);
|
||||
RedrawWindow(listbox, NULL, NULL, RDW_ERASE | RDW_FRAME | RDW_INVALIDATE | RDW_ALLCHILDREN);
|
||||
|
||||
ShowWindow(listbox,SW_SHOW);
|
||||
}
|
||||
|
@ -296,6 +296,7 @@ void __KernelModuleShutdown()
|
||||
{
|
||||
unresolvedVars.clear();
|
||||
exportedVars.clear();
|
||||
MIPSAnalyst::Shutdown();
|
||||
}
|
||||
|
||||
void WriteVarSymbol(u32 exportAddress, u32 relocAddress, u8 type)
|
||||
|
@ -264,6 +264,12 @@ namespace MIPSAnalyst
|
||||
|
||||
map<u32, Function*> hashToFunction;
|
||||
|
||||
void Shutdown()
|
||||
{
|
||||
functions.clear();
|
||||
hashToFunction.clear();
|
||||
}
|
||||
|
||||
// hm pointless :P
|
||||
void UpdateHashToFunctionMap()
|
||||
{
|
||||
@ -353,7 +359,7 @@ namespace MIPSAnalyst
|
||||
}
|
||||
|
||||
u32 op = Memory::Read_Instruction(addr);
|
||||
u32 target = GetBranchTarget(addr);
|
||||
u32 target = GetBranchTargetNoRA(addr);
|
||||
if (target != INVALIDTARGET)
|
||||
{
|
||||
isStraightLeaf = false;
|
||||
|
@ -62,5 +62,6 @@ namespace MIPSAnalyst
|
||||
bool IsDelaySlotNiceFPU(u32 branchOp, u32 op);
|
||||
bool IsSyscall(u32 op);
|
||||
|
||||
void Shutdown();
|
||||
|
||||
} // namespace MIPSAnalyst
|
||||
|
@ -56,7 +56,24 @@ namespace MIPSCodeUtils
|
||||
return addr + ((signed short)(op&0xFFFF)<<2);
|
||||
}
|
||||
else
|
||||
return INVALIDTARGET;
|
||||
return INVALIDTARGET;
|
||||
}
|
||||
else
|
||||
return INVALIDTARGET;
|
||||
}
|
||||
|
||||
u32 GetBranchTargetNoRA(u32 addr)
|
||||
{
|
||||
u32 op = Memory::Read_Instruction(addr);
|
||||
if (op)
|
||||
{
|
||||
u32 info = MIPSGetInfo(op);
|
||||
if ((info & IS_CONDBRANCH) && !(info & OUT_RA))
|
||||
{
|
||||
return addr + ((signed short)(op&0xFFFF)<<2);
|
||||
}
|
||||
else
|
||||
return INVALIDTARGET;
|
||||
}
|
||||
else
|
||||
return INVALIDTARGET;
|
||||
|
@ -49,6 +49,8 @@ namespace MIPSCodeUtils
|
||||
{
|
||||
u32 GetCallTarget(u32 addr);
|
||||
u32 GetBranchTarget(u32 addr);
|
||||
// Ignores bltzal/etc. the change RA.
|
||||
u32 GetBranchTargetNoRA(u32 addr);
|
||||
u32 GetJumpTarget(u32 addr);
|
||||
u32 GetSureBranchTarget(u32 addr);
|
||||
void RewriteSysCalls(u32 startAddr, u32 endAddr);
|
||||
|
Loading…
Reference in New Issue
Block a user