Robert Sesek [Mon, 1 Dec 2008 03:40:18 +0000 (22:40 -0500)]
Create an error system that follows MVC
* Source/DebuggerController.m:
(init): Register ourselves as an observer for the error notif type
(handleConnectionError:): New method to handle the error notifs
* Source/GDBpConnection.h: Forward-declare kErrorOccurred
* Source/GDBpConnection.m:
(errorEncountered:): Post the notification
Robert Sesek [Mon, 1 Dec 2008 03:18:37 +0000 (22:18 -0500)]
Remove all of the old stack system
* Source/DebuggerController.h: Remove stackController2 and stack ivars
* Source/DebuggerController.m:
(validateUserInterfaceItem:): Update to use stackController.stack for -[count]
(resetDisplays): Remove the call to stackController2
(setStack): Removed
(stepIn:): Call -[updateStackViewer]
(stepOut:): ditto
(stepOver:): ditto
(updateSourceViewer): Use our new stackController
(updateStackViewer): New method
* Source/GDBpConnection.m:
(updateStackTraceAndRegisters): Remove the block of code that used to update the stack
Robert Sesek [Mon, 1 Dec 2008 02:57:23 +0000 (21:57 -0500)]
Update the bindings for the stack viewer to use our new StackController system
* English.lproj/Debugger.xib: Redo the bindings
* Source/DebuggerController.h: Add stackArrayController ivar
* Source/DebuggerController.m:
(awakeFromNib): Set the sort descriptors
(stepIn:): Rearrange the stackArrayController
(stepOut:): ditto
(stepOver): ditto
Robert Sesek [Mon, 1 Dec 2008 01:34:01 +0000 (20:34 -0500)]
The StackFrame index will always be 0 in -[GDBpConnection createStackFrame], so we need to advance it in -[StackController pop] and -[push:]
* Source/GDBpConnection.m:
(createStackFrame): Don't bother getting the "level" property, it will always be 0
* Source/StackController.m:
(pop): Decrease all of the frames' counter
(push:): Increase all of the frames' counter
Robert Sesek [Mon, 1 Dec 2008 01:19:28 +0000 (20:19 -0500)]
Start using our new StackFrame and StackController classes as struts
* Source/DebuggerController.h: Add the stackController ivar
* Source/DebuggerController.m:
(init): Initialize the stackController
(dealloc): Release stackController
(stepIn:): Pop and push the stackController appropriately
(stepOut:): ditto
(stepOver:): ditto
* Source/GDBpConnection.h: -[stepIn] -[stepOut] and -[stepOver] now all return StackFrame objects
* Source/GDBpConnection.m:
(stepIn): Generate and return the frame
(stepOut): ditto
(stepOver): ditto
(createStackFrame): New private method
* Source/StackController.m+h:
(peek): New method
* Source/StackFrame.m+h:
(isShiftedFrame:): New method
(description): Implemented
Robert Sesek [Mon, 13 Oct 2008 15:05:16 +0000 (11:05 -0400)]
Have the debugger and breakpoints windows remember their size and location
* English.lproj/Breakpoints.xib: Set autosave name
* English.lproj/Debugger.xib: ditto
* Source/DebuggerController.m:
(awakeFromNib): Do not call [window center] anymore
Robert Sesek [Wed, 20 Aug 2008 18:50:17 +0000 (14:50 -0400)]
Allow multiple selection and removal of breakpoints
* English.lproj/Breakpoints.xib: Allow multiple selection
* Source/BreakpointController.m:
(removeBreakpoint:): Remove the selection's entirety, instead of the first element
Preferences should be set in +load rather than +initialize, as we can’t rely on AppDelegate receiving a message before any other objects (In this case, DebuggerController was being created first, leading to sockets without the correct default port number).
* Source/AppDelegate.m:
(initialize): Change to load
Robert Sesek [Fri, 1 Aug 2008 17:21:57 +0000 (13:21 -0400)]
Keep breakpoints in the preferences so they are restored at launch
* Source/BreakpointManager.m+h: Add a savedBreakpoints ivar to hold the dictionarys
(addBreakpoint:): Add the breakpoint to the NSUserDefaults
(removeBreakpointAt:inFile:): Remove the breakpoint from NSUserDefaults
Robert Sesek [Mon, 14 Jul 2008 19:13:34 +0000 (15:13 -0400)]
Check and see if stderr has any data on it when syntax highlighting. If so, only show plain text.
* Source/BSSourceView.m:
(initWithFrame): Register to be an observer of the file handle reader notification
(setFile:): Add another pipe for stderr, and read in background from it
(errorHighlightingFile:): New method to handle the notification
Robert Sesek [Sun, 13 Jul 2008 16:43:38 +0000 (12:43 -0400)]
Fixing a bug in -[SocketWrapper receive] that could miss up to the last 8 bytes of a response
* Source/SocketWrapper.m:
(receive): A multi-packet response could be incomplete by a difference of 8 bytes because we didn't factor in packetLength when counting
Ciarán Walsh [Wed, 25 Jun 2008 00:01:25 +0000 (01:01 +0100)]
A few miscellaneous memory management fixes
* Source/BSSourceView.m:
(setFile:): Autorelease the NSTask and release the NSAttributedString
* Source/BSSplitView.m:
(drawDividerInRect:): Release the NSGradient after drawing
* Source/Breakpoint.m:
(initWithDictionary:): Retain the file object
* Source/BreakpointManager.m:
(hasBreakpointAtLine:inFile:): Autorelease the object we send to [containsObject:]
Ciarán Walsh [Wed, 25 Jun 2008 00:00:43 +0000 (01:00 +0100)]
The -connect: method would leak memory when called more than once
* Source/SocketWrapper.m: Add a private prop for the hostname
(remoteHost): Removed through use of a prop
(connect:): Change from alloc'ing an NSString to creating an autorelease'd one
Robert Sesek [Sun, 13 Jul 2008 16:43:38 +0000 (12:43 -0400)]
Fixing a bug in -[SocketWrapper receive] that could miss up to the last 8 bytes of a response
* Source/SocketWrapper.m:
(receive): A multi-packet response could be incomplete by a difference of 8 bytes because we didn't factor in packetLength when counting
Robert Sesek [Wed, 9 Jul 2008 17:54:08 +0000 (13:54 -0400)]
Add Sparkle framework and hook it up (except for the appcast URL)
* English.lproj/MainMenu.xib: Instantiate the SUUpdater
* MacGDBp.xcodeproj: Add a build phase and link against Sparkle.framework
* Sparkle.framewokr/: New files
Robert Sesek [Wed, 9 Jul 2008 17:45:02 +0000 (13:45 -0400)]
Instantiate the Debugger and Breakpoint controllers in the NIB rather than in code
* English.lproj/MainMenu.xib: Instantiate DebuggerWindowController and BreakpointWindowController
* Source/AppDelegate.m:
(applicationDidFinishLaunching:): Remove the two object init lines
Robert Sesek [Wed, 9 Jul 2008 17:39:55 +0000 (13:39 -0400)]
Use prefernce values to set the port and IDE key, rather than hard-coded values
* Source/DebuggerWindowController.m+h:
(initWithPort:session:): Renamed to -[init] and use preference values to set the port and IDE key
* Source/AppDelegate.m:
(applicationDidFinishLaunching:): Simply call init on DebuggerWindowController
Robert Sesek [Wed, 9 Jul 2008 17:05:14 +0000 (13:05 -0400)]
Adding an empty preferences window and controller. Hooking up the Preferences menu item.
* English.lproj/MainMenu.xib: Hooking up the Preferences menu item
* English.lproj/Preferences.xib: New file
* Source/PreferencesController.m+h: New files
* Source/AppDelegate.m+h: Adding an ivar for the PreferencesController
(showPreferences:): New method
* MacGDBp.xcodeproj: Project updates for new files
Robert Sesek [Wed, 18 Jun 2008 13:26:40 +0000 (09:26 -0400)]
Fix a few exceptions/warnings related to going no-gc
* Source/AppDelegate.m
(versionCheck:): Add an NSAutoreleasePool
* Source/BreakpointManager.h: Specify an assignment type for the connection ivar
* Source/SocketWrapper.m:
(connect:): Add an NSAutoreleasePool
Robert Sesek [Mon, 16 Jun 2008 23:51:40 +0000 (19:51 -0400)]
Adding a *real* version checking system
* English.lproj/MainMenu.xib: Adding the version update window
* Source/AppDelegate.h: Adding IBOs for the updater window and the update information string
* Source/AppDelegate.m:
(init): Run the version check method
(versionCheck:): New method
(openUpdateInformation:): New method
Robert Sesek [Thu, 12 Jun 2008 15:31:53 +0000 (11:31 -0400)]
The breakpoint manager now works -- breakpoints can be set from the main debugger or the manager
* English.lproj/Breakpoints.xib: Set the NSTableView's delegate to be File's Owner and disconnect the content IBO to the NS-AC
* Source/BreakpointManager.m:
(updateDisplaysForfile:): New private method
(addBreakpoint:): Call [updateDisplaysForfile:]
(removeBreakpointAt:inFile:): ditto
* BreakpointWindowController.m+h: Add props and synth them for sourceView and arrayController ivars
(removeBreakpoint:): Fill out method stub
(tableViewSelectionDidChange:): Implement delegate method
* DebuggerWindowController.m+h: Add prop/synth for sourceViewer ivar
Robert Sesek [Thu, 12 Jun 2008 13:51:57 +0000 (09:51 -0400)]
Fixing a bug where if the register depth was too deep, more properties would not be fetched/inserted correctly
* Source/AppDelegate.m+h: Add and synthesize props for debugger and breakpoint ivars
* Source/DebuggerConnection.m+h:
(getProperty:forNode:): Renamed [getProperty:] and now return an NSArray rather than attaching to a node
* Source/DebuggerWindowController.m+h:
(addChildren:toNode:): Removed
(outlineViewItemDidExpand:): Don't have to do extra fetch work here because it will now be done in the model
* Source/NSXMLElementAdditions.m+h:
(subnodes): New method that does the same thing as [children] but intelligently fetches more depth
* English.lproj/Debugger.xib: Tell the regiser NSTreeController to use [subnodes] instead of [children]
Robert Sesek [Tue, 10 Jun 2008 17:59:53 +0000 (13:59 -0400)]
Hooking up the BSSourceView outlet and implement delegates
* English.lproj/Breakpoints.xib: Hook up outlet
* Source/BreakpointWindowController.h: Add the ivar
* Source/BreakpointWindowController.m:
(addBreakpoint:): Show the NSOpenPanel to select a file
(gutterClickedAtLine:forFile:): New method