From a57f63ab77b7c694dddb074df97f16d2b5f2f0b8 Mon Sep 17 00:00:00 2001 From: Robert Sesek Date: Sun, 11 Oct 2015 20:05:58 -0400 Subject: [PATCH] Introduce DebuggerModel, which will be updated by the BackEnd. This changes the debugger status message to be updated by the new Model class. The XIB file is also re-saved as a Xcode 7 file. --- English.lproj/Debugger.xib | 3284 ++++++----------------------- MacGDBp.xcodeproj/project.pbxproj | 6 + Source/DebuggerBackEnd.h | 4 + Source/DebuggerBackEnd.m | 4 + Source/DebuggerController.h | 3 + Source/DebuggerController.m | 7 +- Source/DebuggerModel.h | 29 + Source/DebuggerModel.m | 25 + 8 files changed, 686 insertions(+), 2676 deletions(-) create mode 100644 Source/DebuggerModel.h create mode 100644 Source/DebuggerModel.m diff --git a/English.lproj/Debugger.xib b/English.lproj/Debugger.xib index d7d018e..0d210fb 100644 --- a/English.lproj/Debugger.xib +++ b/English.lproj/Debugger.xib @@ -1,2675 +1,609 @@ - - - - 1050 - - 8191 - 1404.11 - 806.00 - - com.apple.InterfaceBuilder.CocoaPlugin - 8191 - - - NSArrayController - NSButton - NSButtonCell - NSCustomObject - NSCustomView - NSOutlineView - NSScrollView - NSScroller - NSSplitView - NSTableColumn - NSTableHeaderView - NSTableView - NSTextField - NSTextFieldCell - NSTextView - NSToolbar - NSToolbarFlexibleSpaceItem - NSToolbarItem - NSToolbarSeparatorItem - NSToolbarSpaceItem - NSTreeController - NSUserDefaultsController - NSView - NSWindowTemplate - - - com.apple.InterfaceBuilder.CocoaPlugin - - - PluginDependencyRecalculationVersion - - - - - DebuggerController - - - FirstResponder - - - NSApplication - - - 15 - 2 - {{363, 277}, {769, 501}} - 1886912512 - GDBp <host>:<port> @ <session> - NSWindow - - - 2E704228-00D1-43C3-B458-9839CEF5A7D0 - - - YES - YES - YES - YES - 2 - 1 - - - - 05157554-5CF3-45B4-9306-239A1F7E8130 - - Evaluate Script - Evaluate Script - - - - NSImage - Eval - - - - {0, 0} - {0, 0} - YES - YES - -1 - YES - 0 - - - - 0DD9463E-4676-43E6-B885-7A9CB1137956 - - Attached - - - - - 268 - {{0, 14}, {83, 18}} - YES - - -2080374784 - 0 - Attached - - YES - 13 - 1044 - - - 1211912448 - 2 - - NSImage - NSSwitch - - - NSSwitch - - - - 200 - 25 - - NO - - - 12779520 - - - - - - regular - normal - - checkbox - - {18, 18} - 0 - YES - NSCalibratedRGBColorSpace - - - - - 3 - MCAwAA - - - - - {63, 18} - {107, 18} - YES - YES - 0 - YES - 0 - - - - 16B58F9D-A05F-41F5-BD7C-37FD7619A84A - - Stop - Stop - - - - NSImage - Stop - - - - {0, 0} - {0, 0} - YES - YES - -1 - YES - 0 - - - - 4F493FF4-D55D-4881-B16D-54ED9DC66FF7 - - Step Out - Step Out - - - - NSImage - StepOut - - - - {0, 0} - {0, 0} - YES - YES - -1 - YES - 0 - - - - 87BEA2D0-EF8E-4DF2-9827-B2AC06858DC6 - - Variable Inspector - Variable Inspector - - - - NSImage - HUDIcon - - - - {0, 0} - {0, 0} - YES - YES - -1 - YES - 0 - - - - 91C3B0BD-0D34-4A26-A0EA-CC2A093F5916 - - Step In - Step In - - - - NSImage - StepIn - - - - {0, 0} - {0, 0} - YES - YES - -1 - YES - 0 - - - - 9FD4795A-41D6-49D4-94CE-99E9DF733A09 - - Run - Run - - - - NSImage - Run - - - - {0, 0} - {0, 0} - YES - YES - -1 - YES - 0 - - - - E0B2A793-522F-487A-AF2E-BE7FDFF26543 - - Step Over - Step Over - - - - NSImage - StepOver - - - - {0, 0} - {0, 0} - YES - YES - -1 - YES - 0 - - - NSToolbarCustomizeToolbarItem - Customize - Customize - Customize Toolbar - - - NSImage - NSToolbarCustomize - - - runToolbarCustomizationPalette: - {0, 0} - {0, 0} - YES - YES - -1 - YES - 0 - - - NSToolbarFlexibleSpaceItem - - Flexible Space - - - - - - {1, 5} - {20000, 32} - YES - YES - -1 - YES - 0 - - YES - YES - - - 1048576 - 2147483647 - - NSImage - NSMenuCheckmark - - - NSImage - NSMenuMixedState - - - - - NSToolbarSeparatorItem - - Separator - - - - - - {12, 5} - {12, 1000} - YES - YES - -1 - YES - 0 - - YES - YES - - - 1048576 - 2147483647 - - - - - - NSToolbarSpaceItem - - Space - - - - - - {32, 5} - {32, 10000} - YES - YES - -1 - YES - 0 - - YES - YES - - - 1048576 - 2147483647 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - {213, 107} - - - 256 - - - - -2147483359 - {{447, 3}, {632, 14}} - - YES - - 67108864 - 272629760 - <error> - - YES - 11 - 3100 - - - - 6 - System - controlColor - - 3 - MC42NjY2NjY2NjY3AA - - - - 1 - MSAwIDAAA - - - NO - 2 - - - - 292 - {{3, 0}, {196, 17}} - - YES - - 67108864 - 272629760 - <status> - - - - - 6 - System - controlTextColor - - 3 - MAA - - - - NO - 2 - - - - 274 - - - - 274 - - - - 274 - - - - 2304 - - - - 4352 - {377, 205} - - YES - NO - YES - - - 256 - {377, 23} - - - - - - -2147483392 - {{-26, 0}, {16, 17}} - - - - - 110 - 16 - 1000 - - 75497536 - 2048 - Variable - - - 3 - MC4zMzMzMzI5OQA - - - 6 - System - headerTextColor - - - - - 337641536 - 2048 - Text Cell - - - - 6 - System - controlBackgroundColor - - - - - 3 - YES - - - - 138 - 8 - 1000 - - 75497536 - 2048 - Value - - - - - - 337641472 - 512 - Text Cell - - - - - - 3 - YES - - - - 119.7544 - 29.754390000000001 - 1000 - - 75497536 - 2048 - Type - - - 6 - System - headerColor - - 3 - MQA - - - - - - 337641536 - 2048 - Text Cell - - - - - - 3 - YES - - - - 3 - 2 - - - 6 - System - gridColor - - 3 - MC41AA - - - 14 - 1379958784 - - - 1 - 15 - 0 - YES - 0 - 1 - - - {{1, 17}, {377, 205}} - - - - - 4 - YES - - - - -2147483392 - {{84, 17}, {15, 67}} - - NO - _doScroller: - - - _doScroller: - 0.81707320000000005 - - - - -2147483392 - {{1, 207}, {377, 15}} - - NO - _doScroller: - - 1 - - _doScroller: - 0.0053050397877984082 - 0.34494770000000002 - - - - 2304 - - - - {{1, 0}, {377, 17}} - - - - YES - - - - {379, 223} - - - 133682 - - - - - QSAAAEEgAABBgAAAQYAAAA - 0.25 - 4 - 1 - - - - 289 - - - - 2304 - - - - 4370 - {382, 205} - - YES - NO - YES - - - 256 - {382, 23} - - - - - - -2147483392 - {{-26, 0}, {16, 17}} - - - - - index - 10 - 10 - 30 - - 75497536 - 2048 - # - - - 3 - MC4zMzMzMzI5OQA - - - - - 337641536 - 2048 - Text Cell - - - - - - 3 - YES - - - index - YES - compare: - - - - filename - 112 - 8 - 1000 - - 75497536 - 2048 - File - - - - - - 337641536 - 1536 - Text Cell - - - - - - 3 - YES - - - filename - YES - compare: - - - - lineNumber - 33 - 26 - 1000 - - 75497536 - 2048 - Line - - - - - - 337641536 - 2048 - Text Cell - - - - - - 3 - YES - - - lineNumber - YES - compare: - - - - function - 215 - 50.0625 - 1000 - - 75497536 - 2048 - Function - - - - - - 337641536 - 2048 - Text Cell - - - - - - 3 - YES - - - function - YES - compare: - - - - 3 - 2 - - - 17 - 1388347392 - - - 1 - 15 - 0 - YES - 0 - 1 - - - {{1, 17}, {382, 205}} - - - - - 4 - YES - - - - -2147483392 - {{368, 17}, {15, 190}} - - NO - _doScroller: - - - _doScroller: - 0.92682929999999997 - - - - -2147483392 - {{1, 207}, {382, 15}} - - NO - _doScroller: - - 1 - - _doScroller: - 0.99738899999999997 - - - - 2304 - - - - {{1, 0}, {382, 17}} - - - - YES - - - - {{388, 0}, {384, 223}} - - - 133682 - - - - - QSAAAEEgAABBmAAAQZgAAA - 0.25 - 4 - 1 - - - {772, 223} - - YES - - - - 268 - {{0, 232}, {772, 251}} - - BSSourceView - - - {{-1, 19}, {772, 483}} - - - - {769, 501} - - {{0, 0}, {1440, 878}} - {213, 169} - {10000000000000, 10000000000000} - DebuggerWindow - YES - - - - filename - index - lineNumber - function - contexts.Locals - variables - - StackFrame - YES - YES - - YES - YES - YES - YES - YES - YES - - - - value - name - fullName - displayType - - VariableNode - - YES - YES - YES - dynamicChildren - isLeaf - - - 8223 - 2 - {{984, 432}, {400, 400}} - -1543503872 - Inspector - NSPanel - - - - - 256 - - - - 274 - - - - 2304 - - - - 2322 - {402, 402} - - - - - - Lorem ipsum dolor sit er elit lamet, consectetaur cillium adipisicing pecu, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum Et harumd und lookum like Greek to me, dereud facilis est er expedit distinct. Nam liber te conscient to factor tum poen legum odioque civiuda - - - - 1 - MSAxIDEAA - - - Monaco - 10 - 16 - - - 3 - - - 0.0 - - - 56 - - - 112 - - - 168 - - - 224 - - - 280 - - - 336 - - - 392 - - - 448 - - - 504 - - - 560 - - - 616 - - - 672 - - - 728 - - - 784 - - - 840 - - - 896 - - - 952 - - - 1008 - - - 1064 - - - 1120 - - - 1176 - - - 1232 - - - 1288 - - - 1344 - - - 1400 - - - 1456 - - - 1512 - - - 1568 - - - 1624 - - - 1680 - - - 1736 - - - - - - - - - - 38 - - - - 402 - 1 - - - 50473569 - 0 - - - - - 6 - System - selectedTextBackgroundColor - - - - 6 - System - selectedTextColor - - - - - - - 1 - MCAwIDEAA - - - - - - 1 - - 70 - {804, 10000000} - - - - {402, 402} - - - - - - {4, 5} - - 79691776 - - - - - - file:///Applications/Xcode.app/Contents/SharedFrameworks/DVTKit.framework/Resources/DVTIbeamCursor.tiff - - - - - - - 2 - YES - - - - -2147483392 - {{317, 1}, {15, 408}} - - NO - _doScroller: - - - _doScroller: - 0.23333329999999999 - 0.89949749999999995 - - - - -2147483392 - {{-100, -100}, {87, 18}} - - NO - _doScroller: - - 1 - - _doScroller: - 0.86706950000000005 - 0.94565220000000005 - - - {{-1, -1}, {402, 402}} - - - 133680 - - - - 0.25 - 4 - 1 - - - {400, 400} - - {{0, 0}, {1440, 878}} - {10000000000000, 10000000000000} - InspectorWindow - YES - - - YES - - - - - - - window - - - - 26 - - - - errormsg - - - - 244 - - - - statusmsg - - - - 446 - - - - stepIn: - - - - 484 - - - - stepOut: - - - - 485 - - - - stepOver: - - - - 486 - - - - run: - - - - 487 - - - - sourceViewer - - - - 503 - - - - stackArrayController - - - - 563 - - - - variablesTreeController - - - - 566 - - - - variablesOutlineView - - - - 567 - - - - inspector - - - - 581 - - - - attachedToggled: - - - - 594 - - - - attachedCheckbox_ - - - - 595 - - - - stop: - - - - 598 - - - - showEvalWindow: - - - - 602 - - - - showInspectorWindow: - - - - 587 - - - - delegate - - - - 92 - - - - delegate - - - - 84 - - - - value: arrangedObjects.value - - - - - - value: arrangedObjects.value - value - arrangedObjects.value - - - StripLineBreaksValueTransformer - - 2 - - - 603 - - - - value: arrangedObjects.name - - - - - - value: arrangedObjects.name - value - arrangedObjects.name - - NSConditionallySetsEditable - - - 2 - - - 588 - - - - delegate - - - - 53 - - - - value: arrangedObjects.index - - - - - - value: arrangedObjects.index - value - arrangedObjects.index - - NSConditionallySetsEditable - - - 2 - - - 558 - - - - value: arrangedObjects.filename - - - - - - value: arrangedObjects.filename - value - arrangedObjects.filename - 2 - - - 44 - - - - value: connection.status - - - - - - value: connection.status - value - connection.status - 2 - - - 564 - - - - contentArray: stackController.stack - - - - - - contentArray: stackController.stack - contentArray - stackController.stack - 2 - - - 557 - - - - value: arrangedObjects.lineNumber - - - - - - value: arrangedObjects.lineNumber - value - arrangedObjects.lineNumber - - NSConditionallySetsEditable - - - 2 - - - 559 - - - - value: arrangedObjects.function - - - - - - value: arrangedObjects.function - value - arrangedObjects.function - - NSConditionallySetsEditable - - - 2 - - - 560 - - - - contentArray: selection.variables - - - - - - contentArray: selection.variables - contentArray - selection.variables - 2 - - - 568 - - - - value: arrangedObjects.displayType - - - - - - value: arrangedObjects.displayType - value - arrangedObjects.displayType - - NSConditionallySetsEditable - - - 2 - - - 590 - - - - visible: values.InspectorWindowVisible - - - - - - visible: values.InspectorWindowVisible - visible - values.InspectorWindowVisible - 2 - - - 583 - - - - title: selection.fullName - - - - - - title: selection.fullName - title - selection.fullName - 2 - - - 589 - - - - value: selection.value - - - - - - value: selection.value - value - selection.value - 2 - - - 580 - - - - value: connection.autoAttach - - - - - - value: connection.autoAttach - value - connection.autoAttach - 2 - - - 599 - - - - value: values.DebuggerAttached - - - - - - value: values.DebuggerAttached - value - values.DebuggerAttached - 2 - - - 596 - - - - - - 0 - - - - - - -2 - - - File's Owner - - - -1 - - - First Responder - - - -3 - - - Application - - - 7 - - - - - - - Debugger - - - 8 - - - - - - - - - - 22 - - - - - - - - 27 - - - - - - - - 36 - - - StackController - - - 59 - - - VariablesController - - - 453 - - - - - 455 - - - - - 471 - - - - - - - - - - - - - - - - - - - 474 - - - - - 476 - - - - - 477 - - - - - 478 - - - - - 479 - - - - - 482 - - - - - 483 - - - - - 502 - - - - - - - - - 46 - - - - - - - - - 15 - - - - - - - - - - - 11 - - - - - - - - - - - 467 - - - - - 466 - - - - - 465 - - - - - 12 - - - - - - - - - - 81 - - - - - - - - 14 - - - - - - - - 13 - - - - - - - - 456 - - - - - 457 - - - - - 458 - - - - - 495 - - - - - 469 - - - - - 468 - - - - - 16 - - - - - - - - - - - 48 - - - - - - - - 42 - - - - - - - - 18 - - - - - - - - 17 - - - - - - - - 459 - - - - - 460 - - - - - 461 - - - - - 462 - - - - - 496 - - - - - 569 - - - - - - Inspector - - - 570 - - - - - - - - 575 - - - - - - - - - - 576 - - - - - 577 - - - - - 578 - - - - - 582 - - - - - 584 - - - - - 593 - - - - - - - - 591 - - - - - - - - 592 - - - - - 480 - - - - - 597 - - - - - 600 - - - - - - - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - BSSplitView - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - BSSplitView - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - {{478, 327}, {400, 400}} - - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - {{366, 315}, {769, 501}} - - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - - - - - - 603 - - - - - BSSourceView - NSView - - IBProjectSource - ../Source/BSSourceView.h - - - - BSSplitView - NSSplitView - - IBProjectSource - ../Source/BSSplitView.h - - - - DebuggerController - NSWindowController - - id - id - id - id - id - id - id - id - - - - attachedToggled: - id - - - run: - id - - - showEvalWindow: - id - - - showInspectorWindow: - id - - - stepIn: - id - - - stepOut: - id - - - stepOver: - id - - - stop: - id - - - - NSButton - NSTextField - NSWindow - BSSourceView - NSArrayController - NSTextField - NSOutlineView - NSTreeController - - - - attachedCheckbox_ - NSButton - - - errormsg - NSTextField - - - inspector - NSWindow - - - sourceViewer - BSSourceView - - - stackArrayController - NSArrayController - - - statusmsg - NSTextField - - - variablesOutlineView - NSOutlineView - - - variablesTreeController - NSTreeController - - - - IBProjectSource - ../Source/DebuggerController.h - - - - DebuggerController - - id - id - id - id - id - id - id - id - - - - attachedToggled: - id - - - run: - id - - - showEvalWindow: - id - - - showInspectorWindow: - id - - - stepIn: - id - - - stepOut: - id - - - stepOver: - id - - - stop: - id - - - - IBProjectSource - ../Source/DebuggerController.m - - - - - - NSActionCell - NSCell - - IBFrameworkSource - AppKit.framework/Headers/NSActionCell.h - - - - NSApplication - NSResponder - - IBFrameworkSource - AppKit.framework/Headers/NSApplication.h - - - - NSArrayController - NSObjectController - - IBFrameworkSource - AppKit.framework/Headers/NSArrayController.h - - - - NSButton - NSControl - - IBFrameworkSource - AppKit.framework/Headers/NSButton.h - - - - NSButtonCell - NSActionCell - - IBFrameworkSource - AppKit.framework/Headers/NSButtonCell.h - - - - NSCell - NSObject - - IBFrameworkSource - AppKit.framework/Headers/NSCell.h - - - - NSControl - NSView - - IBFrameworkSource - AppKit.framework/Headers/NSControl.h - - - - NSController - NSObject - - IBFrameworkSource - AppKit.framework/Headers/NSController.h - - - - NSFormatter - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSFormatter.h - - - - NSManagedObjectContext - NSObject - - IBFrameworkSource - CoreData.framework/Headers/NSManagedObjectContext.h - - - - NSMenu - NSObject - - IBFrameworkSource - AppKit.framework/Headers/NSMenu.h - - - - NSObjectController - NSController - - IBFrameworkSource - AppKit.framework/Headers/NSObjectController.h - - - - NSOutlineView - NSTableView - - IBFrameworkSource - AppKit.framework/Headers/NSOutlineView.h - - - - NSPanel - NSWindow - - IBFrameworkSource - AppKit.framework/Headers/NSPanel.h - - - - NSResponder - NSObject - - IBFrameworkSource - AppKit.framework/Headers/NSResponder.h - - - - NSScrollView - NSView - - IBFrameworkSource - AppKit.framework/Headers/NSScrollView.h - - - - NSScroller - NSControl - - IBFrameworkSource - AppKit.framework/Headers/NSScroller.h - - - - NSSplitView - NSView - - IBFrameworkSource - AppKit.framework/Headers/NSSplitView.h - - - - NSTableColumn - NSObject - - IBFrameworkSource - AppKit.framework/Headers/NSTableColumn.h - - - - NSTableHeaderView - NSView - - IBFrameworkSource - AppKit.framework/Headers/NSTableHeaderView.h - - - - NSTableView - NSControl - - IBFrameworkSource - AppKit.framework/Headers/NSTableView.h - - - - NSText - NSView - - IBFrameworkSource - AppKit.framework/Headers/NSText.h - - - - NSTextField - NSControl - - IBFrameworkSource - AppKit.framework/Headers/NSTextField.h - - - - NSTextFieldCell - NSActionCell - - IBFrameworkSource - AppKit.framework/Headers/NSTextFieldCell.h - - - - NSTextView - NSText - - IBFrameworkSource - AppKit.framework/Headers/NSTextView.h - - - - NSToolbar - NSObject - - IBFrameworkSource - AppKit.framework/Headers/NSToolbar.h - - - - NSToolbarItem - NSObject - - IBFrameworkSource - AppKit.framework/Headers/NSToolbarItem.h - - - - NSTreeController - NSObjectController - - IBFrameworkSource - AppKit.framework/Headers/NSTreeController.h - - - - NSUserDefaultsController - NSController - - IBFrameworkSource - AppKit.framework/Headers/NSUserDefaultsController.h - - - - NSView - NSResponder - - IBFrameworkSource - AppKit.framework/Headers/NSView.h - - - - NSWindow - NSResponder - - IBFrameworkSource - AppKit.framework/Headers/NSWindow.h - - - - NSWindowController - NSResponder - - showWindow: - id - - - showWindow: - - showWindow: - id - - - - IBFrameworkSource - AppKit.framework/Headers/NSWindowController.h - - - - - 0 - IBCocoaFramework - - com.apple.InterfaceBuilder.CocoaPlugin.macosx - - - - com.apple.InterfaceBuilder.CocoaPlugin.InterfaceBuilder3 - - - YES - 3 - - {256, 256} - {32, 32} - {12, 12} - {10, 2} - {15, 15} - {32, 32} - {256, 256} - {256, 256} - {256, 256} - {256, 256} - {256, 256} - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + StripLineBreaksValueTransformer + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + filename + index + lineNumber + function + contexts.Locals + variables + + + + + + + + value + name + fullName + displayType + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Lorem ipsum dolor sit er elit lamet, consectetaur cillium adipisicing pecu, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum Et harumd und lookum like Greek to me, dereud facilis est er expedit distinct. Nam liber te conscient to factor tum poen legum odioque civiuda + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +YnBsaXN0MDDUAQIDBAUGW1xYJHZlcnNpb25YJG9iamVjdHNZJGFyY2hpdmVyVCR0b3ASAAGGoK8QFwcI +ERYbHCc0NTY3ODk6O0JDRElMT1VYVSRudWxs1AkKCwwNDg8QViRjbGFzc1xOU0ltYWdlRmxhZ3NWTlNS +ZXBzV05TQ29sb3KAFhIAwwAAgAKAFNISCRMVWk5TLm9iamVjdHOhFIADgBPSEgkXGqIYGYAEgAWAEhAA +1h0eHwkgISIbIyQlJlZOU1NpemVfEA9OU0JpdHNQZXJTYW1wbGVfEBBOU0NvbG9yU3BhY2VOYW1lWk5T +SGFzQWxwaGFfEBROU0NvcmVVSUltYWdlT3B0aW9uc4APgBCAEQmABtMoEgkpLjNXTlMua2V5c6QqKywt +gAeACIAJgAqkLxgxMoALgASADIANgA5Uc2l6ZVV2YWx1ZVVzdGF0ZVZ3aWRnZXRXcmVndWxhclZub3Jt +YWxYY2hlY2tib3jSPD0+P1okY2xhc3NuYW1lWCRjbGFzc2VzXxATTlNNdXRhYmxlRGljdGlvbmFyeaM+ +QEFcTlNEaWN0aW9uYXJ5WE5TT2JqZWN0WHsxOCwgMTh9XxAZTlNDYWxpYnJhdGVkUkdCQ29sb3JTcGFj +ZdI8PUVGXxAQTlNDb3JlVUlJbWFnZVJlcKNHSEFfEBBOU0NvcmVVSUltYWdlUmVwWk5TSW1hZ2VSZXDS +PD1KS1dOU0FycmF5okpB0jw9TU5eTlNNdXRhYmxlQXJyYXmjTUpB01BRCVJTVFdOU1doaXRlXE5TQ29s +b3JTcGFjZUQwIDAAEAOAFdI8PVZXV05TQ29sb3KiVkHSPD1ZWldOU0ltYWdlollBXxAPTlNLZXllZEFy +Y2hpdmVy0V1eVHJvb3SAAQAIABEAGgAjAC0AMgA3AFEAVwBgAGcAdAB7AIMAhQCKAIwAjgCTAJ4AoACi +AKQAqQCsAK4AsACyALQAwQDIANoA7QD4AQ8BEQETARUBFgEYAR8BJwEsAS4BMAEyATQBOQE7AT0BPwFB +AUMBSAFOAVQBWwFjAWoBcwF4AYMBjAGiAaYBswG8AcUB4QHmAfkB/QIQAhsCIAIoAisCMAI/AkMCSgJS +Al8CZAJmAmgCbQJ1AngCfQKFAogCmgKdAqIAAAAAAAACAQAAAAAAAABfAAAAAAAAAAAAAAAAAAACpA + + + + + + + + + + + diff --git a/MacGDBp.xcodeproj/project.pbxproj b/MacGDBp.xcodeproj/project.pbxproj index 4037035..9902dd0 100644 --- a/MacGDBp.xcodeproj/project.pbxproj +++ b/MacGDBp.xcodeproj/project.pbxproj @@ -47,6 +47,7 @@ 1EEBFC370D358F1B008F835B /* StepOut.png in Resources */ = {isa = PBXBuildFile; fileRef = 1EEBFC360D358F1B008F835B /* StepOut.png */; }; 1EEBFD090D3599E8008F835B /* BSSplitView.m in Sources */ = {isa = PBXBuildFile; fileRef = 1EEBFD070D3599E8008F835B /* BSSplitView.m */; }; 1EEBFD120D359A9F008F835B /* dimple.png in Resources */ = {isa = PBXBuildFile; fileRef = 1EEBFD110D359A9F008F835B /* dimple.png */; }; + 1EECC0BA1BC9B1E800FB22D3 /* DebuggerModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 1EECC0B91BC9B1E700FB22D3 /* DebuggerModel.m */; settings = {ASSET_TAGS = (); }; }; 1EEE875D0D9DE4B4009CBA7C /* MacGDBp.icns in Resources */ = {isa = PBXBuildFile; fileRef = 1EEE875C0D9DE4B4009CBA7C /* MacGDBp.icns */; }; 1EFF70C30DFDC018006B9D33 /* BreakpointController.m in Sources */ = {isa = PBXBuildFile; fileRef = 1EFF70C20DFDC018006B9D33 /* BreakpointController.m */; }; 8D11072B0486CEB800E47090 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 089C165CFE840E0CC02AAC07 /* InfoPlist.strings */; }; @@ -133,6 +134,8 @@ 1EEBFD070D3599E8008F835B /* BSSplitView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = BSSplitView.m; path = Source/BSSplitView.m; sourceTree = ""; }; 1EEBFD080D3599E8008F835B /* BSSplitView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = BSSplitView.h; path = Source/BSSplitView.h; sourceTree = ""; }; 1EEBFD110D359A9F008F835B /* dimple.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = dimple.png; sourceTree = ""; }; + 1EECC0B81BC9B1E700FB22D3 /* DebuggerModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DebuggerModel.h; path = Source/DebuggerModel.h; sourceTree = ""; }; + 1EECC0B91BC9B1E700FB22D3 /* DebuggerModel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = DebuggerModel.m; path = Source/DebuggerModel.m; sourceTree = ""; }; 1EEE875C0D9DE4B4009CBA7C /* MacGDBp.icns */ = {isa = PBXFileReference; lastKnownFileType = image.icns; name = MacGDBp.icns; path = Icons/MacGDBp.icns; sourceTree = ""; }; 1EFF70C10DFDC018006B9D33 /* BreakpointController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = BreakpointController.h; path = Source/BreakpointController.h; sourceTree = ""; }; 1EFF70C20DFDC018006B9D33 /* BreakpointController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = BreakpointController.m; path = Source/BreakpointController.m; sourceTree = ""; }; @@ -281,6 +284,8 @@ 1EB7BEB90ECF3BC60033283A /* Debugger */ = { isa = PBXGroup; children = ( + 1EECC0B81BC9B1E700FB22D3 /* DebuggerModel.h */, + 1EECC0B91BC9B1E700FB22D3 /* DebuggerModel.m */, 1E02C5F40C610724006F1752 /* DebuggerController.h */, 1E02C5F50C610724006F1752 /* DebuggerController.m */, 1E108E3E136CC8B9002E34E0 /* EvalController.h */, @@ -478,6 +483,7 @@ 1EB7BED50ECF3CA90033283A /* StackFrame.m in Sources */, 1EBF4D5D0EE35F0700B62769 /* StackController.m in Sources */, 1E67E6FD0F3C052000E68F1B /* PreferencesPathsArrayController.m in Sources */, + 1EECC0BA1BC9B1E800FB22D3 /* DebuggerModel.m in Sources */, 1E6B5947116106FE001189D2 /* LoggingController.m in Sources */, 1EC1337E127DBB00007946FC /* VariableNode.m in Sources */, 1EC6965812BBC6A700A8D984 /* modp_b64.cc in Sources */, diff --git a/Source/DebuggerBackEnd.h b/Source/DebuggerBackEnd.h index b926968..b4f8eb1 100644 --- a/Source/DebuggerBackEnd.h +++ b/Source/DebuggerBackEnd.h @@ -21,6 +21,7 @@ #import "StackFrame.h" @protocol DebuggerBackEndDelegate; +@class DebuggerModel; @class VariableNode; // The DebuggerBackEnd is the communication layer between the application @@ -39,6 +40,9 @@ // backend. YES means all debugger connections will be dropped. @property(assign, nonatomic) BOOL autoAttach; +// The model object to update in response to changes in the debugger. +@property(assign, nonatomic) DebuggerModel* model; + @property(assign, nonatomic) id delegate; // initializer diff --git a/Source/DebuggerBackEnd.m b/Source/DebuggerBackEnd.m index 57dc7fb..17ffb76 100644 --- a/Source/DebuggerBackEnd.m +++ b/Source/DebuggerBackEnd.m @@ -17,6 +17,7 @@ #import "DebuggerBackEnd.h" #import "AppDelegate.h" +#import "DebuggerModel.h" #import "modp_b64.h" #import "NSXMLElementAdditions.h" @@ -35,6 +36,7 @@ @synthesize status = _status; @synthesize autoAttach = _autoAttach; +@synthesize model = _model; @synthesize delegate = _delegate; - (id)initWithPort:(NSUInteger)aPort @@ -247,6 +249,7 @@ - (void)debuggerEngineConnected:(ProtocolClient*)client { _active = YES; + [_model onNewConnection]; } /** @@ -317,6 +320,7 @@ [_client sendCommandWithFormat:@"stop"]; _active = NO; } + self.model.status = self.status; } /** diff --git a/Source/DebuggerController.h b/Source/DebuggerController.h index 7ea29a2..418d935 100644 --- a/Source/DebuggerController.h +++ b/Source/DebuggerController.h @@ -20,10 +20,13 @@ #include "VariableNode.h" @class BSSourceView; +@class DebuggerModel; @interface DebuggerController : NSWindowController { DebuggerBackEnd* connection; + + DebuggerModel* _model; // This is true when the |connection| has told us to clobber. We will do // so upon receipt of the first new stack frame. diff --git a/Source/DebuggerController.m b/Source/DebuggerController.m index 63ed8ce..3b3c41c 100644 --- a/Source/DebuggerController.m +++ b/Source/DebuggerController.m @@ -19,6 +19,7 @@ #import "AppDelegate.h" #import "BSSourceView.h" #import "BreakpointManager.h" +#import "DebuggerModel.h" #import "EvalController.h" #import "NSXMLElementAdditions.h" @@ -44,13 +45,16 @@ NSUserDefaults* defaults = [NSUserDefaults standardUserDefaults]; + _model = [[DebuggerModel alloc] init]; + connection = [[DebuggerBackEnd alloc] initWithPort:[defaults integerForKey:@"Port"]]; connection.delegate = self; + connection.model = _model; expandedVariables = [[NSMutableSet alloc] init]; [[self window] makeKeyAndOrderFront:nil]; [[self window] setDelegate:self]; - if ([[NSUserDefaults standardUserDefaults] boolForKey:@"InspectorWindowVisible"]) + if ([defaults boolForKey:@"InspectorWindowVisible"]) [inspector orderFront:self]; } return self; @@ -62,6 +66,7 @@ - (void)dealloc { [connection release]; + [_model release]; [expandedVariables release]; [stackController release]; [super dealloc]; diff --git a/Source/DebuggerModel.h b/Source/DebuggerModel.h new file mode 100644 index 0000000..fc01429 --- /dev/null +++ b/Source/DebuggerModel.h @@ -0,0 +1,29 @@ +/* + * MacGDBp + * Copyright (c) 2015, Blue Static + * + * This program is free software; you can redistribute it and/or modify it under the terms of the GNU + * General Public License as published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with this program; if not, + * write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#import + +@interface DebuggerModel : NSObject + +// A human-readable representation of the debugger state. E.g., "Break" or +// "Stopped". +@property(copy, nonatomic) NSString* status; + +// Informs the model that a new connection was initiated. This clears any data +// in the model. +- (void)onNewConnection; + +@end diff --git a/Source/DebuggerModel.m b/Source/DebuggerModel.m new file mode 100644 index 0000000..676b471 --- /dev/null +++ b/Source/DebuggerModel.m @@ -0,0 +1,25 @@ +/* + * MacGDBp + * Copyright (c) 2015, Blue Static + * + * This program is free software; you can redistribute it and/or modify it under the terms of the GNU + * General Public License as published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with this program; if not, + * write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#import "DebuggerModel.h" + +@implementation DebuggerModel + +- (void)onNewConnection { + self.status = nil; +} + +@end -- 2.43.5