From dc4d849281fa612ff267426e9835af3966a1849b Mon Sep 17 00:00:00 2001 From: Olivier Cochard Date: Mon, 20 Jun 2016 08:18:29 +0000 Subject: New port: sysutils/bstack bstack - gstack for FreeBSD This is a port of gstack, a script build around gdb on RedHat and other Linux distros, to FreeBSD. bstack take a PID as only parameter and print out the back trace of that running process. If the process is multithread, the backtrace of all threads is printed. It works with the last version of GDB WWW: https://github.com/pizzamig/bstack PR: 209398 Submitted by: luca.pizzamiglio@gmail.com Approved by: jadawin (mentor) Differential Revision: https://reviews.freebsd.org/D6899 --- sysutils/Makefile | 1 + sysutils/bstack/Makefile | 32 ++++++++++++++++++++++++++++++++ sysutils/bstack/distinfo | 3 +++ sysutils/bstack/pkg-descr | 12 ++++++++++++ 4 files changed, 48 insertions(+) create mode 100644 sysutils/bstack/Makefile create mode 100644 sysutils/bstack/distinfo create mode 100644 sysutils/bstack/pkg-descr diff --git a/sysutils/Makefile b/sysutils/Makefile index cedfa7ac4a04..c5245d26093c 100644 --- a/sysutils/Makefile +++ b/sysutils/Makefile @@ -103,6 +103,7 @@ SUBDIR += bsdmoted SUBDIR += bsdploy SUBDIR += bsdstats + SUBDIR += bstack SUBDIR += btsixad SUBDIR += bulk_extractor SUBDIR += burp diff --git a/sysutils/bstack/Makefile b/sysutils/bstack/Makefile new file mode 100644 index 000000000000..9771f6acb7ef --- /dev/null +++ b/sysutils/bstack/Makefile @@ -0,0 +1,32 @@ +# $FreeBSD$ + +PORTNAME= bstack +PORTVERSION= 0.1 +CATEGORIES= sysutils + +MAINTAINER= luca.pizzamiglio@gmail.com +COMMENT= Debug tool that shows the stack trace of a running process + +LICENSE= BSD3CLAUSE + +RUN_DEPENDS= gdb:devel/gdb + +USE_GITHUB= yes +GH_ACCOUNT= pizzamig +NO_BUILD= yes +NO_ARCH= yes + +PLIST_FILES= bin/bstack \ + %%DATADIR%%/gdb_bstack + +post-patch: + @${REINPLACE_CMD} -e 's|/usr/local|${PREFIX}|;' ${WRKSRC}/bstack + +do-install: + ${INSTALL_SCRIPT} ${WRKSRC}/bstack \ + ${STAGEDIR}${PREFIX}/bin/bstack + ${MKDIR} ${STAGEDIR}${DATADIR} + ${INSTALL_DATA} ${WRKSRC}/gdb_bstack \ + ${STAGEDIR}${DATADIR}/gdb_bstack + +.include diff --git a/sysutils/bstack/distinfo b/sysutils/bstack/distinfo new file mode 100644 index 000000000000..6141b7f393a7 --- /dev/null +++ b/sysutils/bstack/distinfo @@ -0,0 +1,3 @@ +TIMESTAMP = 1466409420 +SHA256 (pizzamig-bstack-0.1_GH0.tar.gz) = 358ab23ba0ce99260a3239797bdc5fc10cf14bce00ec7b3ff1ab2f1fbe8ffccd +SIZE (pizzamig-bstack-0.1_GH0.tar.gz) = 1868 diff --git a/sysutils/bstack/pkg-descr b/sysutils/bstack/pkg-descr new file mode 100644 index 000000000000..54bee8a55726 --- /dev/null +++ b/sysutils/bstack/pkg-descr @@ -0,0 +1,12 @@ +bstack - gstack for FreeBSD + +This is a port of gstack, a script build around gdb on RedHat and other +Linux distros, to FreeBSD. + +bstack take a PID as only parameter and print out the back trace of that +running process. If the process is multithread, the backtrace of all +threads is printed. + +It works with the last version of GDB + +WWW: https://github.com/pizzamig/bstack -- cgit v1.2.3