macgdbp.git
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

16 years agoAdd .DS_Store to the ignore list
Robert Sesek [Fri, 3 Aug 2007 02:50:40 +0000 (19:50 -0700)]
Add .DS_Store to the ignore list

16 years ago* Source/SocketWrapper.m: Include <unistd.h> to remove some implicit function definit...
Robert Sesek [Thu, 2 Aug 2007 08:45:41 +0000 (01:45 -0700)]
* Source/SocketWrapper.m: Include <unistd.h> to remove some implicit function definition warnigns and implement send:
([SocketWrapper send:]): Implemented method

16 years ago* Source/SocketWrapper.m:
Robert Sesek [Thu, 2 Aug 2007 06:46:17 +0000 (23:46 -0700)]
* Source/SocketWrapper.m:
([SocketWrapper receive]): Updating the documentation because we no longer return partial data

16 years ago* Source/SocketWrapper.m:
Robert Sesek [Thu, 2 Aug 2007 06:45:16 +0000 (23:45 -0700)]
* Source/SocketWrapper.m:
([SocketWrapper receive]):
- Properly handle packets that are too large for the buffer
- Actually return an autorelease'd NSString instead of nil

16 years ago* MacGDBp.xcodeproj: Change the C mode to be C99
Robert Sesek [Thu, 2 Aug 2007 06:27:02 +0000 (23:27 -0700)]
* MacGDBp.xcodeproj: Change the C mode to be C99
* Source/DebuggerConnection.m:
([DebuggerConnection initWithPort:]): If the result of init'ing a SocketWrapper is nil, throw an "error"
* Source/SocketWrapper:
([SocketWrapper receive]): New method. Used to fetch a string from a socket
([SocketWrapper send:]): New method. Used to write to a socket

16 years agoRemoving all information about specifying a host because GDBp doesn't actually suppor...
Robert Sesek [Thu, 2 Aug 2007 04:51:09 +0000 (21:51 -0700)]
Removing all information about specifying a host because GDBp doesn't actually support anything but PHP->localhost.

* English.lproj/Connect.nib: Removing and unhooking the host text field
* Source/ConnectWindowController.h: Removing _host outlet
* Source/ConnectWindowController.m:
([ConnectWindowController connect:]): Remove the "Host" parameter from the DebuggerConnection init method
* Source/DebuggerConnection.h: Removing the _host ivar and removing the "host" parameter from the init method as well as the host getter method
* Source/DebuggerConnection.m:
([DebuggerConnection initWithHost:port:session:]): Renamed to [DebuggerConnection initWithPort:session:]
([DebuggerConnection dealloc]): Removed _host ivar and so it no longer needs to be release'd
([DebuggerConnection host]): Removed
* Source/DebuggerWindowController.m:
([DebuggerWindowController initWithConnection:]): No longer set the host in the window title

16 years agoChanging from using NSStream which didn't actually work correctly to using a custom...
Robert Sesek [Thu, 2 Aug 2007 04:43:47 +0000 (21:43 -0700)]
Changing from using NSStream which didn't actually work correctly to using a custom-rolled socket implementation

* Source/SocketWrapper.m/h: Adding to wrap around BSD sockets
* Source/DebuggerConnection.h: Removing _input and _output in favor of just socket
* Source/DebuggerConnection.m:
([DebuggerConnection initWithHost:port:session:]): Change from using NSStream and its variants to SocketWrapper
([DebuggerConnection stream:handleEvent:]): Removed

16 years agoSetting springs for Debugger.nib
Robert Sesek [Thu, 2 Aug 2007 03:07:35 +0000 (20:07 -0700)]
Setting springs for Debugger.nib

16 years agoSlight interface improvements for the table view and tree view
Robert Sesek [Thu, 2 Aug 2007 03:03:15 +0000 (20:03 -0700)]
Slight interface improvements for the table view and tree view

16 years agoUpdating the Info.plist and English.lproj/InfoPlist.strings files to have proper...
Robert Sesek [Thu, 2 Aug 2007 03:00:52 +0000 (20:00 -0700)]
Updating the Info.plist and English.lproj/InfoPlist.strings files to have proper copyright messages

16 years agoAdding a project build script that replaces the CFBundleVersion in the plist with...
Robert Sesek [Thu, 2 Aug 2007 01:01:25 +0000 (18:01 -0700)]
Adding a project build script that replaces the CFBundleVersion in the plist with a Git build string

16 years agoAdding a stream handler function that should be able to read from streams
Robert Sesek [Wed, 1 Aug 2007 21:01:16 +0000 (14:01 -0700)]
Adding a stream handler function that should be able to read from streams

