module: dm-internals synopsis: Definitions of external (non access-path) stop reasons. author: Paul Howard Copyright: Original Code is Copyright (c) 1995-2004 Functional Objects, Inc. All rights reserved. License: Functional Objects Library Public License Version 1.0 Dual-license: GNU Lesser General Public License Warranty: Distributed WITHOUT WARRANTY OF ANY KIND ///// IMPORTED: ///// IMPORTED: ///// // The application stopped due to some behaviour on behalf of the // debugger. define open abstract class () constant slot stop-reason-client-data :: , init-value: #f, init-keyword: client-data:; end class; ///// // The application stopped as a result of a 'stop' action generated // by the debugger. Eg. the user pressed the STOP button in the // toolbar. define class () end class; ///// // A dylan stop-reason that requires a format string and format args // to be read from the stack when it occurs. Examples are // and define abstract class () constant slot stored-debug-target :: , required-init-keyword: target:; slot formatted-string-cache :: false-or(), init-value: #f; constant slot control-string-instance :: , required-init-keyword: string-instance:; constant slot format-args-vector :: , required-init-keyword: format-args:; end class; ///// // The debugger was notified because of a runtime call to debug-message. define class () end class; ///// // The debugger was invoked because of an unhandled dylan condition. define class () end class; // For now, class breakpoints are modelled as language-level-stop-reason define class () constant slot class-breakpoint-class :: , required-init-keyword: class:; constant slot class-breakpoint-size :: , required-init-keyword: size:; end class; ///// // The debugger was invoked by a thread created by the DM itself // via a call to SPAWN-INTERACTIVE-THREAD. define class () constant slot interactive-thread-name :: , required-init-keyword: name:; end class; ///// define class () end class; ///// // The debugger was invoked because it was tracking the execution // of an interactive form, and the execution context has just // returned. define class () constant slot interactor-transaction-id :: , required-init-keyword: transaction-id:; end class; ///// EXPORTED GENERIC FUNCTIONS define generic interactor-return-values (sr :: ) => (vals :: ); define generic dylan-debug-message-string (sr :: ) => (str :: ); define generic dylan-error-message-string (sr :: ) => (str :: ); define generic stop-reason-debug-points (application :: , sr :: ) => (interested-debug-points :: ); ///// INTERACTOR-RETURN-VALUES // TODO: Implement define method interactor-return-values (sr :: ) => (vals :: ) #[] end method; ///// DYLAN-DEBUG-MESSAGE-STRING define method dylan-debug-message-string (sr :: ) => (str :: ) let application = sr.stored-debug-target; if (sr.formatted-string-cache) sr.formatted-string-cache else sr.formatted-string-cache := apply(remote-format-to-string, application, dylan-string-data(application, sr.control-string-instance), sr.format-args-vector); sr.formatted-string-cache end if end method; ///// DYLAN-ERROR-MESSAGE-STRING define method dylan-error-message-string (sr :: ) => (str :: ) let application = sr.stored-debug-target; if (sr.formatted-string-cache) sr.formatted-string-cache else sr.formatted-string-cache := apply(remote-format-to-string, application, dylan-string-data(application, sr.control-string-instance), sr.format-args-vector); sr.formatted-string-cache end if end method; ///// STOP-REASON-DEBUG-POINTS define method stop-reason-debug-points (application :: , sr :: ) => (interested-debug-points :: ) application.signalling-debug-points; end method;