diff --git a/CHANGES b/CHANGES index 59304a3593053e7f29977e0492c4c559d5b85057..19f7e868f3abaf492771ae01ed16598984de7aac 100644 --- a/CHANGES +++ b/CHANGES @@ -91,14 +91,14 @@ o Sql.SQLite binary string in a multiset. For example, to store the value "myBinary" as a BLOB value using a binding, use: (<"myBinary">). -o Debug.Peek +o Debug.Inspect Allows for interactive debugging and live data structure inspection in both single- and multi-threaded programs. Example: In the program you'd like to inspect, insert the following one-liner: - Debug.Peek("/tmp/test.pike"); + Debug.Inspect("/tmp/test.pike"); Then start the program and keep it running. Next you create a /tmp/test.pike with the following content: diff --git a/lib/modules/Debug.pmod/Peek.pike b/lib/modules/Debug.pmod/Inspect.pike similarity index 93% rename from lib/modules/Debug.pmod/Peek.pike rename to lib/modules/Debug.pmod/Inspect.pike index e702fc9f4e3aea61723acfb0d67578b6e10f5592..b7119929ae435af4daef331d1f92463f234a3720 100644 --- a/lib/modules/Debug.pmod/Peek.pike +++ b/lib/modules/Debug.pmod/Inspect.pike @@ -8,7 +8,7 @@ //! Example: //! In the program you'd like to inspect, insert the following one-liner: //! @code -//! Debug.Peek("/tmp/test.pike"); +//! Debug.Inspect("/tmp/test.pike"); //! @endcode //! Then start the program and keep it running. //! Next you create a /tmp/test.pike with the following content: @@ -69,14 +69,14 @@ private int lastmtime; private int skipnext; private int oldsignal; -//! If assigned to, it will allow the diagnostics peek to be triggered +//! If assigned to, it will allow the diagnostics inspection to be triggered //! by this signal. int triggersignal; //! The polling interval in seconds, defaults to 4. int pollinterval = POLLINTERVAL; -//! The peek-thread. It will not appear in the displayed thread-list. +//! The inspect-thread. It will not appear in the displayed thread-list. Thread.Thread _loopthread; //! Either the callback function which is invoked on each iteration, or the @@ -89,18 +89,18 @@ string|function(void:void) _callback; private void loop(int sig) { _loopthread = Thread.this_thread(); - for(;; peek()) { + for(;; inspect()) { sleep(pollinterval, 1); if (triggersignal != oldsignal) { - werror("\nTo peek use: kill -%d %d\n\n", + werror("\nTo inspect use: kill -%d %d\n\n", triggersignal, getpid()); - signal(triggersignal, peek); + signal(triggersignal, inspect); } } } //! The internal function which does all the work each pollinterval. -private void peek() { +private void inspect() { Thread.MutexKey lock; if (lock = running->trylock(1)) { Thread.Thread thisthread = Thread.this_thread(); diff --git a/lib/modules/Debug.pmod/module.pmod b/lib/modules/Debug.pmod/module.pmod index edee050b77d39568a2a3ab08e56bab89807ce191..98a86c8b45f9f84ac8344d8e357713709270758e 100644 --- a/lib/modules/Debug.pmod/module.pmod +++ b/lib/modules/Debug.pmod/module.pmod @@ -2,7 +2,7 @@ //! Can be custom filled from within your program in order to //! have global references to explore live datastructures using -//! @[Peek]; comes preinitialised with the empty mapping, ready for use. +//! @[Inspect]; comes preinitialised with the empty mapping, ready for use. mapping globals = ([]); constant verify_internals = _verify_internals;