16 years ago* Source/DebuggerConnection.h: Added _input and _output instance variables
Robert Sesek [Wed, 1 Aug 2007 20:20:47 +0000 (13:20 -0700)]
* Source/DebuggerConnection.h: Added _input and _output instance variables
* Source/DebuggerConnection.m:
([DebuggerConnection initWithHost: port: session:]): Set up the NSStream's and register ourselves with NSApplicationWillTerminateNotification
([DebuggerConnection applicationWillTerminate:]): New method to release the object on close
([DebuggerConnection dealloc]): Close and release the streams upon deallocation

16 years ago* Source/DebuggerConnection: Adding getters for _host, _port, and _session
Robert Sesek [Wed, 1 Aug 2007 19:52:33 +0000 (12:52 -0700)]
* Source/DebuggerConnection: Adding getters for _host, _port, and _session
([DebuggerConnection host]): New method
([DebuggerConnection port]): ditto
([DebuggerConnection session]): ditto
* Source/DebuggerWindowController.m:
([DebuggerWindowController initWithConnection:]): Set the window title when we load

16 years ago* English.lproj/Debugger.nib: Changing file's owner to be DebuggerWindowController...
Robert Sesek [Wed, 1 Aug 2007 19:50:47 +0000 (12:50 -0700)]
* English.lproj/Debugger.nib: Changing file's owner to be DebuggerWindowController and then setting the window outlet

16 years ago* Source/AppDelegate.m:
Robert Sesek [Wed, 1 Aug 2007 19:31:30 +0000 (12:31 -0700)]
* Source/AppDelegate.m:
([AppDelegate applicationDidFinishLaunching:]): Use [AppDelegate showConnectionWindow:] to open the window instead of callling the exact same code

16 years ago* Source/AppDelegate:
Robert Sesek [Wed, 1 Aug 2007 19:00:14 +0000 (12:00 -0700)]
* Source/AppDelegate:
([AppDelegate showConnectionWindow:]): Opens the connect window so another connection can be established
* English.lproj/MainMenu.nib:
- Replacing some more "New Application" junk that we no longer want
- Removing the "File" menu in place of a "Connection" menu with an "Open" command that opens the connection window

16 years ago* Source/ConnectWindowController.h: Adding outlets and actions for our interface
Robert Sesek [Wed, 1 Aug 2007 18:31:51 +0000 (11:31 -0700)]
* Source/ConnectWindowController.h: Adding outlets and actions for our interface
* Source/ConnectWindowController.m:
([ConnectWindowController connect:]): New function to create a new DebuggerConnection
* Source/DebuggerConnection.m/h: Added
* Source/DebuggerWindowController.m/h: Added
* English.lproj/Connect.nib: Hooking up new outlets and actions from ConnectWindowController

16 years ago* English.lproj/Connect.nib: Setting the File's Owner to be ConnectWindowController...
Robert Sesek [Wed, 1 Aug 2007 17:54:33 +0000 (10:54 -0700)]
* English.lproj/Connect.nib: Setting the File's Owner to be ConnectWindowController and the window outlet to be the window
* Source/AppDelegate.m:
([AppDelegate applicationDidFinishLaunching:]): New method to show the connect window after launch
* Source/ConnectWindowController.m/h: Adding the NSWindowController subclass for the connection window

16 years ago- Adding a .gitignore to hide the nib backup files
Robert Sesek [Wed, 1 Aug 2007 16:36:43 +0000 (09:36 -0700)]
- Adding a .gitignore to hide the nib backup files
- Moving the window tha was in MainMenu.nib to be in Debugger.nib
- Added AppDelegate.[mh] and set it as the [NSApplication delegate:] in MainMenu.nib

16 years agoAdding the Connect.nib file for the connection window
Robert Sesek [Wed, 1 Aug 2007 16:23:33 +0000 (09:23 -0700)]
Adding the Connect.nib file for the connection window

16 years agoXcode for some reason changed the project, so just checking in those changes
Robert Sesek [Wed, 1 Aug 2007 07:45:02 +0000 (00:45 -0700)]
Xcode for some reason changed the project, so just checking in those changes

16 years agoChanging the application identifier to be org.bluestatic.macgdbp
Robert Sesek [Wed, 1 Aug 2007 07:25:05 +0000 (00:25 -0700)]
Changing the application identifier to be org.bluestatic.macgdbp

16 years agoAdding the GPL header to the two existing source files
Robert Sesek [Wed, 1 Aug 2007 07:23:08 +0000 (00:23 -0700)]
Adding the GPL header to the two existing source files

16 years agoLaying out an unhooked basic interface for the system. There still needs to be a...
Robert Sesek [Wed, 1 Aug 2007 07:19:42 +0000 (00:19 -0700)]
Laying out an unhooked basic interface for the system. There still needs to be a way to connect to different sessions.

16 years agoAdding an empty Xcode project with no configruation changes at all
Robert Sesek [Wed, 1 Aug 2007 06:48:59 +0000 (23:48 -0700)]
Adding an empty Xcode project with no configruation changes at all