Debugger: Prevent power cycling from unloading .dbg file when .dbg file doesn't have the same name as the rom file
This commit is contained in:
parent
bfcc990cb3
commit
65bba15d0a
1 changed files with 1 additions and 7 deletions
|
@ -135,14 +135,12 @@ namespace Mesen.GUI.Debugger
|
||||||
|
|
||||||
public static void AutoLoadDbgFiles(bool silent)
|
public static void AutoLoadDbgFiles(bool silent)
|
||||||
{
|
{
|
||||||
Ld65DbgImporter oldSymbolProvider = SymbolProvider;
|
|
||||||
|
|
||||||
if(ConfigManager.Config.DebugInfo.AutoLoadDbgFiles) {
|
if(ConfigManager.Config.DebugInfo.AutoLoadDbgFiles) {
|
||||||
RomInfo info = InteropEmu.GetRomInfo();
|
RomInfo info = InteropEmu.GetRomInfo();
|
||||||
string dbgPath = Path.Combine(info.RomFile.Folder, info.GetRomName() + ".dbg");
|
string dbgPath = Path.Combine(info.RomFile.Folder, info.GetRomName() + ".dbg");
|
||||||
if(File.Exists(dbgPath)) {
|
if(File.Exists(dbgPath)) {
|
||||||
DateTime lastDbgUpdate = File.GetLastWriteTime(dbgPath);
|
DateTime lastDbgUpdate = File.GetLastWriteTime(dbgPath);
|
||||||
if(lastDbgUpdate != oldSymbolProvider?.DbgFileStamp) {
|
if(lastDbgUpdate != SymbolProvider?.DbgFileStamp) {
|
||||||
ImportDbgFile(dbgPath, silent);
|
ImportDbgFile(dbgPath, silent);
|
||||||
} else {
|
} else {
|
||||||
//Currently loaded symbol provider is still valid
|
//Currently loaded symbol provider is still valid
|
||||||
|
@ -160,10 +158,6 @@ namespace Mesen.GUI.Debugger
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(oldSymbolProvider == SymbolProvider) {
|
|
||||||
SymbolProvider = null;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void ImportNesasmFnsFile(string fnsPath, bool silent = false)
|
public static void ImportNesasmFnsFile(string fnsPath, bool silent = false)
|
||||||
|
|
Loading…
Add table
Reference in a new issue