Skip to content

Runtime manager logging - #1834

Open
housel wants to merge 6 commits into
dylan-lang:masterfrom
housel:runtime-manager-logging
Open

Runtime manager logging#1834
housel wants to merge 6 commits into
dylan-lang:masterfrom
housel:runtime-manager-logging

Conversation

@housel

@housel housel commented Aug 5, 2026

Copy link
Copy Markdown
Member

These changes modify the runtime-manager debugging subsystems and the debugger portions of the environment to use the logging library for debug tracing.

housel added 6 commits August 4, 2026 21:05
* sources/runtime-manager/access-path/access-path.dylan
  (access-path-log): New <access-path> slot.
  (access-path-log-lock): New <access-path> constant slot.
  (initialize on <access-path>): Instantiate a <log> instance
   and configure it based on the OPEN_DYLAN_DEBUGGING_LOG
   environment variable.
  (*debugging-debugger?*, *debugger-stream*, *debugger-stream-count*,
   make-debugger-stream, close-debugger-stream): Remove.
  (access-path-message): New function for logging to the access path's
   log instance.
  (debugger-message, nub-debug-message): Change to locate a registered
   <access-path> and log using access-path-message.

* sources/runtime-manager/access-path/library.dylan
  (library access-path): Reference the logging library.

* sources/runtime-manager/access-path/module.dylan
  (module access-path): Remove superfluous reference to common-dylan.
   Remove create of *debugging-debugger?*, make-debugger-stream,
   and close-debugger-stream.
  (module access-path-implementation): Import environment-variable
   from the operating-system module. Reference the logging module.

* sources/runtime-manager/access-path/app-control.dylan
  (unhandled-continue-application, suspend-application-thread,
   dylan-resume-thread): Change logging to use access-path-message.

* sources/runtime-manager/access-path/remote-function-call.dylan
  (remote-call, remote-call-on-connection,
   remote-call-result-on-connection, remote-call-spy): Change logging
   to use access-path-message.

* sources/environment/target-application/target-application.dylan
  (thread-debug-message): Remove reference to *debugging-debugger?*.
* sources/runtime-manager/debugger-manager/debug-target.dylan
  (debug-target-message): New function for logging from a
   <debug-target> by delegating to access-path-message.

* sources/runtime-manager/debugger-manager/invoke-dylan.dylan
  (handle-debug-point-event): Log using debug-target-message.
  (handle-interactor-return): Log using debug-target-message.
  (setup-interactor, C-setup-interactor): Log using
   debug-target-message.

* sources/runtime-manager/debugger-manager/library.dylan
  (library debugger-manager): Reference the logging library.
  (module debugger-manager): Export debug-target-message.
  (module dm-internals): Reference the logging module.

* sources/runtime-manager/debugger-manager/profile.dylan
  (set-application-class-breakpoint,
   clear-application-class-breakpoint): Log using
   debug-target-messsage.

* sources/runtime-manager/debugger-manager/stepping.dylan
  (align-thread-to-source-location): Log using debug-target-messsage.

* sources/runtime-manager/debugger-manager/threads.dylan
  (remote-thread-information, suspend-interesting-thread,
   resume-selected-thread, resume-all-suspended-threads): Log
   using debug-target-messsage.
* sources/environment/target-application/library.dylan
  (library target-application): Reference the logging library.
  (module target-application-internals): Reference the logging module.

* sources/environment/target-application/target-application.dylan
  (thread-debug-message): Remove.
  (run-target-application): Replace thread-debug-message calls
   with debug-target-message.

* sources/environment/target-application/control.dylan
  (stop-target-application, stop-application-request,
   continue-target-application, target-application-state): Replace
   thread-debug-message and debug-message calls with debug-target-message.

* sources/environment/target-application/synchronized-access.dylan
  (perform-debugger-transaction, manage-debugger-transaction): Replace
   thread-debug-message calls with debug-target-message.
  (call-debugger-function): Replace thread-debug-message calls with
   debug-target-message.
* sources/environment/dfmc/application/library.dylan
  (library dfmc-environment-application): Referennce the logging
   library.
  (module dfmc-application): Reference the logging module.

* sources/environment/dfmc/application/control-protocols.dylan:
  Replace debugger-message calls with debug-target-message.

* sources/environment/dfmc/application/profiling.dylan:
  Replace debugger-message calls with debug-target-message.

* sources/environment/dfmc/application/stop-reason-handlers.dylan:
  Replace debugger-message calls with debug-target-message.

* sources/environment/dfmc/application/thread-objects.dylan:
  Replace debugger-message calls with debug-target-message.
* sources/environment/tests/dfmc/library.dylan
  (library dfmc-environment-test-suite): Referennce the logging
   debugger-manager libraries.

* sources/environment/tests/dfmc/module.dylan
  (module dfmc-environment-test-suite): Do not import debugger-message
   from the access-path module, and instead import
   debug-target-message from the debugger-manager library.

* sources/environment/tests/dfmc/debugging.dylan
  (test-debugger-message): New function for logging via the target
   application when it is available.
   Replace debugger-message calls with test-debugger-message.
* sources/runtime-manager/debugger-nub/x86-win32/symbol_lookup.c
  (debug_me): Ensure sprintf is declared when compiled for debugging.
  (nub_find_symbol_in_library): Print the symbol being.looked up.
interactive-thread, class-profiling?);
debug-target-message(target, $debug-level,
"Failed to stop general class breakpoint: "
" thread: %=, class-profiling?: %=",

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: did you mean to have three consecutive spaces?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants