mirror of
https://github.com/openembedded/meta-openembedded.git
synced 2026-04-20 11:38:34 +00:00
pstack: add recipe
This recipe provides pstack for C/C++, Go, Rust, and Python. Signed-off-by: Wen Yang <wen.yang@linux.dev> Signed-off-by: Khem Raj <raj.khem@gmail.com>
This commit is contained in:
39
meta-oe/recipes-devtools/pstack/pstack.inc
Normal file
39
meta-oe/recipes-devtools/pstack/pstack.inc
Normal file
@@ -0,0 +1,39 @@
|
||||
SUMMARY = "A utility to print stack traces of running processes"
|
||||
DESCRIPTION = "A from-scratch implementation of pstack using DWARF debugging and unwind information. \
|
||||
Works for C/C++, Go, Rust, and Python. A traditional pstack command can generally print a backtrace \
|
||||
of each thread in a running program, and sometimes from a core file. This version of pstack uses its \
|
||||
own self contained ELF and DWARF parsing library, libdwelf to parse the DWARF debug and unwind \
|
||||
information, to get a stack trace."
|
||||
HOMEPAGE = "https://github.com/peadar/pstack"
|
||||
SECTION = "devel"
|
||||
LICENSE = "BSD-2-Clause"
|
||||
LIC_FILES_CHKSUM = "file://LICENSE;md5=671019a96ba80415b696240ed2ca5e80"
|
||||
|
||||
inherit cmake
|
||||
|
||||
S = "${UNPACKDIR}/${BPN}-${PV}"
|
||||
DEPENDS += "zlib xz libunwind elfutils"
|
||||
|
||||
RDEPENDS:${PN} += "elfutils"
|
||||
|
||||
do_install() {
|
||||
install -d ${D}${bindir}
|
||||
install -m 0755 ${B}/pstack ${D}${bindir}/pstack
|
||||
|
||||
install -d ${D}${libdir}
|
||||
install -m 0755 ${B}/libprocman.so.${PV} ${D}${libdir}/libprocman.so.${PV}
|
||||
ln -sf libprocman.so.${PV} ${D}${libdir}/libprocman.so
|
||||
install -m 0755 ${B}/libdwelf.so.${PV} ${D}${libdir}/libdwelf.so.${PV}
|
||||
ln -sf libdwelf.so.${PV} ${D}${libdir}/libdwelf.so
|
||||
}
|
||||
|
||||
PACKAGES = "${PN}"
|
||||
FILES:${PN} = "${bindir}/pstack"
|
||||
FILES:${PN} += "${libdir}/libprocman.so.${PV}"
|
||||
FILES:${PN} += "${libdir}/libdwelf.so.${PV}"
|
||||
|
||||
PACKAGES += "${PN}-dbg"
|
||||
FILES:${PN}-dbg += "${base_bindir}/.debug ${base_sbindir}/.debug ${bindir}/.debug ${sbindir}/.debug"
|
||||
|
||||
PACKAGES += "${PN}-dev"
|
||||
FILES:${PN}-dev += "${base_libdir}/*.so"
|
||||
Reference in New Issue
Block a user