mirror of https://github.com/PCSX2/pcsx2.git
Load symbols from file
This commit is contained in:
parent
0ade0a44b5
commit
100fe404a5
|
@ -33,6 +33,9 @@
|
|||
#include "CDVDisoReader.h"
|
||||
#include "Utilities/ScopedPtr.h"
|
||||
|
||||
#include "DebugTools/SymbolMap.h"
|
||||
#include "AppConfig.h"
|
||||
|
||||
const wxChar* CDVD_SourceLabels[] =
|
||||
{
|
||||
L"Iso",
|
||||
|
@ -287,6 +290,21 @@ static CDVD_SourceType m_CurrentSourceType = CDVDsrc_NoDisc;
|
|||
void CDVDsys_SetFile( CDVD_SourceType srctype, const wxString& newfile )
|
||||
{
|
||||
m_SourceFilename[srctype] = newfile;
|
||||
|
||||
// look for symbol file
|
||||
if (g_Conf->EmuOptions.Debugger.EnableDebugger && symbolMap.IsEmpty())
|
||||
{
|
||||
wxString symName;
|
||||
int n = newfile.Last('.');
|
||||
if (n == wxNOT_FOUND)
|
||||
symName = newfile + L".sym";
|
||||
else
|
||||
symName = newfile.substr(0,n) + L".sym";
|
||||
|
||||
wxCharBuffer buf = symName.ToUTF8();
|
||||
symbolMap.LoadNocashSym(buf);
|
||||
symbolMap.UpdateActiveSymbols();
|
||||
}
|
||||
}
|
||||
|
||||
const wxString& CDVDsys_GetFile( CDVD_SourceType srctype )
|
||||
|
|
|
@ -80,7 +80,7 @@ public:
|
|||
static const u32 INVALID_ADDRESS = (u32)-1;
|
||||
|
||||
void UpdateActiveSymbols();
|
||||
|
||||
bool IsEmpty() const { return activeFunctions.empty() && activeLabels.empty() && activeData.empty(); };
|
||||
private:
|
||||
void AssignFunctionIndices();
|
||||
const char *GetLabelName(u32 address) const;
|
||||
|
|
|
@ -1043,6 +1043,7 @@ protected:
|
|||
DbgCon.WriteLn( Color_Gray, "(SysExecute) received." );
|
||||
|
||||
CoreThread.ResetQuick();
|
||||
symbolMap.Clear();
|
||||
|
||||
CDVDsys_SetFile( CDVDsrc_Iso, g_Conf->CurrentIso );
|
||||
if( m_UseCDVDsrc )
|
||||
|
|
Loading…
Reference in New Issue