From 3825a8930e5c445872d799658808dea2cbe14561 Mon Sep 17 00:00:00 2001 From: Robert Sesek Date: Wed, 28 Jan 2009 12:16:50 -0500 Subject: [PATCH] When the debugger connects, automatically step in to the first frame to make the debugger look active * Source/DebuggerController.m+h: (startDebugger): New method * Source/GDBpConnection.m: (socketDidAccept:): Call the -[startDebugger] method --- CHANGES | 1 + Source/DebuggerController.h | 2 ++ Source/DebuggerController.m | 8 ++++++++ Source/GDBpConnection.m | 2 ++ 4 files changed, 13 insertions(+) diff --git a/CHANGES b/CHANGES index 976c734..ed40916 100644 --- a/CHANGES +++ b/CHANGES @@ -6,6 +6,7 @@ MacGDBp CHANGE LOG - Change: The "File" column now shows the tail rather than the head of the value, allowing you to see the last part of the path URI - Fix: #129 Debugging files on a remote server will now work if the remote path does not exist on the local debugging client +- Change: The debugger will automatically step in to the first frame when the connection is made 1.1.2 diff --git a/Source/DebuggerController.h b/Source/DebuggerController.h index b854568..ab5b124 100644 --- a/Source/DebuggerController.h +++ b/Source/DebuggerController.h @@ -44,6 +44,8 @@ - (void)setError:(NSString *)anError; +- (void)startDebugger; + - (IBAction)run:(id)sender; - (IBAction)stepIn:(id)sender; - (IBAction)stepOut:(id)sender; diff --git a/Source/DebuggerController.m b/Source/DebuggerController.m index 9f53abf..2b46df8 100644 --- a/Source/DebuggerController.m +++ b/Source/DebuggerController.m @@ -130,6 +130,14 @@ [self setError:[[notif userInfo] valueForKey:@"NSString"]]; } +/** + * Called once the socket accepts and MacGDBp is connected to the debugger + */ +- (void)startDebugger +{ + [self stepIn:self]; +} + /** * Forwards the message to run script execution to the connection */ diff --git a/Source/GDBpConnection.m b/Source/GDBpConnection.m index a053103..4d32f8a 100644 --- a/Source/GDBpConnection.m +++ b/Source/GDBpConnection.m @@ -118,6 +118,8 @@ NSString *kErrorOccurredNotif = @"GDBpConnection_ErrorOccured_Notification"; { [self addBreakpoint:bp]; } + + [[[NSApp delegate] debugger] startDebugger]; // this will just load the debugger to make it look active } /** -- 2.43.5