[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Enabling tracing on a phase to debug?
From: |
Maxim Cournoyer |
Subject: |
Enabling tracing on a phase to debug? |
Date: |
Fri, 15 Jul 2022 15:53:50 -0400 |
Hello Guix,
I was toying with the idea to programatically enable tracing the
execution of a single build phase to aid with debugging, and came up
with this with the help of robin on #guix (thanks!)
--8<---------------cut here---------------start------------->8---
@@ -4349,7 +4349,19 @@ (define-public vala
(substitute* "valadoc/tests/libvaladoc\
/tests-extra-environment.sh"
(("export PKG_CONFIG_PATH=" m)
- (string-append m "$PKG_CONFIG_PATH:"))))))))
+ (string-append m "$PKG_CONFIG_PATH:")))))
+
+ (replace 'glib-or-gtk-wrap
+ (lambda args
+ (use-modules (system vm trace)
+ (system vm vm))
+ (call-with-vm
+ (lambda ()
+ (set-vm-engine! 'debug)
+ (call-with-trace
+ (lambda _
+ (apply (assoc-ref %standard-phases 'glib-or-gtk-wrap)
+ args))))))))))
(native-inputs
`(("bison" ,bison)
("dbus" ,dbus) ; for dbus tests
--8<---------------cut here---------------end--------------->8---
Unfortunately it doesn't cause any trace to be output. Is there
something missing to the above incantation, perhaps?
Thanks,
Maxim
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Enabling tracing on a phase to debug?,
Maxim Cournoyer <=