summaryrefslogtreecommitdiffstats
path: root/contrib/tools/cython/Cython/Debugging.py
diff options
context:
space:
mode:
authoralexv-smirnov <[email protected]>2023-03-15 19:59:12 +0300
committeralexv-smirnov <[email protected]>2023-03-15 19:59:12 +0300
commit056bb284ccf8dd6793ec3a54ffa36c4fb2b9ad11 (patch)
tree4740980126f32e3af7937ba0ca5f83e59baa4ab0 /contrib/tools/cython/Cython/Debugging.py
parent269126dcced1cc8b53eb4398b4a33e5142f10290 (diff)
add library/cpp/actors, ymake build to ydb oss export
Diffstat (limited to 'contrib/tools/cython/Cython/Debugging.py')
-rw-r--r--contrib/tools/cython/Cython/Debugging.py20
1 files changed, 20 insertions, 0 deletions
diff --git a/contrib/tools/cython/Cython/Debugging.py b/contrib/tools/cython/Cython/Debugging.py
new file mode 100644
index 00000000000..edb3f4e8ca5
--- /dev/null
+++ b/contrib/tools/cython/Cython/Debugging.py
@@ -0,0 +1,20 @@
+###############################################
+#
+# Odds and ends for debugging
+#
+###############################################
+
+def print_call_chain(*args):
+ import sys
+ print(" ".join(map(str, args)))
+ f = sys._getframe(1)
+ while f:
+ name = f.f_code.co_name
+ s = f.f_locals.get('self', None)
+ if s:
+ c = getattr(s, "__class__", None)
+ if c:
+ name = "%s.%s" % (c.__name__, name)
+ print("Called from: %s %s" % (name, f.f_lineno))
+ f = f.f_back
+ print("-" * 70)