From 91a9029ed49fb1e801cfd19b91372de3eedf8277 Mon Sep 17 00:00:00 2001 From: Robert Sesek Date: Sun, 30 Nov 2008 21:57:23 -0500 Subject: [PATCH] Update the bindings for the stack viewer to use our new StackController system * English.lproj/Debugger.xib: Redo the bindings * Source/DebuggerController.h: Add stackArrayController ivar * Source/DebuggerController.m: (awakeFromNib): Set the sort descriptors (stepIn:): Rearrange the stackArrayController (stepOut:): ditto (stepOver): ditto --- English.lproj/Debugger.xib | 191 ++++++++++++++++++++++-------------- Source/DebuggerController.h | 1 + Source/DebuggerController.m | 5 +- 3 files changed, 121 insertions(+), 76 deletions(-) diff --git a/English.lproj/Debugger.xib b/English.lproj/Debugger.xib index 9f8bf8f..4df873c 100644 --- a/English.lproj/Debugger.xib +++ b/English.lproj/Debugger.xib @@ -8,6 +8,7 @@ 352.00 YES + YES @@ -393,7 +394,7 @@ ELIAAAAAAAgACAAIAAgAAQABAAEAAQ {3.40282e+38, 3.40282e+38} {213, 107} - + 256 YES @@ -699,6 +700,7 @@ ELIAAAAAAAgACAAIAAgAAQABAAEAAQ YES + index 1.000000e+01 1.000000e+01 3.000000e+01 @@ -725,8 +727,14 @@ ELIAAAAAAAgACAAIAAgAAQABAAEAAQ 3 YES + + index + YES + compare: + + filename 1.120000e+02 8.000000e+00 1.000000e+03 @@ -750,8 +758,14 @@ ELIAAAAAAAgACAAIAAgAAQABAAEAAQ 3 YES + + filename + YES + compare: + + lineNumber 3.300000e+01 2.600000e+01 1.000000e+03 @@ -775,8 +789,14 @@ ELIAAAAAAAgACAAIAAgAAQABAAEAAQ 3 YES + + lineNumber + YES + compare: + + function 2.150000e+02 5.006250e+01 1.000000e+03 @@ -800,6 +820,11 @@ ELIAAAAAAAgACAAIAAgAAQABAAEAAQ 3 YES + + function + YES + compare: + 3.000000e+00 @@ -885,6 +910,7 @@ ELIAAAAAAAgACAAIAAgAAQABAAEAAQ {769, 501} + {{0, 0}, {1440, 878}} {213, 169} @@ -894,20 +920,21 @@ ELIAAAAAAAgACAAIAAgAAQABAAEAAQ YES - level filename - lineno - where - register - register.rootElement + index + lineNumber + function + StackFrame YES + YES YES YES YES YES YES + YES @@ -936,38 +963,6 @@ ELIAAAAAAAgACAAIAAgAAQABAAEAAQ 26 - - - contentArray: stack - - - - - - contentArray: stack - contentArray - stack - 2 - - - 38 - - - - value: arrangedObjects.level - - - - - - value: arrangedObjects.level - value - arrangedObjects.level - 2 - - - 40 - value: arrangedObjects.filename @@ -984,38 +979,6 @@ ELIAAAAAAAgACAAIAAgAAQABAAEAAQ 44 - - - value: arrangedObjects.lineno - - - - - - value: arrangedObjects.lineno - value - arrangedObjects.lineno - 2 - - - 45 - - - - value: arrangedObjects.where - - - - - - value: arrangedObjects.where - value - arrangedObjects.where - 2 - - - 49 - delegate @@ -1224,13 +1187,89 @@ ELIAAAAAAAgACAAIAAgAAQABAAEAAQ 503 + + + contentArray: stackController.stack + + + + + + contentArray: stackController.stack + contentArray + stackController.stack + 2 + + + 557 + + + + value: arrangedObjects.index + + + + + + value: arrangedObjects.index + value + arrangedObjects.index + + NSConditionallySetsEditable + + + 2 + + + 558 + + + + value: arrangedObjects.lineNumber + + + + + + value: arrangedObjects.lineNumber + value + arrangedObjects.lineNumber + + NSConditionallySetsEditable + + + 2 + + + 559 + + + + value: arrangedObjects.function + + + + + + value: arrangedObjects.function + value + arrangedObjects.function + + NSConditionallySetsEditable + + + 2 + + + 560 + - stackController2 + stackArrayController - 556 + 563 @@ -1731,11 +1770,11 @@ ELIAAAAAAAgACAAIAAgAAQABAAEAAQ BSSplitView com.apple.InterfaceBuilder.CocoaPlugin - {{342, 237}, {769, 501}} + {{325, 237}, {769, 501}} com.apple.InterfaceBuilder.CocoaPlugin - {{342, 237}, {769, 501}} + {{325, 237}, {769, 501}} {{344, 269}, {769, 501}} @@ -1769,7 +1808,7 @@ ELIAAAAAAAgACAAIAAgAAQABAAEAAQ - 556 + 563 @@ -1834,6 +1873,7 @@ ELIAAAAAAAgACAAIAAgAAQABAAEAAQ registerView runButton sourceViewer + stackArrayController stackController2 statusmsg stepInButton @@ -1849,6 +1889,7 @@ ELIAAAAAAAgACAAIAAgAAQABAAEAAQ NSToolbarItem BSSourceView NSArrayController + NSArrayController NSTextField NSToolbarItem NSToolbarItem diff --git a/Source/DebuggerController.h b/Source/DebuggerController.h index bebcda1..eef4367 100644 --- a/Source/DebuggerController.h +++ b/Source/DebuggerController.h @@ -25,6 +25,7 @@ GDBpConnection *connection; StackController *stackController; + IBOutlet NSArrayController *stackArrayController; IBOutlet NSArrayController *stackController2; NSArray *stack; diff --git a/Source/DebuggerController.m b/Source/DebuggerController.m index 2ad50a0..df1d27a 100644 --- a/Source/DebuggerController.m +++ b/Source/DebuggerController.m @@ -68,6 +68,7 @@ [self setStatus:@"Connecting"]; [[self window] setExcludedFromWindowsMenu:YES]; [sourceViewer setDelegate:self]; + [stackArrayController setSortDescriptors:[NSArray arrayWithObject:[[[NSSortDescriptor alloc] initWithKey:@"index" ascending:YES] autorelease]]]; } /** @@ -210,6 +211,7 @@ if ([frame isShiftedFrame:[stackController peek]]) [stackController pop]; [stackController push:frame]; + [stackArrayController rearrangeObjects]; NSLog(@"stack = %@", stackController.stack); } @@ -222,6 +224,7 @@ [stackController pop]; // frame we were out of [stackController pop]; // frame we are returning to [stackController push:frame]; + [stackArrayController rearrangeObjects]; NSLog(@"stack = %@", stackController.stack); } @@ -234,7 +237,7 @@ [stackController pop]; [stackController push:frame]; - + [stackArrayController rearrangeObjects]; NSLog(@"stack = %@", stackController.stack); } -- 2.43.5