Load symbols from file

This commit is contained in:
Kingcom 2014-03-02 11:18:22 +01:00
parent 0ade0a44b5
commit 100fe404a5
3 changed files with 20 additions and 1 deletions

View File

@ -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 )

View File

@ -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;

View File

@ -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 )