If we already instantiated a Debugger, reuse it.

This commit is contained in:
Riccardo Mottola 2021-07-09 01:03:33 +02:00
parent b1533c4a02
commit ec805871c3
2 changed files with 19 additions and 6 deletions

View file

@ -1,3 +1,8 @@
2021-07-09 Riccardo Mottola <rm@gnu.org>
* Framework/PCProjectLauncher.m
If we already instantiated a Debugger, reuse it.
2021-07-06 Riccardo Mottola <rm@gnu.org>
* Modules/Debuggers/ProjectCenter/PCDebugger.h

View file

@ -293,12 +293,20 @@ enum {
// Debugger
debugger = [bundleManager objectForBundleType: @"debugger"
protocol: @protocol(CodeDebugger)
fileName: [executablePath stringByDeletingLastPathComponent]];
[debugger debugExecutableAtPath: executablePath
withDebugger: gdbPath];
if (!debugger)
if (nil == debugger)
{
debugger = [bundleManager objectForBundleType: @"debugger"
protocol: @protocol(CodeDebugger)
fileName: [executablePath stringByDeletingLastPathComponent]];
[debugger debugExecutableAtPath: executablePath
withDebugger: gdbPath];
}
else
{
[debugger show];
}
if (nil == debugger)
NSLog(@"No debugger module found");
// turn debug button off...