1853 "enter the debugger - get and display the context, then start an |
1853 "enter the debugger - get and display the context, then start an |
1854 exclusive event loop on top of eveything else" |
1854 exclusive event loop on top of eveything else" |
1855 |
1855 |
1856 <context: #return> |
1856 <context: #return> |
1857 |
1857 |
1858 |con m enteredByInterrupt sel iAmNew foundNoByteCodeContext foundExitContext c| |
1858 |con m enteredByInterrupt sel iAmNew foundNoByteCodeContext foundExitContext c |
|
1859 userprefs logFile| |
1859 |
1860 |
1860 DebuggingDebugger == true ifTrue:[ |
1861 DebuggingDebugger == true ifTrue:[ |
1861 '==> enter2: (' print. aContext print. |
1862 '==> enter2: (' print. aContext print. |
1862 ') select: ' print. initialSelectionOrNil printCR. |
1863 ') select: ' print. initialSelectionOrNil printCR. |
1863 ]. |
1864 ]. |
1864 thisContext isRecursive ifTrue:[ |
1865 thisContext isRecursive ifTrue:[ |
1865 "/ care for the special case, were the Debugger was autoloaded. |
1866 "/ care for the special case, were the Debugger was autoloaded. |
1866 "/ in this case, thisContext IS recursive, but thats no error |
1867 "/ in this case, thisContext IS recursive, but thats no error |
1867 "/ condition. |
1868 "/ condition. |
1868 foundNoByteCodeContext := false. |
1869 foundNoByteCodeContext := false. |
1869 foundExitContext := false. |
1870 foundExitContext := false. |
1870 |
1871 |
1871 c := thisContext findNextContextWithSelector:#enter:withMessage:mayProceed: or:#noByteCode or:#exit_unwindThenDo:. |
1872 c := thisContext findNextContextWithSelector:#enter:withMessage:mayProceed: or:#noByteCode or:#exit_unwindThenDo:. |
1872 [ |
1873 [ |
1873 foundNoByteCodeContext not |
1874 foundNoByteCodeContext not |
1874 and:[ foundExitContext not |
1875 and:[ foundExitContext not |
1875 and:[c notNil |
1876 and:[c notNil |
1876 and:[c selector ~~ #enter:withMessage:mayProceed: |
1877 and:[c selector ~~ #enter:withMessage:mayProceed: |
1877 ]]]] |
1878 ]]]] |
1878 whileTrue:[ |
1879 whileTrue:[ |
1879 c selector == #exit_unwindThenDo: ifTrue:[ |
1880 c selector == #exit_unwindThenDo: ifTrue:[ |
1880 foundExitContext := true |
1881 foundExitContext := true |
1881 ]. |
1882 ]. |
1882 c selector == #noByteCode ifTrue:[ |
1883 c selector == #noByteCode ifTrue:[ |
1883 foundNoByteCodeContext := true |
1884 foundNoByteCodeContext := true |
1884 ]. |
1885 ]. |
1885 c := c findNextContextWithSelector:#enter:withMessage:mayProceed: or:#noByteCode or:#exit_unwindThenDo:. |
1886 c := c findNextContextWithSelector:#enter:withMessage:mayProceed: or:#noByteCode or:#exit_unwindThenDo:. |
1886 ]. |
1887 ]. |
1887 |
1888 |
1888 (foundNoByteCodeContext not |
1889 (foundNoByteCodeContext not |
1889 and:[ foundExitContext not]) ifFalse:[ |
1890 and:[ foundExitContext not]) ifFalse:[ |
1890 ('DebugView [warning]: reentered') errorPrintCR. |
1891 ('DebugView [warning]: reentered') errorPrintCR. |
1891 |
1892 |
1892 ^ MiniDebugger |
1893 ^ MiniDebugger |
1893 enter:aContext |
1894 enter:aContext |
1894 withMessage:'DebugView [error]: recursive error (in debugger)' |
1895 withMessage:'DebugView [error]: recursive error (in debugger)' |
1895 mayProceed:mayProceed. |
1896 mayProceed:mayProceed. |
1896 ]. |
1897 ]. |
1897 foundExitContext ifTrue:[ |
1898 foundExitContext ifTrue:[ |
1898 'DebugView [error]: recursive error (in debugger) ignored' printCR. |
1899 'DebugView [error]: recursive error (in debugger) ignored' printCR. |
1899 ^ self. |
1900 ^ self. |
1900 ]. |
1901 ]. |
1901 ]. |
1902 ]. |
1902 |
1903 |
1903 "/'entering: ' print. aContext printCR. |
1904 "/'entering: ' print. aContext printCR. |
1904 "/'initial: ' print. initialSelectionOrNil printCR. |
1905 "/'initial: ' print. initialSelectionOrNil printCR. |
1905 thisContext sender fixAllLineNumbers. "/ _CONTEXTLINENOS(s) |
1906 thisContext sender fixAllLineNumbers. "/ _CONTEXTLINENOS(s) |
1906 |
1907 |
1907 (self isHaltToBeIgnored) ifTrue:[ |
1908 (self isHaltToBeIgnored) ifTrue:[ |
1908 ^ self. |
1909 ^ self. |
1909 ]. |
1910 ]. |
1910 "/ "/ does not work yet - but we should ignore any breakpoints while stepping |
1911 "/ "/ does not work yet - but we should ignore any breakpoints while stepping |
1911 "/ (stepping and:[steppedContext notNil]) ifTrue:[ |
1912 "/ (stepping and:[steppedContext notNil]) ifTrue:[ |
1912 "/ self isEnteredDueToBreakpointOrHalt ifTrue:[ |
1913 "/ self isEnteredDueToBreakpointOrHalt ifTrue:[ |
1913 "/ 'DebugView [info]: ignored other interrupt while stepping' infoPrintCR. |
1914 "/ 'DebugView [info]: ignored other interrupt while stepping' infoPrintCR. |
1914 "/ ^ self |
1915 "/ ^ self |
1915 "/ ]. |
1916 "/ ]. |
1916 "/ ]. |
1917 "/ ]. |
1917 |
1918 userprefs := UserPreferences current. |
|
1919 "/ optionally log this debugger entry |
|
1920 (logFile := userprefs debuggerLogFile) notNil ifTrue:[ |
|
1921 logFile asFilename appendingFileDo:[:s | |
|
1922 s cr. |
|
1923 s nextPutLine:'-----------------------'. |
|
1924 Timestamp now printOn:s. |
|
1925 s nextPutAll:' ['; nextPutAll:Processor activeProcess name; nextPutAll:']'; cr. |
|
1926 s cr. |
|
1927 aContext fullPrintAllOn:s |
|
1928 ]. |
|
1929 ]. |
|
1930 |
1918 iAmNew := self drawableId isNil. |
1931 iAmNew := self drawableId isNil. |
1919 |
1932 |
1920 self verboseBacktraceHolder value:(UserPreferences current verboseBacktraceInDebugger). |
1933 self verboseBacktraceHolder value:(userprefs verboseBacktraceInDebugger). |
1921 |
1934 |
1922 busy := cachable := true. |
1935 busy := cachable := true. |
1923 inspecting := false. |
1936 inspecting := false. |
1924 inspectedProcess := Processor activeProcess. |
1937 inspectedProcess := Processor activeProcess. |
1925 stepping := false. |
1938 stepping := false. |
1933 "/ On a multiUser system, ungrab all of them ... |
1946 "/ On a multiUser system, ungrab all of them ... |
1934 "/ Q: this is good for multi-screen apps (where an error should not happen), |
1947 "/ Q: this is good for multi-screen apps (where an error should not happen), |
1935 "/ but not for multi-user development, where the debugger is entered often. |
1948 "/ but not for multi-user development, where the debugger is entered often. |
1936 "/ What is a good solution to this dilemma ? |
1949 "/ What is a good solution to this dilemma ? |
1937 Screen allScreens do:[:aScreen | |
1950 Screen allScreens do:[:aScreen | |
1938 aScreen ungrabPointer. |
1951 aScreen ungrabPointer. |
1939 aScreen ungrabKeyboard. |
1952 aScreen ungrabKeyboard. |
1940 ]. |
1953 ]. |
1941 |
1954 |
1942 ("inspectedProcess suspendedContext isNil |
1955 ("inspectedProcess suspendedContext isNil |
1943 or:["inspectedProcess isSystemProcess"]") ifTrue:[ |
1956 or:["inspectedProcess isSystemProcess"]") ifTrue:[ |
1944 terminateButton disable. |
1957 terminateButton disable. |
1945 ] ifFalse:[ |
1958 ] ifFalse:[ |
1946 terminateButton enable. |
1959 terminateButton enable. |
1947 abortButton enable. |
1960 abortButton enable. |
1948 ]. |
1961 ]. |
1949 |
1962 |
1950 iAmNew ifFalse:[ |
1963 iAmNew ifFalse:[ |
1951 "/ not the first time - disable buttons & menus |
1964 "/ not the first time - disable buttons & menus |
1952 "/ from the previous life |
1965 "/ from the previous life |
1953 self turnOffAllButtons. |
1966 self turnOffAllButtons. |
1954 |
1967 |
1955 m := contextView middleButtonMenu. |
1968 m := contextView middleButtonMenu. |
1956 m notNil ifTrue:[ |
1969 m notNil ifTrue:[ |
1957 m disableAll:#(showMore "skip skipForReturn" inspectContext). |
1970 m disableAll:#(showMore "skip skipForReturn" inspectContext). |
1958 ]. |
1971 ]. |
1959 self showingDenseWalkback:(self verboseBacktraceHolder value not). |
1972 self showingDenseWalkback:(self verboseBacktraceHolder value not). |
1960 ]. |
1973 ]. |
1961 self iconLabel:'Debugger'. |
1974 self iconLabel:'Debugger'. |
1962 |
1975 |
1963 windowGroup isNil ifTrue:[ |
1976 windowGroup isNil ifTrue:[ |
1964 self windowGroup: WindowGroup new. |
1977 self windowGroup: WindowGroup new. |
1965 windowGroup addTopView:self. |
1978 windowGroup addTopView:self. |
1966 ]. |
1979 ]. |
1967 exclusive ifFalse:[ |
1980 exclusive ifFalse:[ |
1968 "/ create a (modal) windowGroup for myself |
1981 "/ create a (modal) windowGroup for myself |
1969 |
1982 |
1970 windowGroup setModal:true. |
1983 windowGroup setModal:true. |
1971 ] ifTrue:[ |
1984 ] ifTrue:[ |
1972 "/ create a windowGroup with a synchronous sensor for me |
1985 "/ create a windowGroup with a synchronous sensor for me |
1973 |
1986 |
1974 windowGroup beSynchronous. |
1987 windowGroup beSynchronous. |
1975 ]. |
1988 ]. |
1976 windowGroup setProcess:Processor activeProcess. |
1989 windowGroup setProcess:Processor activeProcess. |
1977 IsDebuggingQuery answer:true do:[ |
1990 IsDebuggingQuery answer:true do:[ |
1978 |
1991 |
1979 " |
1992 " |
1980 get the walkback list; clear inspectors if we did not come here by single stepping) |
1993 get the walkback list; clear inspectors if we did not come here by single stepping) |
1981 " |
1994 " |
1982 "/Transcript show:'0 '; showCR:aContext. |
1995 "/Transcript show:'0 '; showCR:aContext. |
1983 "/Transcript show:'0 '; showCR:thisContext sender. |
1996 "/Transcript show:'0 '; showCR:thisContext sender. |
1984 "/Transcript show:'0 '; showCR:thisContext sender sender. |
1997 "/Transcript show:'0 '; showCR:thisContext sender sender. |
1985 "/Transcript show:'0 '; showCR:thisContext sender sender sender. |
1998 "/Transcript show:'0 '; showCR:thisContext sender sender sender. |
1986 "/Transcript show:'0 '; showCR:thisContext sender sender sender sender. |
1999 "/Transcript show:'0 '; showCR:thisContext sender sender sender sender. |
1990 "/Transcript show:'0 '; showCR:thisContext sender sender sender sender sender sender sender sender . |
2003 "/Transcript show:'0 '; showCR:thisContext sender sender sender sender sender sender sender sender . |
1991 "/Transcript show:'0 '; showCR:thisContext sender sender sender sender sender sender sender sender sender. |
2004 "/Transcript show:'0 '; showCR:thisContext sender sender sender sender sender sender sender sender sender. |
1992 "/Transcript show:'0 '; showCR:thisContext sender sender sender sender sender sender sender sender sender sender. |
2005 "/Transcript show:'0 '; showCR:thisContext sender sender sender sender sender sender sender sender sender sender. |
1993 "/Transcript show:'0 '; showCR:thisContext sender sender sender sender sender sender sender sender sender sender sender. |
2006 "/Transcript show:'0 '; showCR:thisContext sender sender sender sender sender sender sender sender sender sender sender. |
1994 "/Transcript showCR:initialSelectionOrNil. |
2007 "/Transcript showCR:initialSelectionOrNil. |
1995 self setContext:aContext releaseInspectors:(exitAction ~~ #step). |
2008 self setContext:aContext releaseInspectors:(exitAction ~~ #step). |
1996 "/'after setContext; first is ' print. |
2009 "/'after setContext; first is ' print. |
1997 "/(contextArray at:1 ifAbsent:nil) printCR. |
2010 "/(contextArray at:1 ifAbsent:nil) printCR. |
1998 self setInitialSelectionOnEntry:initialSelectionOrNil context:aContext. |
2011 self setInitialSelectionOnEntry:initialSelectionOrNil context:aContext. |
1999 |
2012 |
2000 self updateButtonsAndMenuItemsForContext:aContext. |
2013 self updateButtonsAndMenuItemsForContext:aContext. |
2001 |
2014 |
2002 " |
2015 " |
2003 If this is a new debugger, do a realize. |
2016 If this is a new debugger, do a realize. |
2004 Otherwise, its probably better to do a map, which shows the |
2017 Otherwise, its probably better to do a map, which shows the |
2005 view at the previous position, without a need for the user to set the |
2018 view at the previous position, without a need for the user to set the |
2006 position again |
2019 position again |
2007 " |
2020 " |
2008 iAmNew ifTrue:[ |
2021 iAmNew ifTrue:[ |
2009 self realize. |
2022 self realize. |
2010 ] ifFalse:[ |
2023 ] ifFalse:[ |
2011 self remap. |
2024 self remap. |
2012 ]. |
2025 ]. |
2013 self setForegroundWindow. |
2026 self setForegroundWindow. |
2014 |
2027 |
2015 exclusive ifTrue:[ |
2028 exclusive ifTrue:[ |
2016 self showError:' |
2029 self showError:' |
2017 Debugging system process `' , (inspectedProcess nameOrId) printString , '''. |
2030 Debugging system process `' , (inspectedProcess nameOrId) printString , '''. |
2018 |
2031 |
2019 This is a modal debugger - all event processing is stopped.. |
2032 This is a modal debugger - all event processing is stopped.. |
2020 Therefore, you cannot interact with other views or |
2033 Therefore, you cannot interact with other views or |
2021 open any other tools while this debugger is active. |
2034 open any other tools while this debugger is active. |
2022 |
2035 |
2023 Also, there is no event processing (redraw) for other views.' |
2036 Also, there is no event processing (redraw) for other views.' |
2024 ]. |
2037 ]. |
2025 |
2038 |
2026 self autoRaiseView ifTrue:[ |
2039 self autoRaiseView ifTrue:[ |
2027 "/ self raise. |
2040 "/ self raise. |
2028 self raiseDeiconified. |
2041 self raiseDeiconified. |
2029 self topView activate; setForegroundWindow; activate. |
2042 self topView activate; setForegroundWindow; activate. |
2030 ]. |
2043 ]. |
2031 |
2044 |
2032 canContinue := true. |
2045 canContinue := true. |
2033 exitAction := nil. |
2046 exitAction := nil. |
2034 |
2047 |
2035 "/ enter private event handling loop. This is left (and we come back here again) |
2048 "/ enter private event handling loop. This is left (and we come back here again) |
2036 "/ when any button was pressed which requires continuation of the debuggee or |
2049 "/ when any button was pressed which requires continuation of the debuggee or |
2037 "/ closedown of the debugger. |
2050 "/ closedown of the debugger. |
2038 [self controlLoop] ifCurtailed:[ |
2051 [self controlLoop] ifCurtailed:[ |
2039 windowGroup notNil ifTrue:[ |
2052 windowGroup notNil ifTrue:[ |
2040 windowGroup setProcess:nil. |
2053 windowGroup setProcess:nil. |
2041 ]. |
2054 ]. |
2042 NumberOfDebuggers := (NumberOfDebuggers ? 1) - 1. |
2055 NumberOfDebuggers := (NumberOfDebuggers ? 1) - 1. |
2043 self destroy |
2056 self destroy |
2044 ]. |
2057 ]. |
2045 NumberOfDebuggers := (NumberOfDebuggers ? 1) - 1. |
2058 NumberOfDebuggers := (NumberOfDebuggers ? 1) - 1. |
2046 ]. |
2059 ]. |
2047 "/ here after my own control loop is finished. |
2060 "/ here after my own control loop is finished. |
2048 |
2061 |
2049 "/ release all context stuff. |
2062 "/ release all context stuff. |
2050 "/ This is required to avoid keeping references to the debuggees objects |
2063 "/ This is required to avoid keeping references to the debuggees objects |
2053 |
2066 |
2054 codeView acceptAction:nil. |
2067 codeView acceptAction:nil. |
2055 codeView doItAction:nil. |
2068 codeView doItAction:nil. |
2056 |
2069 |
2057 ObjectMemory stepInterruptHandler == self ifTrue:[ |
2070 ObjectMemory stepInterruptHandler == self ifTrue:[ |
2058 ObjectMemory stepInterruptHandler:nil. |
2071 ObjectMemory stepInterruptHandler:nil. |
2059 ]. |
2072 ]. |
2060 |
2073 |
2061 lastSelectionInReceiverInspector := receiverInspector selectedKeyName. |
2074 lastSelectionInReceiverInspector := receiverInspector selectedKeyName. |
2062 lastSelectionInContextInspector := contextInspector selectedKeyName. |
2075 lastSelectionInContextInspector := contextInspector selectedKeyName. |
2063 |
2076 |
2064 (exitAction ~~ #step) ifTrue:[ |
2077 (exitAction ~~ #step) ifTrue:[ |
2065 "/ not stepping or continue - close window |
2078 "/ not stepping or continue - close window |
2066 self cacheMyself. |
2079 self cacheMyself. |
2067 receiverInspector release. |
2080 receiverInspector release. |
2068 contextInspector release. |
2081 contextInspector release. |
2069 |
2082 |
2070 self unmap. |
2083 self unmap. |
2071 self flush. |
2084 self flush. |
2072 |
2085 |
2073 (exitAction == #abort) ifTrue:[ self exit_abort. "does not return" ]. |
2086 (exitAction == #abort) ifTrue:[ self exit_abort. "does not return" ]. |
2074 (exitAction == #abortAll) ifTrue:[ self exit_abortAll. "does not return" ]. |
2087 (exitAction == #abortAll) ifTrue:[ self exit_abortAll. "does not return" ]. |
2075 (exitAction == #return) ifTrue:[ self exit_return. "does not return" ]. |
2088 (exitAction == #return) ifTrue:[ self exit_return. "does not return" ]. |
2076 (exitAction == #restart) ifTrue:[ self exit_restart. "does not return" ]. |
2089 (exitAction == #restart) ifTrue:[ self exit_restart. "does not return" ]. |
2077 (exitAction == #resend) ifTrue:[ self exit_resend. "does not return" ]. |
2090 (exitAction == #resend) ifTrue:[ self exit_resend. "does not return" ]. |
2078 (exitAction == #quickTerminate) ifTrue:[ self exit_quickTerminate. "does not return" ]. |
2091 (exitAction == #quickTerminate) ifTrue:[ self exit_quickTerminate. "does not return" ]. |
2079 (exitAction == #terminate) ifTrue:[ self exit_terminate. "does not return" ]. |
2092 (exitAction == #terminate) ifTrue:[ self exit_terminate. "does not return" ]. |
2080 exitAction isBlock ifTrue:[ |
2093 exitAction isBlock ifTrue:[ |
2081 self exit_unwindThenDo:exitAction. |
2094 self exit_unwindThenDo:exitAction. |
2082 "does not return" |
2095 "does not return" |
2083 ]. |
2096 ]. |
2084 "not reached" |
2097 "not reached" |
2085 ^ self |
2098 ^ self |
2086 ]. |
2099 ]. |
2087 |
2100 |
2088 "/ stepping - window stays open |
2101 "/ stepping - window stays open |
2089 selectedContext := actualContext := firstContext := nil. |
2102 selectedContext := actualContext := firstContext := nil. |
2090 |
2103 |
2091 "/ restore the previous pointer grab |
2104 "/ restore the previous pointer grab |
2092 grabber notNil ifTrue:[ |
2105 grabber notNil ifTrue:[ |
2093 self graphicsDevice grabPointerInView:grabber. |
2106 self graphicsDevice grabPointerInView:grabber. |
2094 grabber := nil. |
2107 grabber := nil. |
2095 ]. |
2108 ]. |
2096 |
2109 |
2097 (exitAction == #step) ifTrue:[ |
2110 (exitAction == #step) ifTrue:[ |
2098 " |
2111 " |
2099 schedule another stepInterrupt |
2112 schedule another stepInterrupt |
2100 - must enter myself into the collection of open debuggers, |
2113 - must enter myself into the collection of open debuggers, |
2101 in case the stepping process comes back again via a halt or signal |
2114 in case the stepping process comes back again via a halt or signal |
2102 before the step is finished. In this case, the stepping debugger should |
2115 before the step is finished. In this case, the stepping debugger should |
2103 come up (instead of a new one) |
2116 come up (instead of a new one) |
2104 - must flush caches since optimized methods not always |
2117 - must flush caches since optimized methods not always |
2105 look for pending interrupts |
2118 look for pending interrupts |
2106 " |
2119 " |
2107 |
2120 |
2108 "/ |
2121 "/ |
2109 "/ also must care for stepping into a return |
2122 "/ also must care for stepping into a return |
2110 "/ |
2123 "/ |
2111 steppedContext notNil ifTrue:[ |
2124 steppedContext notNil ifTrue:[ |
2112 Processor activeProcess forceInterruptOnReturnOf:steppedContext. |
2125 Processor activeProcess forceInterruptOnReturnOf:steppedContext. |
2113 ]. |
2126 ]. |
2114 |
2127 |
2115 OpenDebuggers isNil ifTrue:[ |
2128 OpenDebuggers isNil ifTrue:[ |
2116 OpenDebuggers := WeakIdentitySet new. |
2129 OpenDebuggers := WeakIdentitySet new. |
2117 ]. |
2130 ]. |
2118 OpenDebuggers add:self. |
2131 OpenDebuggers add:self. |
2119 |
2132 |
2120 self label:'single stepping - please wait ...'. |
2133 self label:'single stepping - please wait ...'. |
2121 stepping := true. |
2134 stepping := true. |
2122 |
2135 |
2123 ObjectMemory stepInterruptHandler:self. |
2136 ObjectMemory stepInterruptHandler:self. |
2124 Processor activeProcess stepInterruptHandler:self. |
2137 Processor activeProcess stepInterruptHandler:self. |
2125 ObjectMemory flushCaches. |
2138 ObjectMemory flushCaches. |
2126 |
2139 |
2127 Context singleStepInterruptRequest isHandled ifTrue:[ |
2140 Context singleStepInterruptRequest isHandled ifTrue:[ |
2128 Context singleStepInterruptRequest |
2141 Context singleStepInterruptRequest |
2129 raiseWith: |
2142 raiseWith: |
2130 (("bigStep" steppedContextLineno notNil) |
2143 (("bigStep" steppedContextLineno notNil) |
2131 ifTrue:[#next] |
2144 ifTrue:[#next] |
2132 ifFalse:[#step]) |
2145 ifFalse:[#step]) |
2133 ] ifFalse:[ |
2146 ] ifFalse:[ |
2134 "/ see if we came here through an interrupt-action |
2147 "/ see if we came here through an interrupt-action |
2135 "/ (i.e. aProcess interruptWith:...) |
2148 "/ (i.e. aProcess interruptWith:...) |
2136 |
2149 |
2137 enteredByInterrupt := false. |
2150 enteredByInterrupt := false. |
2138 con := thisContext findNextContextWithSelector:#timerInterrupt or:#ioInterrupt or:nil. |
2151 con := thisContext findNextContextWithSelector:#timerInterrupt or:#ioInterrupt or:nil. |
2139 [enteredByInterrupt not |
2152 [enteredByInterrupt not |
2140 and:[con notNil |
2153 and:[con notNil |
2141 and:[con ~~ aContext]]] whileTrue:[ |
2154 and:[con ~~ aContext]]] whileTrue:[ |
2142 ((sel := con selector) == #timerInterrupt |
2155 ((sel := con selector) == #timerInterrupt |
2143 or:[sel == #ioInterrupt]) ifTrue:[ |
2156 or:[sel == #ioInterrupt]) ifTrue:[ |
2144 enteredByInterrupt := true. |
2157 enteredByInterrupt := true. |
2145 ] ifFalse:[ |
2158 ] ifFalse:[ |
2146 con := con findNextContextWithSelector:#timerInterrupt or:#ioInterrupt or:nil. |
2159 con := con findNextContextWithSelector:#timerInterrupt or:#ioInterrupt or:nil. |
2147 ]. |
2160 ]. |
2148 ]. |
2161 ]. |
2149 |
2162 |
2150 ObjectMemory flushInlineCaches. |
2163 ObjectMemory flushInlineCaches. |
2151 |
2164 |
2152 DebuggingDebugger == true ifTrue:[ |
2165 DebuggingDebugger == true ifTrue:[ |
2153 enteredByInterrupt printCR. |
2166 enteredByInterrupt printCR. |
2154 ]. |
2167 ]. |
2155 enteredByInterrupt ifTrue:[ |
2168 enteredByInterrupt ifTrue:[ |
2156 "/ don't want to step through all intermediate |
2169 "/ don't want to step through all intermediate |
2157 "/ (scheduler-) contexts; place a return-trap on the |
2170 "/ (scheduler-) contexts; place a return-trap on the |
2158 "/ one right below the interesting one |
2171 "/ one right below the interesting one |
2159 |
2172 |
2160 "/ 'special unwind return' printCR. |
2173 "/ 'special unwind return' printCR. |
2161 con unwindThenDo:[ |
2174 con unwindThenDo:[ |
2162 Processor activeProcess stepInterruptHandler:self. |
2175 Processor activeProcess stepInterruptHandler:self. |
2163 ObjectMemory stepInterruptHandler:self. |
2176 ObjectMemory stepInterruptHandler:self. |
2164 InStepInterrupt := nil. |
2177 InStepInterrupt := nil. |
2165 StepInterruptPending := 1. |
2178 StepInterruptPending := 1. |
2166 InterruptPending := 1]. |
2179 InterruptPending := 1]. |
2167 ] ifFalse:[ |
2180 ] ifFalse:[ |
2168 "/ 'normal step return' printCR. |
2181 "/ 'normal step return' printCR. |
2169 skipLineNr ~~ #return ifTrue:[ |
2182 skipLineNr ~~ #return ifTrue:[ |
2170 StepInterruptPending := 1. |
2183 StepInterruptPending := 1. |
2171 InterruptPending := 1. |
2184 InterruptPending := 1. |
2172 ] ifFalse:[ |
2185 ] ifFalse:[ |
2173 "/ 'step for return' printCR. |
2186 "/ 'step for return' printCR. |
2174 ] |
2187 ] |
2175 ]. |
2188 ]. |
2176 InStepInterrupt := nil |
2189 InStepInterrupt := nil |
2177 ] |
2190 ] |
2178 ] ifFalse:[ |
2191 ] ifFalse:[ |
2179 OpenDebuggers notNil ifTrue:[ |
2192 OpenDebuggers notNil ifTrue:[ |
2180 OpenDebuggers remove:self ifAbsent:[]. |
2193 OpenDebuggers remove:self ifAbsent:[]. |
2181 ]. |
2194 ]. |
2182 self cacheMyself. |
2195 self cacheMyself. |
2183 ] |
2196 ] |
2184 |
2197 |
2185 "Modified: / 17-04-1997 / 13:01:32 / stefan" |
2198 "Modified: / 17-04-1997 / 13:01:32 / stefan" |
2186 "Created: / 30-10-1997 / 21:08:18 / cg" |
2199 "Created: / 30-10-1997 / 21:08:18 / cg" |
2187 "Modified: / 13-10-1998 / 19:56:59 / ps" |
2200 "Modified: / 13-10-1998 / 19:56:59 / ps" |