From a520e31858890e8585541828b62cd62b12543602 Mon Sep 17 00:00:00 2001 From: Maxim Cournoyer Date: Wed, 1 Oct 2025 13:01:57 +0900 Subject: [PATCH] gnu: Add rr-zen-pmu-workaround. * gnu/packages/debug.scm (rr-zen-pmu-workaround): New variable. Change-Id: I8259ac9f90185c62d8a1f9716e24fbc2d6aa7d62 Co-authored-by: Robin Templeton --- gnu/packages/debug.scm | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/gnu/packages/debug.scm b/gnu/packages/debug.scm index e89c370846f..f244107841a 100644 --- a/gnu/packages/debug.scm +++ b/gnu/packages/debug.scm @@ -6,7 +6,7 @@ ;;; Copyright © 2019 Pkill -9 ;;; Copyright © 2020 Vincent Legoll ;;; Copyright © 2020, 2021 Morgan Smith -;;; Copyright © 2020 Maxim Cournoyer +;;; Copyright © 2020, 2025 Maxim Cournoyer ;;; Copyright © 2021 Felix Gruber ;;; Copyright © 2021 Foo Chuan Wei ;;; Copyright © 2022 Michael Rohleder @@ -15,6 +15,7 @@ ;;; Copyright © 2023 Ricardo Wurmus ;;; Copyright © 2024 Raven Hallsby ;;; Copyright © 2025 Nguyễn Gia Phong +;;; Copyright © 2025 Robin Templeton ;;; ;;; This file is part of GNU Guix. ;;; @@ -40,6 +41,7 @@ #:use-module (guix build-system gnu) #:use-module (guix build-system cmake) #:use-module (guix build-system go) + #:use-module (guix build-system linux-module) #:use-module (guix build-system pyproject) #:use-module (guix build-system qt) #:use-module (guix gexp) @@ -847,6 +849,27 @@ GDB/x86 features like hardware data watchpoints, makes debugging much more fun.") (license license:expat)))) +(define-public rr-zen-pmu-workaround + (package + (name "rr-zen-pmu-workaround") + (version (package-version rr)) + (source (package-source rr)) + (build-system linux-module-build-system) + (arguments + (list + #:tests? #f ;no tests + #:phases + #~(modify-phases %standard-phases + (add-after 'unpack 'cd + (lambda _ + (chdir "third-party/zen-pmu-workaround")))))) + (home-page "https://github.com/rr-debugger/rr/wiki/Zen") + (synopsis "AMD Zen workaround kernel module for rr") + (description "This is a Linux kernel module that implements + workarounds needed for using the @command{rr} debugger with AMD Zen +@acronym{CPU, Central Processing Unit}.") + (license license:gpl2))) ;GPLv2 only, like the kernel + (define-public libbacktrace ;; There are no releases nor tags. (let ((revision "2")