home *** CD-ROM | disk | FTP | other *** search
- " Distributed Feature patch 2
- Patch neded to fix stack overflow reporting problem
- in the Distributed Debugger "
-
- DsKernelDebug becomeDefault!
-
- !DsKernelDebugStartUp class publicMethods !
-
- reportError: errorString resumable: resumable startBP: startBP
- "Open a debugger on the receiver process.
-
- Technique is:
-
- 1) Ensure that no processes switch me out.
- 2) Fork a new Event dispatcher
- 3) Enable process switches.
- "
-
- | theProcess|
-
- [
- self debuggerClass = EtDebugger
- ifTrue: [^super reportError: errorString resumable: resumable startBP: startBP].
- self cleanUpBeforeWalkback.
-
- Processor disableProcessSwitches.
- theProcess := Processor activeProcess.
- theProcess changeStackSize: theProcess stack size + 1024.
- self setupDebuggerFor: theProcess.
- (Process newProcessOn: [
- [theProcess suspend.
- CwAppContext default asyncExecInUI: [
- "This will open the debugger from the UI process when the UI process
- returns to the event loop."
- [Processor
- addDebugProcess: theProcess
- errorString: errorString
- startBP: startBP
- resumable: resumable]
- when: ExError | ExHalt "ExHalt catches stack overflows" do: [:sig |
- self outputWalkback: errorString process: theProcess.
- self recursiveError: (sig argument isString ifTrue: [sig argument] ifFalse: [sig description])
- signal: sig]]] critical]) priority: 7; resume.
- "Ensure there is a UI process running."
- (UIProcess currentUI notNil and: [UIProcess currentUI isReady]) ifFalse: [UIProcess forkUserInterface].
- Processor enableProcessSwitches.
- ] when: ExError | ExHalt "ExHalt catches stack overflows."
- do: [:sig | self recursiveError: errorString signal: sig].! !
-