summaryrefslogtreecommitdiff
path: root/gnu/packages/linux.scm
diff options
context:
space:
mode:
authorMaxim Cournoyer <maxim.cournoyer@gmail.com>2024-05-08 10:02:36 -0400
committerMaxim Cournoyer <maxim.cournoyer@gmail.com>2024-05-29 22:01:23 -0400
commite9e825387f1daefde91b0ba5c5ec3540b0b227fa (patch)
tree1f33464ce0c07fab07631edb5d455d44357be5a4 /gnu/packages/linux.scm
parent3528d888eed2e226826085f68b40171dee18c5cb (diff)
downloadguix-patches-e9e825387f1daefde91b0ba5c5ec3540b0b227fa.tar
guix-patches-e9e825387f1daefde91b0ba5c5ec3540b0b227fa.tar.gz
gnu: Add dwarves.
* gnu/packages/linux.scm (dwarves): New variable. Change-Id: Ib2452868eae76bea95060a70e568dfb6e84b2a75
Diffstat (limited to 'gnu/packages/linux.scm')
-rw-r--r--gnu/packages/linux.scm48
1 files changed, 48 insertions, 0 deletions
diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm
index 4177e1c97e..2ce2c27c93 100644
--- a/gnu/packages/linux.scm
+++ b/gnu/packages/linux.scm
@@ -2411,6 +2411,54 @@ by Robert Shea and Robert Anton Wilson.")
partitions. Write functionality is also provided but check the README.")
(license license:gpl2+)))
+(define-public dwarves
+ (package
+ (name "dwarves")
+ (version "1.26")
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/acmel/dwarves")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "0xfq0r3whc3dk922ss8i5vwyfcqhgc95dy27mm69j5niy7i5kzrd"))
+ (patches
+ (search-patches "dwarves-threading-reproducibility.patch"))))
+ (build-system cmake-build-system)
+ (arguments (list #:configure-flags #~(list "-D__LIB=lib"
+ "-DLIBBPF_EMBEDDED=OFF")
+ #:tests? #f)) ;no test suite
+ (native-inputs (list pkg-config))
+ (inputs (list libbpf))
+ (home-page "https://github.com/acmel/dwarves")
+ (synopsis "Debugging information processing library and utilities")
+ (description "Dwarves is a set of tools that use the debugging information
+inserted in ELF binaries by compilers such as GCC, used by well known
+debuggers such as GDB.
+
+Utilities in the Dwarves suite include @command{pahole}, that can be used to
+find alignment holes in structures and classes in languages such as C, C++,
+but not limited to these. These tools can also be used to encode and read the
+BTF type information format used with the kernel Linux @code{bpf} syscall.
+
+The @command{codiff} command can be used to compare the effects changes in
+source code generate on the resulting binaries.
+
+The @command{pfunct} command can be used to find all sorts of information
+about functions, inlines, decisions made by the compiler about inlining, etc.
+
+The @command{pahole} command can be used to use all this type information to
+pretty print raw data according to command line directions.
+
+Headers can have its data format described from debugging info and offsets from
+it can be used to further format a number of records.
+
+Finally, the @command{btfdiff} command can be used to compare the output of
+pahole from BTF and DWARF, to make sure they produce the same results. ")
+ (license license:gpl2+)))
+
(define-public fbset
(package
(name "fbset")