macgdbp.git
16 years agoInstead of storing the pionter to the expanded item, save the variable name because...
Robert Sesek [Fri, 4 Jan 2008 22:29:48 +0000 (14:29 -0800)]
Instead of storing the pionter to the expanded item, save the variable name because we replace the entire register

16 years agoReadd a space after a colon
Robert Sesek [Fri, 4 Jan 2008 22:25:52 +0000 (14:25 -0800)]
Readd a space after a colon

16 years agoReadd a space after a colon
Robert Sesek [Fri, 4 Jan 2008 22:25:52 +0000 (14:25 -0800)]
Readd a space after a colon

16 years agoReworking the code to use NSTreeNode instead of the hidden proxy objects
Robert Sesek [Fri, 4 Jan 2008 22:08:37 +0000 (14:08 -0800)]
Reworking the code to use NSTreeNode instead of the hidden proxy objects

16 years agoWe don't need the 10.5 SDK on the refactoring branch
Robert Sesek [Fri, 4 Jan 2008 20:33:57 +0000 (12:33 -0800)]
We don't need the 10.5 SDK on the refactoring branch

16 years agoRenaming the status ivar to be statusmsg so that -[DebuggerWindowController setStatus...
Robert Sesek [Fri, 4 Jan 2008 20:32:10 +0000 (12:32 -0800)]
Renaming the status ivar to be statusmsg so that -[DebuggerWindowController setStatus:] doesn't get called when connecting the nib

16 years agoRefactoring _reconnectButton
Robert Sesek [Fri, 4 Jan 2008 20:18:17 +0000 (12:18 -0800)]
Refactoring _reconnectButton

16 years agoRefactoring _runButton
Robert Sesek [Fri, 4 Jan 2008 20:17:05 +0000 (12:17 -0800)]
Refactoring _runButton

16 years agoRefactoring _stepOutButton
Robert Sesek [Fri, 4 Jan 2008 20:15:45 +0000 (12:15 -0800)]
Refactoring _stepOutButton

16 years agoRefactoring _stepOverButton
Robert Sesek [Fri, 4 Jan 2008 20:12:23 +0000 (12:12 -0800)]
Refactoring _stepOverButton

16 years agoRefactoring _stepInButton
Robert Sesek [Fri, 4 Jan 2008 20:09:36 +0000 (12:09 -0800)]
Refactoring _stepInButton

16 years agoRefactoring _sourceViewerScroller
Robert Sesek [Fri, 4 Jan 2008 20:09:03 +0000 (12:09 -0800)]
Refactoring _sourceViewerScroller

16 years agoRefactoring _sourceViewer
Robert Sesek [Fri, 4 Jan 2008 20:08:22 +0000 (12:08 -0800)]
Refactoring _sourceViewer

16 years agoRefactoring _error
Robert Sesek [Fri, 4 Jan 2008 20:07:50 +0000 (12:07 -0800)]
Refactoring _error

16 years agoRefactoring _status
Robert Sesek [Fri, 4 Jan 2008 20:04:45 +0000 (12:04 -0800)]
Refactoring _status

16 years agoRefactoring _expandedRegisters
Robert Sesek [Fri, 4 Jan 2008 20:02:33 +0000 (12:02 -0800)]
Refactoring _expandedRegisters

16 years agoRefactoring _registerView
Robert Sesek [Fri, 4 Jan 2008 20:02:02 +0000 (12:02 -0800)]
Refactoring _registerView

16 years agoRefactoring _registerController
Robert Sesek [Fri, 4 Jan 2008 20:01:29 +0000 (12:01 -0800)]
Refactoring _registerController

16 years agoRefactoring _stack
Robert Sesek [Fri, 4 Jan 2008 20:00:42 +0000 (12:00 -0800)]
Refactoring _stack

16 years agoRefactoring _stackController
Robert Sesek [Fri, 4 Jan 2008 19:58:03 +0000 (11:58 -0800)]
Refactoring _stackController

16 years agoRefactoring _connection ivar
Robert Sesek [Fri, 4 Jan 2008 19:56:55 +0000 (11:56 -0800)]
Refactoring _connection ivar

16 years agoReverting portion of 48022096ee56de046900df9d3fedafe3e650c87b in DebuggerWindowContro...
Robert Sesek [Fri, 4 Jan 2008 19:44:24 +0000 (11:44 -0800)]
Reverting portion of 48022096ee56de046900df9d3fedafe3e650c87b in DebuggerWindowController.m/h and Debugger.nib

16 years agoFix some variable hiding that was caused by our refactoring. Unfortunately, our code...
Robert Sesek [Fri, 4 Jan 2008 10:37:00 +0000 (02:37 -0800)]
Fix some variable hiding that was caused by our refactoring. Unfortunately, our code still hangs when we try to connect.

16 years agoWe can't have an instance variable match the name of a C function because then we...
Robert Sesek [Fri, 4 Jan 2008 10:24:40 +0000 (02:24 -0800)]
We can't have an instance variable match the name of a C function because then we don't compile

* Source/SocketWrapper.h: ivar socket is now sock
* Source/SocketWrapper.m:
([SocketWrapper connect:]): We're now happy because socket() can be called without ambiguity between self->socket

16 years agoUntested refactoring is the best! Renaming all of the instance variables to not start...
Robert Sesek [Fri, 4 Jan 2008 10:21:51 +0000 (02:21 -0800)]
Untested refactoring is the best! Renaming all of the instance variables to not start with underscores, because it's just plain old annoying.

16 years agoRemoving the extra spacing after colons in function arguments
Robert Sesek [Fri, 4 Jan 2008 10:03:38 +0000 (02:03 -0800)]
Removing the extra spacing after colons in function arguments

16 years agoAdd some test code to see how Leopard behaves
Robert Sesek [Fri, 4 Jan 2008 09:50:27 +0000 (01:50 -0800)]
Add some test code to see how Leopard behaves

* MacGDBp.xcodeproj: Change to the 10.5 SDK
* Source/DebuggerWindowController.m: Play with the new and improved NSTreeController

16 years agoUpdate MacGDBp.xcodeproj/.gitignore for Xcode v3
Robert Sesek [Fri, 4 Jan 2008 09:44:14 +0000 (01:44 -0800)]
Update MacGDBp.xcodeproj/.gitignore for Xcode v3

16 years agoMinor upgrades to the project due to Xcode 3.0
Robert Sesek [Sat, 27 Oct 2007 23:30:04 +0000 (19:30 -0400)]
Minor upgrades to the project due to Xcode 3.0

16 years agoChanging the version number from alpha to Beta 1
Robert Sesek [Sat, 25 Aug 2007 06:11:11 +0000 (23:11 -0700)]
Changing the version number from alpha to Beta 1

* Info.plist

16 years agoRemoving another NSLog when the stack's selection changes
Robert Sesek [Sat, 25 Aug 2007 05:38:26 +0000 (22:38 -0700)]
Removing another NSLog when the stack's selection changes

* Source/DebuggerWindowController.m
([DebuggerWindowController tableViewSelectionDidChange:])

16 years agoImproving the way we handle updating the stack and registers. Instead of updating...
Robert Sesek [Sat, 25 Aug 2007 05:36:12 +0000 (22:36 -0700)]
Improving the way we handle updating the stack and registers. Instead of updating them after we send step/run commands, only update the stacks and registers if the status (in updateStatus:) is on "break"

* Source/DebuggerConnection.m

16 years agoRemoving a puts statement from the shell script that creates the build version
Robert Sesek [Sat, 25 Aug 2007 05:09:59 +0000 (22:09 -0700)]
Removing a puts statement from the shell script that creates the build version

* MacGDBp.xcodeproj

16 years agoRemoving the NSLog that was being called everytime we sent a command
Robert Sesek [Sat, 25 Aug 2007 05:00:15 +0000 (22:00 -0700)]
Removing the NSLog that was being called everytime we sent a command

* Source/DebuggerConnection.m
([DebuggerConnection dataSent:])

16 years agoRenaming the "Refresh" butto to be "Re-Connect" and hooking it up (though it does...
Robert Sesek [Sat, 11 Aug 2007 23:21:03 +0000 (16:21 -0700)]
Renaming the "Refresh" butto to be "Re-Connect" and hooking it up (though it does nothing at the moment)

* English.lproj/Debugger.nib: Renaming the "Run" button and hooking it up to DebuggerWindowController
* Source/DebuggerWindowController.m|h: Adding a _reconnectButton outlet and a reconnect: action
([DebuggerWindowController reconnect:]): New method

16 years agoAllow the connection socket to be reused in SocketWrapper
Robert Sesek [Sat, 11 Aug 2007 22:57:23 +0000 (15:57 -0700)]
Allow the connection socket to be reused in SocketWrapper

* Source/SocketWrapper.m:
([SocketWrapper connect:]): Allow the socketOpen to reuse addresses, making the bind errors less common

16 years agoIn the dataReceived: method if an error is in the response, set the error on the...
Robert Sesek [Sat, 11 Aug 2007 22:52:36 +0000 (15:52 -0700)]
In the dataReceived: method if an error is in the response, set the error on the window

* Source/DebuggerConnection.m:
([DebuggerConnection dataReceived:deliverTo:]): If the response XML contains an error tag, set the error of the window to be the error message

16 years agoChaning all the delivery methods to accept NSXMLDocument instead of NSData and changi...
Robert Sesek [Sat, 11 Aug 2007 22:33:24 +0000 (15:33 -0700)]
Chaning all the delivery methods to accept NSXMLDocument instead of NSData and changing dataReceived: to create the NSXMLDocument

* Source/DebuggerConnection.m

16 years agoWe previously were leaking all over the place due to improper use of memory managemen...
Robert Sesek [Sat, 11 Aug 2007 19:54:55 +0000 (12:54 -0700)]
We previously were leaking all over the place due to improper use of memory management techniques and circular references

* English.lproj/Debugger.nib: Setting DebuggerWindowController as the window's delgate
* Source/AppDelegate.h: Adding a connections ivar
* Source/AppDelegate.m:
([AppDelegate init]): New method to initialize the connections array
([AppDelegate applicationWillTerminate:]): Frees the connections array
([AppDelegate registerConnection:]): New method to register a DebuggerConnection
([AppDelegate unregisterConnection:]): Unregisters a DebuggerConnection
* Source/ConnectWindowController.m:
([ConnectWindowController connect:]): We weren't properly release'ing the connection, so now we register it with the delegate and release it in the connect method
* Source/DeubggerConnection.h: Added a windowDidClose method so that the window controller can forward the message
* Source/DebuggerConnection.m:
([DebuggerConnection windowDidClose]): New method to forward the windowWillClose notification
([DebuggerConnection initWithPort:session:]): We no longer have to register for NSApplicationWillTerminate
([DebuggerConnection applicationWillTerminate:]): Removed
([DebuggerConnection dealloc]): Release _windowController
* Source/DebuggerWindowController.m:
([DebuggerWindowController initWithConnection:]): No longer retain the connection as it creates a circular ref
([DebuggerWindowController windowWillClose:]): Use this delegate method to buble the notification to the controller
([DebuggerWindowController dealloc]): Since we don't retain _connection, don't release it
* Source/SocketWrapper.m:
([SocketWrapper dealloc]): Remove ourselves as a notification observer so we don't have a nil reference

16 years agoWe now remember which items in the register have been expanded so they stay open
Robert Sesek [Mon, 6 Aug 2007 16:57:57 +0000 (09:57 -0700)]
We now remember which items in the register have been expanded so they stay open

* Source/DebuggerWindowController.h: Adding an _registerView outlet and an _expandedRegisters array
* Source/DebuggerWindowController.m:
([DebuggerWindowController initWithConnection:]): Initialize _expandedRegisters
([DebuggerWindowController dealloc]): Release _expandedRegisters
([DebuggerWindowController setRegister:]): When we set the register, go through all the items and see if any of them should be expanded
([DebuggerWindowController outlineViewItemDidExpand:]): Add the expanded object to _expandedRegisters
([DebuggerWindowController outlineViewItemDidCollapse:]): Remove the object from _expandedRegisters
* English.lproj/Debugger.nib: Hooking up the _registerView outlet

16 years agoWorking around an extremely annoying apple bug in NSTreeController and an NSOutlineVi...
Robert Sesek [Sun, 5 Aug 2007 21:04:34 +0000 (14:04 -0700)]
Working around an extremely annoying apple bug in NSTreeController and an NSOutlineView. When the contentArray is bound on an NSTreeController, the observing can go haywire and just crash randomly.

* English.lproj/Debugger.nib: Unbinding RegisterController's content array
* Source/DebuggerConnection.m:
([DebuggerConnection registerRecieved:]): Sending [_windowController setRegister:] the entire document instead of the rootElement
* Source/DebuggerWindowController.h: Removed _register ivar and changed setRegister: to take an NSXMLDocument
* Source/DebuggerWindowController.m:
([DebuggerWindowController setRegister:]): Instead of changing a property and letting KVO do the work (and subsequently and randomly crash), force the controller to have new content

16 years agoCasting to remove a warning
Robert Sesek [Sun, 5 Aug 2007 20:20:34 +0000 (13:20 -0700)]
Casting to remove a warning

* Source/DebuggerConnection.m:
([DebuggerConnection propertyRecieved:]): Casting parent to be an NSXMLElement because childAtIndex returns an NSXMLNode

16 years agoMaking the buttons change their enabled state depending on where we are in debugging
Robert Sesek [Sun, 5 Aug 2007 19:55:34 +0000 (12:55 -0700)]
Making the buttons change their enabled state depending on where we are in debugging

* Source/DebuggerWindowController.m:
([DebuggerWindowController setStatus:]): Disable all the buttons and reenable "step in" and "run" if we're connected
([DebuggerWindowController setStack:]): Enable the step in/out/over and run buttons appropriately

16 years agoHooking up the step in/out/over and run buttons to the nib
Robert Sesek [Sun, 5 Aug 2007 19:32:52 +0000 (12:32 -0700)]
Hooking up the step in/out/over and run buttons to the nib

* Source/DebuggerWindowController.h: Making outlets for all of the buttons
* English.lproj/Debugger.nib: Hooking up the outlets to the interface

16 years agoAdding a method to check and see if the connection we have is valid
Robert Sesek [Sun, 5 Aug 2007 19:29:02 +0000 (12:29 -0700)]
Adding a method to check and see if the connection we have is valid

* Source/DebuggerConnection.m|h:
([DebuggerConnection isConnected]): New method

16 years agoAdding an Apple radar number for where we have to use _NSArrayControllerTreeNode
Robert Sesek [Sun, 5 Aug 2007 08:32:07 +0000 (01:32 -0700)]
Adding an Apple radar number for where we have to use _NSArrayControllerTreeNode

* Source/DebuggerWindowController.m:
([DebuggerWindowController outlineViewItemDidExpand:])
([DebuggerWindowController addChildren:toNode:])

16 years agoCommenting out the data received NSLog()
Robert Sesek [Sun, 5 Aug 2007 08:12:18 +0000 (01:12 -0700)]
Commenting out the data received NSLog()

* Source/SocketWrapper.m:
([SocketWrapper receive:])

16 years agoThe depth fetching of child nodes now works and are properly inserted into the regist...
Robert Sesek [Sun, 5 Aug 2007 08:06:15 +0000 (01:06 -0700)]
The depth fetching of child nodes now works and are properly inserted into the register tree

* Source/DebuggerConnection.h: Changing _depthFetchElement to type id for the mysterious _NSArrayControllerTreeNode type
* Source/DebuggerConnection.m:
([DebuggerConnection propertyReceived:]): Get all the children from the property and then detach them so they can be injected into the tree
* Source/DebuggerWindowController.h: Added a _registerController outlet
* Source/DebuggerWindowController.m:
([DebuggerWindowController addChildren:toNode:]): New method that adds detached children to the specified _NSArrayControllerTreeNod using it's index set
([DebuggerWindowController outlineViewItemDidExpand:]): Change from using an NSXMLElement to the internal TreeNode
* English.lproj/Debugger.nib: Hook up the RegisterController to the outlet

16 years agoFixing a compiler error for a missing variable
Robert Sesek [Sun, 5 Aug 2007 07:25:22 +0000 (00:25 -0700)]
Fixing a compiler error for a missing variable

* Source/DebuggerConnection.m:
([DebuggerConnection getProperty:forElement:]): We were still referencing a depth variable when we removed it

16 years agoWe now get the property when we go past the currently-fetched depth but we do not...
Robert Sesek [Sun, 5 Aug 2007 07:24:05 +0000 (00:24 -0700)]
We now get the property when we go past the currently-fetched depth but we do not have the display updating yet

* Source/DebuggerConnection.h: New ivar _depthFetchElement to record the element that requested more registers
* Source/DebuggerConnection.m:
([DebuggerConnection dataReceived:deliverTo:]): Removed an NSLog()
([DebuggerConnection getProperty:forElement:]): New method that gets a specified property for a specific element
([DebuggerConnection propertyReceived:]): Recived data delivery handler for getProperty:forElement:
* Source/DebuggerWindowController.m:
([DebuggerWindowController outlineViewItemDidExpand:]): Call the getProperty:forElement: method to get deeper properties
* English.lproj/Debugger.nib: Set the delegate of the NSOutlineView to be the first responder

16 years agoMoving the depth checker from NSXMLElementAdditions.m to be in DebuggerWindowController
Robert Sesek [Sun, 5 Aug 2007 06:46:07 +0000 (23:46 -0700)]
Moving the depth checker from NSXMLElementAdditions.m to be in DebuggerWindowController

* Source/NSXMLElementAdditions.m:
([NSXMLElement isLeaf]): Moved the checking to see if we need to fetch more
* Source/NSXMLElementAdditions.h: New header file for linking
* Source/DebuggerWindowController.m:
([DebuggerWindowController outlineViewItemDidExpand:]): New method that handles the depth checking
* MacGDBp.xcodeproj: Project changes for NSXMLElementAdditions.h

16 years agoAdding support for base64 encoded string values
Robert Sesek [Sun, 5 Aug 2007 05:49:09 +0000 (22:49 -0700)]
Adding support for base64 encoded string values

* Source/base64.c|h: New file from external source
* Source/NSXMLElementAdditions.m:
([NSXMLElement value]): Decode data using the new base64 functions
* MacGDBp.xcodeproj: Adding the base64.c|h files to the project

16 years agoMerge branch 'master' into register-feature
Robert Sesek [Sun, 5 Aug 2007 03:23:03 +0000 (20:23 -0700)]
Merge branch 'master' into register-feature

Conflicts:

MacGDBp.xcodeproj/project.pbxproj

16 years agoReorganizing the project so classes are actually int he classes group and not in...
Robert Sesek [Sun, 5 Aug 2007 03:12:55 +0000 (20:12 -0700)]
Reorganizing the project so classes are actually int he classes group and not in "Other Sources"

16 years agoIn NSXMLElementAdditions adding recognizers to the code for certain special value...
Robert Sesek [Sun, 5 Aug 2007 03:10:28 +0000 (20:10 -0700)]
In NSXMLElementAdditions adding recognizers to the code for certain special value types

* Source/NSXMLElementAdditions.m:
([NSXMLElement value]): If the item is a leaf, only display an elipsis, and if it's base64 encoded the decode.. er print that it's base64'd

16 years agoMaking the register viewer have a smaller font
Robert Sesek [Sun, 5 Aug 2007 03:05:25 +0000 (20:05 -0700)]
Making the register viewer have a smaller font

* English.lproj/Debugger.nib

16 years agoMake a cast to remove a warning
Robert Sesek [Sun, 5 Aug 2007 03:00:02 +0000 (20:00 -0700)]
Make a cast to remove a warning

* Source/NSXMLElementAdditions.m:
([NSXMLElement leaf]): Cast [elm parent] to be NSXMLElement to remove a warning

16 years agoRemoving some NSLog()s and in isLeaf: we now determine if a non-leaf node has it...
Robert Sesek [Sun, 5 Aug 2007 02:58:27 +0000 (19:58 -0700)]
Removing some NSLog()s and in isLeaf: we now determine if a non-leaf node has it's children

* Source/NSXMLElementAdditions.m:
([NSXMLElement variable]): Remove a NSLog()
([NSXMLElement isLeaf]): If the element is not a leaf, but does not have children, then find the depth we should request more about the property at

16 years agoStandardizing the NSXMLElementAdditions methods and adding a new one for variable...
Robert Sesek [Sun, 5 Aug 2007 02:35:20 +0000 (19:35 -0700)]
Standardizing the NSXMLElementAdditions methods and adding a new one for variable type

* Source/NSXMLElementAdditions.m:
([NSXMLElement varName]): Renamed to variable
([NSXMLElement type]): New method

16 years agoMerge branch 'master' into register-feature
Robert Sesek [Sun, 5 Aug 2007 02:28:55 +0000 (19:28 -0700)]
Merge branch 'master' into register-feature

16 years agoUse memset() on some of the char[]'s to make sure we don't have problems with memory
Robert Sesek [Sun, 5 Aug 2007 02:24:58 +0000 (19:24 -0700)]
Use memset() on some of the char[]'s to make sure we don't have problems with memory

* Source/SocketWrapper.m:
([SocketWrapper receive:]): Set the packetLength char array and the packet char array to be null before writing into them

16 years agoTrying to get the register viewer to work
Robert Sesek [Sun, 5 Aug 2007 01:22:53 +0000 (18:22 -0700)]
Trying to get the register viewer to work

* Source/NSXMLElementAdditions.m: New category that provides access to attributes that NSTreeController can't access
* MacGDBp.xcodeproj: Added NSXMLElementAdditions.m
* Source/DebuggerConnection.m:
([DebuggerConnection dataReceived:deliverTo:]): Print out the data we're receiving to make debugging easier
([DebuggerConnection updateStackTraceAndRegisters:]): Send the context_get command and receive the data
([DebuggerConnection registerReceived:]): New method to handle the received register packet
* Source/DebuggerWindowController.m|h: Added _register and a setter for it
([DebuggerWindowController setRegister:]): New method
* English.lproj/Debugger.nib: Added a tree controller and tried to hook it up properly

16 years agoFixing the updateSourceViewer function to not depend on -[NSArrayController selection...
Robert Sesek [Sat, 4 Aug 2007 22:29:39 +0000 (15:29 -0700)]
Fixing the updateSourceViewer function to not depend on -[NSArrayController selection] which is unreliable in returning the right proxy object

* Source/DebuggerWindowController.h: Remove _currentFile as it's not really needed
* Source/DebuggerWindowController.m:
([DebuggerWindowController updateSourceViewer]): Remove the dependency on [NSArrayController selection] and don't bother checking with _currentFile anymore

16 years agoScroll to the proper line in the source file and colorize it when we are clicking...
Robert Sesek [Sat, 4 Aug 2007 22:15:25 +0000 (15:15 -0700)]
Scroll to the proper line in the source file and colorize it when we are clicking through the stack trace

* Source/DebuggerWindowController.m

16 years agoCalling updateSourceViewer: on selection change isn't enough, we also need to do...
Robert Sesek [Sat, 4 Aug 2007 21:36:45 +0000 (14:36 -0700)]
Calling updateSourceViewer: on selection change isn't enough, we also need to do it when the stack changes

* Source/DebuggerWindowController.m:
([DebuggerWindowController setStack:]): Update the source viewer after finishing the setting

16 years agoStyling the NSTextView source viewer to be a fixed-width font and to have a horizonta...
Robert Sesek [Sat, 4 Aug 2007 21:33:59 +0000 (14:33 -0700)]
Styling the NSTextView source viewer to be a fixed-width font and to have a horizontal scroll bar

* Enblish.lproj/Debugger.nib: Adding an outlet for the NSScrollView and setting some NSTextView options
* Source/DebuggerController.m:
([DebuggerWindowController awakeFromNib]): New method to set up the scrolling system for the source viewer
([DebuggerWindowController updateSourceViewer]): Set the string to "" if there is no selected file, and make the font Monaco

16 years agoStarting to implement the source viewer pane
Robert Sesek [Sat, 4 Aug 2007 20:26:02 +0000 (13:26 -0700)]
Starting to implement the source viewer pane

* Source/DebuggerWindowController.h: Adding outlets for StackController, _currentFile, and _sourceViewer
* Source/DebuggerWindowController.m:
([DebuggerWindowController tableViewSelectionDidChange:]): Added delegate notification for when the selection of the tableview changes to update the source viewer
([DebuggerWindowController updateSourceViewer]): New method to refresh the source viewer display
* English.lproj/Debugger.nib: Hooking up the new outlets

16 years agoI guess we forgot to rename _postNotification to postNotification, too
Robert Sesek [Sat, 4 Aug 2007 19:39:40 +0000 (12:39 -0700)]
I guess we forgot to rename _postNotification to postNotification, too

* Source/SocketWrapper.m

16 years agoForgot to change the instances of _createCommand to createCommand
Robert Sesek [Sat, 4 Aug 2007 19:29:41 +0000 (12:29 -0700)]
Forgot to change the instances of _createCommand to createCommand

* Source/DebuggerConnection.m

16 years agoCleaning up our use of private methods: Moving all private methods into class categor...
Robert Sesek [Sat, 4 Aug 2007 09:14:05 +0000 (02:14 -0700)]
Cleaning up our use of private methods: Moving all private methods into class categories in the .m file, and removing the _ prefix as it is "reserved" for Apple (according to their guidelines).

16 years agoHooking up "Step Over" and "Step Out" buttons
Robert Sesek [Sat, 4 Aug 2007 08:47:50 +0000 (01:47 -0700)]
Hooking up "Step Over" and "Step Out" buttons

* Source/DebuggerConnection.m|h:
([DebuggerConnection stepOut]): New method
([DebuggerConnection stepOver]): New method
* Source/DebuggerWindowController.m|h:
([DebuggerWindowController stepOut]): New method
([DebuggerWindowController stepOver]): New method
* English.lproj/Debugger.nib: Hooking up the two buttons to the new actions in DebuggerWindowController

16 years agoNow that we use NSData, it doesn't make sense to print out the received packet
Robert Sesek [Sat, 4 Aug 2007 08:38:33 +0000 (01:38 -0700)]
Now that we use NSData, it doesn't make sense to print out the received packet

* Source/DebuggerConnection.m:
([DebuggerConnection dataReceived:deliverTo:])

16 years agoInstead of data received being an NSString, have it be NSData because converting...
Robert Sesek [Sat, 4 Aug 2007 08:37:19 +0000 (01:37 -0700)]
Instead of data received being an NSString, have it be NSData because converting to NSString was actually causing problems and NSXMLDocument can take in NSData just fine

* Source/DebuggerConnection.m: Making all of the delivery functions use NSData not NSString
([DebuggerConnection _handshake:])
([DebuggerConnection _updateStatus:])
([DebuggerConnection _stackReceived:])
* Source/SocketWrapper.m|h: ditto
([SocketWrapper dataReceived:deliverTo:]): Now uses NSData
([SocketWrapper receive:]): Save ourselves some trouble and don't convert the data to NSString

16 years agoRevert "Instead of directly calling stack_get, get the depth first and then call...
Robert Sesek [Sat, 4 Aug 2007 08:30:11 +0000 (01:30 -0700)]
Revert "Instead of directly calling stack_get, get the depth first and then call the maximum depth"

This reverts commit 9371ab6efb4d371e9db5f9e72b8f2cdf38a3a8de.

16 years agoIn dataReceived:deliverTo: print out the data we received *before* we call the delive...
Robert Sesek [Sat, 4 Aug 2007 07:51:58 +0000 (00:51 -0700)]
In dataReceived:deliverTo: print out the data we received *before* we call the delivery selector so that it prints to NSLog in the right order

* Source/DebuggerConnection.m:
([DebuggerConnection dataReceived:deliverTo:])

16 years agoInstead of directly calling stack_get, get the depth first and then call the maximum...
Robert Sesek [Sat, 4 Aug 2007 07:50:45 +0000 (00:50 -0700)]
Instead of directly calling stack_get, get the depth first and then call the maximum depth

* Source/DebuggerConnection.m:
([DebuggerConnection updateStackTraceAndRegisters]): Call stack_depth which in turn calls stack_get
([DebuggerConnection _stackDepthReceived:]): Receives the depth of the stack and then asks for the stack at that depth

16 years agoAdding the sent data as the parameter to the dataSent delegate method
Robert Sesek [Sat, 4 Aug 2007 07:38:07 +0000 (00:38 -0700)]
Adding the sent data as the parameter to the dataSent delegate method

* Source/DebuggerConnection.m:
([DebuggerConnection dataSent:]): Print the data sent with the new paramater
* Source/SocketWrapper.m|h: Added a new parameter to dataSent: delegate method which contains the sent data
([SocketWrapper dataSent:])
([SocketWrapper _sendMessageToDelegate:])
([SocketWrapper send:])

16 years agoAdd a fourth column to the stack trace for the function name
Robert Sesek [Sat, 4 Aug 2007 07:26:00 +0000 (00:26 -0700)]
Add a fourth column to the stack trace for the function name

* English.lproj/Debugger.nib

16 years agoUsing two NSSplitViews now because the interface seems to make much more sense laid...
Robert Sesek [Sat, 4 Aug 2007 07:22:58 +0000 (00:22 -0700)]
Using two NSSplitViews now because the interface seems to make much more sense laid out this way.

* English.lproj/Debugger.nib

16 years agoImplementing a buggy stack trace viewer.
Robert Sesek [Sat, 4 Aug 2007 07:08:38 +0000 (00:08 -0700)]
Implementing a buggy stack trace viewer.

* Source/DebuggerConnection.m:
([DebuggerConnection _stackReceived:]): New method, that is probably leaky, that gets all the attributes for a stack trace and dictionary-izes and array-izes them
* Source/DebuggerWindowController.m|h: Added a _stack ivar and then an appropriate setter
([DebuggerWindowController setStack:]): New method
* English.lproj/Debugger.nib: Adding a binding to _stack to display the stacktrace

16 years agoAdding a method to handle getting the stack trace
Robert Sesek [Fri, 3 Aug 2007 23:59:26 +0000 (16:59 -0700)]
Adding a method to handle getting the stack trace

* Source/DebuggerConnection.m|h:
([DebuggerConnection updateStackTraceAndRegisters]): New method that calls stack_get and eventually context_get
([DebuggerConnection _stackReceived:]): Called when the stack is fully received

16 years agoFixing an NSException that was being raised when we try to receive: with a NIL deliverTo
Robert Sesek [Fri, 3 Aug 2007 23:51:41 +0000 (16:51 -0700)]
Fixing an NSException that was being raised when we try to receive: with a NIL deliverTo

* Source/SocketWrapper.m:
([SocketWrapper receive:]): If the client does not specify a selector, do not add it into the userInfo dictionary

16 years agoImplementing the "Step In" command
Robert Sesek [Fri, 3 Aug 2007 23:49:06 +0000 (16:49 -0700)]
Implementing the "Step In" command

* Source/DebuggerWindowController.m|h:
([DebuggerWindowController stepIn:]): New method to forward user action to the DebuggerConnection
* Source/DebuggerConnection.m|h:
([DebuggerConnection stepIn]): New method to tell the debugger to step in
* English.lproj/Debugger.nib: Hooking up the "step into" button

16 years agoAdding functionality to get the IP address of the remote host and then using it in...
Robert Sesek [Fri, 3 Aug 2007 23:11:52 +0000 (16:11 -0700)]
Adding functionality to get the IP address of the remote host and then using it in the title

* Source/DebuggerConnection.m|h: Added a _connected ivar to check and see whether or not the connection has been established
([DebuggerConnection remoteHost]): New function that returns the name of the remote host
* Source/DebuggerConnection.m:
([DebuggerConnection initWithPort:]): Do not set the window title anymore
([DebuggerConnection setStatus:]): Set the window title upon status updates
* Source/SocketWrapper.m|h:
([SocketWrapper remoteHost]): New method that gets the remote host's IP address

16 years agoHooking up the "Run" button to the WindowController
Robert Sesek [Fri, 3 Aug 2007 22:05:22 +0000 (15:05 -0700)]
Hooking up the "Run" button to the WindowController

* English.lproj/Debugger.nib: Hooking up the "Run" button to the DebuggerWindowConnection

16 years agoAdding support for the "run" command and acutally using the session name
Robert Sesek [Fri, 3 Aug 2007 22:02:30 +0000 (15:02 -0700)]
Adding support for the "run" command and acutally using the session name

* Source/DebuggerConnection.m|h:
([DebuggerConnection run]): New method that tells the script to continue running
([DebuggerConnection refreshStatus]): New method that sends the status command and then updates the display
([DebuggerConnection handshake:]): Renamed to _handshake
([DebuggerConnection updateStatus:]): Renamed to _updateStatus
([DebuggerConnection _createCommand:]): New method. Creates a new packet to send to the server with the session information tacked on
* Source/DebuggerWindowController.m|h:
([DebuggerWindowController run:]): New method to forward UI command to the DebuggerConnection

16 years agoMoving some of the internal methods that were mistakenly put into SocketWrapperDelega...
Robert Sesek [Fri, 3 Aug 2007 07:31:45 +0000 (00:31 -0700)]
Moving some of the internal methods that were mistakenly put into SocketWrapperDelegate into SocketWrapper

* Source/SocketWrapper.h

16 years agoMaking the status text portray the actual status of the debug session
Robert Sesek [Fri, 3 Aug 2007 07:22:09 +0000 (00:22 -0700)]
Making the status text portray the actual status of the debug session

* Source/DebuggerConnection.m:
([DebuggerConnection updateStatus:]): The status XML document is now parsed and the status is set properly

16 years agoAny time we post a NsockError notifiation, we should also return out of the method...
Robert Sesek [Fri, 3 Aug 2007 07:08:17 +0000 (00:08 -0700)]
Any time we post a NsockError notifiation, we should also return out of the method so the execution actually stops (what a novel idea!)

* Source/SocketWrapper.m

16 years agoAdding support for error viewing on the Debugger window and statuses.
Robert Sesek [Fri, 3 Aug 2007 07:06:40 +0000 (00:06 -0700)]
Adding support for error viewing on the Debugger window and statuses.

* English.lproj/Debugger.nib:
- Making the error text be hidden by default.
- Hooking up outlets into DebuggerWindow
* Source/DebuggerWindowController.m|h: Adding _status and _error outlets and setters for them
([DebuggerWindowController setStatus:]): New method
([DebuggerWindowController setError:]): New method
* Source/DebuggerController.m:
([DebuggerController initWithPort:]): Set the inital status to be "Connecting"
([DebuggerController updateStatus:]): New method
([DebuggerController handshake:]): Send a status command to the server and then receive the results using updateStatus:
([DebuggerController errorEncountered:]): Calls [_windowController setError:] using the error message from the NSError

16 years agoAdding a selector argument to receive: so that the delegate method can forward the...
Robert Sesek [Fri, 3 Aug 2007 06:33:38 +0000 (23:33 -0700)]
Adding a selector argument to receive: so that the delegate method can forward the response to that method.

* Source/DebuggerConnection.m:
([DebuggerConnection dataReceived:deliverTo:]): Add a handling for when we have a delivery to make to a specified selector
([DebuggerConnection socketDidAccept]): Tell the initial packet to go to handshake:
([DebuggerConnection handshake:]): New method
* Source/SocketWrapper.h: Update declarations for receive: dataReceived:deliverTo: and added _postNotification:withObject:withDict:
* Source/SocketWrapper.m:
([SocketWrapper _sendMessageToDelegate:]): Added support for NsockDataReceived for the deliverTo: paramater
([SocketWrapper receive:]): Now takes an optional selector to deliver data to when it's finally received
([SocketWrapper _postNotification:withObject:withDict:]): New method
([SocketWrapper _postNotification:withObject:]): Now calls _postNotification:withObject:withDict:

16 years agoImplementing the new delegate system throughout SocketWrapper.
Robert Sesek [Fri, 3 Aug 2007 06:09:03 +0000 (23:09 -0700)]
Implementing the new delegate system throughout SocketWrapper.

* Source/DebuggerConnection.m:
([DebuggerConnection socketDidAccept]): Call receive: to get the handshake packet
([DebuggerConnection errorEncountered:]): New method
* Source/SocketWrapper.m: Adding a new handler for the dataReceived, dataSent, errorEncoutered. Added error messages that can be posted to the observers.

16 years agoFinally settled on a delegate/notification system combination that works, and is...
Robert Sesek [Fri, 3 Aug 2007 05:49:50 +0000 (22:49 -0700)]
Finally settled on a delegate/notification system combination that works, and is rather clever if I do say so myself.

* Source/DebuggerConnection.m:
([DebuggerConnection socketDidAccept]): Changing from a notification receiver to a delegate method
* Source/SocketWrapper.h: Making the notification constants not be public
* Source/SocketWrapper.m:
([SocketWrapper initWithPort:]): Register the instance of SocketWrapper as a global notification observer
([SocketWrapper setDelegate:]): Removed all occurrences of notification observing
([SocketWrapper _sendMessageToDelegate:]): New function. Receives all notifications and passes up the ones that the object sent (ableit from another thread) to the delegate
([SocketWrapper connect]): Change the type of notification we post
([SocketWrapper _postNotification:withObject:]): Change the key for where we store the delegate in userInfo

16 years agoThreads can't communicate with each other and call methods on each other's objects...
Robert Sesek [Fri, 3 Aug 2007 05:30:49 +0000 (22:30 -0700)]
Threads can't communicate with each other and call methods on each other's objects, so we do have to use notifications.

* Source/SocketWrapper.h: Defining some of the notification constants
* Source/SocketWrapper.m:
([SocketWrapper _connect:]): Use the new notification system
([SocketWrapper _postNotification:withObject:]): Helper method for posting notifications
([SocketWrapper setDelegate:]): Register the delegate for these new notifications
* Source/DebuggerConnection.m:
([DebuggerConnection socketDidAccept:]): Made notification compatible

16 years agoStarting to thread-ify SocketWrapper class.
Robert Sesek [Fri, 3 Aug 2007 04:57:16 +0000 (21:57 -0700)]
Starting to thread-ify SocketWrapper class.

* Source/SocketWrapper.h: Defined connect: and _port, and internal method block
* Source/SocketWraper.m:
([SocketWrapper connect]): New method. Dispatches thread to _connect
([SocketWrapper _connect:]): Threaded method that does the actual connecting to the socket
([SocketWrapper initWithPort:]): Removing connection stuff and placing it in an explicit commit method
([SocketWrapper _postNotification:withObject:]): New helper method.
* Source/DebuggerConnection.m:
([DebuggerConnection socketAccepted]): New method
([DebuggerConnection initWithPort:]): Call [socket connect] and don't release it in the method any more

16 years agoForgot to rename socket in DebuggerConnection.h
Robert Sesek [Fri, 3 Aug 2007 04:11:01 +0000 (21:11 -0700)]
Forgot to rename socket in DebuggerConnection.h

* Source/DebuggerConnection.h: Renaming socket to _socket

16 years agoCleaning up and removing remnance of the notification system.
Robert Sesek [Fri, 3 Aug 2007 04:10:11 +0000 (21:10 -0700)]
Cleaning up and removing remnance of the notification system.

* Source/DebuggerConnection.h: Removing dead _data and prefixing socket with an _
* Source/DebuggerConnection.m: Prefixing use of socket with underscore, removing notification registration, documenting delegate methods
* Source/SocketWrapper.m|h: Removing the definitions for the notification types as we no longer use them

16 years agoImproving the efficiency of [SocketWrapper receive]
Robert Sesek [Fri, 3 Aug 2007 03:59:12 +0000 (20:59 -0700)]
Improving the efficiency of [SocketWrapper receive]

* Source/SocketWrapper.m:
([SocketWrapper receive]): Cutting down the size of packetLength[], use memmove() instead of strcpy() for moving part of buffer[] to packet[], and autorelease the string we send to the delegate. Also, no longer rely on sizeof() in checking for partial packets because we now have i.

16 years agoDelegate methods work far better than notifications, though I'm not sure how threads...
Robert Sesek [Fri, 3 Aug 2007 03:49:09 +0000 (20:49 -0700)]
Delegate methods work far better than notifications, though I'm not sure how threads fit into the mix.

* Source/SocketWrapper.h: Updating the SocketWrapperDelegate informal protocol to use actual arguments instead of NSNotification
* Source/SocketWrapper.m:
(many): Change from using [NSNotificatinoCenter postNotification:] to just calling delegate methods
([SocketWrapper receive]): NSData can't take a pointer to an array, so we copy the buffer into another variable packet[] and send that to NSData

16 years agoUsing NSNotification to pass messages around upon events... this doesn't work too...
Robert Sesek [Fri, 3 Aug 2007 03:32:44 +0000 (20:32 -0700)]
Using NSNotification to pass messages around upon events... this doesn't work too well for some reason, however.

* Source/DebuggerConnection.m: Set ourselves as the delegate and implement some delegate methods
* Source/SocketWrapper.h:
- Define some NSNotification names
- Set up the delegate
- Define SocketWrapperDelegate informal protocol
* Source/SocketWrapper.m:
(many): Post notifications for basically every method
([SocketWrapper setDelegate:]): Added and registers tons of notifications with it
([SocketWrapper receive]): Working on making the way we get to the null byte less hack-ish