From: Olivier Dion via Guix-patches via <guix-patches@gnu.org>
To: 58045@debbugs.gnu.org
Cc: Olivier Dion <olivier.dion@polymtl.ca>, othacehe@gnu.org
Subject: [bug#58045] [PATCH] gnu: Add libpatch.
Date: Sat, 24 Sep 2022 12:38:15 -0400 [thread overview]
Message-ID: <3400e6a50d528e085834f77e7159607f22d9b8b9.1664037413.git.olivier.dion@polymtl.ca> (raw)
* gnu/packages/instrumentation.scm (libpatch): New variable.
---
gnu/packages/instrumentation.scm | 64 ++++++++++++++++++++++++++++++++
1 file changed, 64 insertions(+)
diff --git a/gnu/packages/instrumentation.scm b/gnu/packages/instrumentation.scm
index c508801c6b..b611f2b141 100644
--- a/gnu/packages/instrumentation.scm
+++ b/gnu/packages/instrumentation.scm
@@ -22,6 +22,7 @@ (define-module (gnu packages instrumentation)
#:use-module (gnu packages bison)
#:use-module (gnu packages boost)
#:use-module (gnu packages commencement)
+ #:use-module (gnu packages compression)
#:use-module (gnu packages datastructures)
#:use-module (gnu packages documentation)
#:use-module (gnu packages elf)
@@ -30,6 +31,7 @@ (define-module (gnu packages instrumentation)
#:use-module (gnu packages flex)
#:use-module (gnu packages gawk)
#:use-module (gnu packages glib)
+ #:use-module (gnu packages guile)
#:use-module (gnu packages haskell-xyz)
#:use-module (gnu packages libunwind)
#:use-module (gnu packages linux)
@@ -207,6 +209,68 @@ (define-public flamegraph
with the script @command{flamegraph.pl} and many stackcollapse scripts.")
(license license:cddl1.0))))
+(define-public libpatch
+ (package
+ (name "libpatch")
+ (version "1.0.0")
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://git.sr.ht/~old/libpatch")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "1sx1sichnnqfi84z37gd04h41vpr8i2vg6yg0jkqxlrv3dys489a"))))
+ (build-system gnu-build-system)
+ (arguments
+ `(#:configure-flags
+ (list
+ (string-append
+ "--target="
+ ,(platform-linux-architecture
+ (lookup-platform-by-target-or-system
+ (or
+ (%current-target-system)
+ (%current-system))))))))
+ (inputs
+ (list capstone
+ elfutils
+ ;; Uncomment the following if you want tracepoints within libpatch
+ ;; for debugging.
+ ;;
+ ;; lttng-ust
+ libunwind
+ liburcu))
+ (native-inputs
+ (list coreutils
+ ;; test-ftrace.scm
+ (list coreutils "debug")
+ ;; For eu-nm in test-ftrace.scm.
+ (list elfutils "bin")
+ ;; Put Guile in your profile if you want to use the bindings.
+ guile-3.0
+ ;; test-ftrace.scm
+ (list guile-3.0 "debug")
+ gnu-make
+ ;; test-ftrace.scm
+ (list gnu-make "debug")
+ pkg-config
+ ;; zlib is required by libdw. This can be removed if zlib is put
+ ;; as a propagated-input of elfutils.
+ zlib))
+ (synopsis "Dynamic binary patcher")
+ (description
+ "libpatch is a lightweight C library that can be used by tracers,
+debuggers and other tools for insertion of probes in a program at runtime. It
+has many strategies to minimize probe overhead and maximize possible
+coverage.")
+ (home-page "https://git.sr.ht/~old/libpatch")
+ (license (list license:lgpl2.1 license:expat license:gpl3+))
+ ;; Libpatch only supports instrumentation for x86_64 right now. Augment
+ ;; that list in further version.
+ (supported-systems (list "x86_64-linux"))))
+
(define-public lttng-modules
(package
(name "lttng-modules")
--
2.37.3
next reply other threads:[~2022-09-24 16:39 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-24 16:38 Olivier Dion via Guix-patches via [this message]
2022-09-26 13:33 ` bug#58045: [PATCH] gnu: Add libpatch Mathieu Othacehe
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=3400e6a50d528e085834f77e7159607f22d9b8b9.1664037413.git.olivier.dion@polymtl.ca \
--to=guix-patches@gnu.org \
--cc=58045@debbugs.gnu.org \
--cc=olivier.dion@polymtl.ca \
--cc=othacehe@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.