+
+(define-public libbacktrace
+ ;; There are no releases nor tags.
+ (let ((revision "1")
+ (commit "5009c113981431ae1843ebd29d6ad24eb32fc1b2"))
+ (package
+ (name "libbacktrace")
+ (version (git-version "1.0" revision commit))
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/ianlancetaylor/libbacktrace")
+ (commit commit)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "0663zjpfpnsyv9h3pbp7cgmg9gz79n68bqpdl97y6i0jsx93v1zg"))))
+ (build-system gnu-build-system)
+ (arguments
+ `(#:make-flags '("CFLAGS=-fPIC")))
+ (home-page "https://github.com/ianlancetaylor/libbacktrace")
+ (synopsis "C library for producing symbolic backtraces")
+ (description "The @code{libbacktrace} library can be linked into a C/C++
+program to produce symbolic backtraces.")
+ (license license:bsd-3))))
+
+(define-public libleak
+ (package
+ (name "libleak")
+ (version "0.3.5")
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/WuBingzheng/libleak")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "1p8mb0hcfp8hdv1klv6rrpkn2zlhjxgkxbbjsk8kszxv7ijln87d"))))
+ (build-system gnu-build-system)
+ (arguments
+ `(#:tests? #f ;no test suite
+ #:parallel-build? #f ;jobserver unavailable
+ #:phases (modify-phases %standard-phases
+ (add-after 'unpack 'unbundle-libwuya
+ (lambda _
+ (substitute* "Makefile"
+ ((".*make -C libwuya.*") ""))
+ #t))
+ (add-before 'build 'set-CC
+ (lambda _
+ (setenv "CC" "gcc")
+ #t))
+ (delete 'configure) ;no configure script
+ (replace 'install
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let* ((out (assoc-ref outputs "out")))
+ (install-file "libleak.so" (string-append out "/lib"))
+ #t))))))
+ (inputs `(("libbacktrace" ,libbacktrace)
+ ("libwuya" ,libwuya)))
+ (home-page "https://github.com/WuBingzheng/libleak")
+ (synopsis "Memory leaks detection tool")
+ (description "The libleak tool detects memory leaks by hooking memory
+functions such as @code{malloc}. It comes as a shared object to be pre-loaded
+via @code{LD_PRELOAD} when launching the application. It prints the full call
+stack at suspicious memory leak points. Modifying or recompiling the target
+program is not required, and the detection can be enabled or disabled while
+the target application is running. The overhead incurred by libleak is
+smaller than that of other tools such as Valgrind, and it aims to be easier to
+use than similar tools like @command{mtrace}.")
+ (license license:gpl2+)))
+
+(define-public mspdebug
+ (package
+ (name "mspdebug")
+ (version "0.25")
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/dlbeer/mspdebug")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "0prgwb5vx6fd4bj12ss1bbb6axj2kjyriyjxqrzd58s5jyyy8d3c"))))
+ (build-system gnu-build-system)
+ (arguments
+ `(#:tests? #f ; no test suite
+ #:phases
+ (modify-phases %standard-phases
+ (delete 'configure)) ; no configure script
+ #:make-flags
+ (list (string-append "CC=" ,(cc-for-target))
+ "INSTALL=install"
+ (string-append "PREFIX=" %output))))
+ (inputs
+ `(("libusb-compat" ,libusb-compat)
+ ("readline" ,readline)))
+ (synopsis "Debugging tool for MSP430 MCUs")
+ (description "MspDebug supports FET430UIF, eZ430, RF2500 and Olimex
+MSP430-JTAG-TINY programmers, as well as many other compatible
+devices. It can be used as a proxy for gdb or as an independent
+debugger with support for programming, disassembly and reverse
+engineering.")
+ (home-page "https://github.com/dlbeer/mspdebug")
+ (license license:gpl2+)))