Date: Tue, 18 Feb 2014 18:35:16 +0000 (UTC) From: John Marino <marino@FreeBSD.org> To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r344938 - in head/devel/ahven: . files Message-ID: <201402181835.s1IIZG86086639@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: marino Date: Tue Feb 18 18:35:16 2014 New Revision: 344938 URL: http://svnweb.freebsd.org/changeset/ports/344938 QAT: https://qat.redports.org/buildarchive/r344938/ Log: devel/ahven: Modify to add symbolic tracing. The author, Tero Koskine, intends for ahven to be compiler agnostic, and therefore can't use GNAT-specific functionality like GNAT.Traceback.Symbolic. However, there is only one brand of Ada compiler in ports, GNAT, so we can take advantage of it. This change adds a default option to alter the exception handling to trace through the symbols to display files and line numbers of each frame on the stack. Declining the option builds Ahven without the modification and allows Ahven to be used on non-GNAT compilers (assuming you can find one on FreeBSD.) Added: head/devel/ahven/files/extra-src_ahven-framework.adb (contents, props changed) Modified: head/devel/ahven/Makefile Modified: head/devel/ahven/Makefile ============================================================================== --- head/devel/ahven/Makefile Tue Feb 18 18:30:44 2014 (r344937) +++ head/devel/ahven/Makefile Tue Feb 18 18:35:16 2014 (r344938) @@ -3,7 +3,7 @@ PORTNAME= ahven PORTVERSION= 2.4 -PORTREVISION= 2 +PORTREVISION= 3 CATEGORIES= devel MASTER_SITES= SF MASTER_SITE_SUBDIR=${PORTNAME}/${PORTNAME}/Ahven%20${PORTVERSION} @@ -19,7 +19,11 @@ USES= ada ALL_TARGET= build_all MAKE_ENV+= OS_VERSION=unix -OPTIONS_DEFINE= DOCS +OPTIONS_DEFINE= TRACE DOCS +OPTIONS_DEFAULT=TRACE +NO_OPTIONS_SORT=yes + +TRACE_DESC= Build with GNAT-specific symbolic tracing functionality .include <bsd.port.options.mk> @@ -30,6 +34,10 @@ BUILD_DEPENDS+= sphinx-build:${PORTSDIR} ALL_TARGET+= docs .endif +.if ${PORT_OPTIONS:MTRACE} +EXTRA_PATCHES= ${FILESDIR}/extra-src_ahven-framework.adb +.endif + post-install: @${RM} -rf ${STAGEDIR}${PREFIX}/share/doc/ahven/html/_sources @${RM} ${STAGEDIR}${PREFIX}/share/doc/ahven/html/.buildinfo Added: head/devel/ahven/files/extra-src_ahven-framework.adb ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/devel/ahven/files/extra-src_ahven-framework.adb Tue Feb 18 18:35:16 2014 (r344938) @@ -0,0 +1,34 @@ +--- src/ahven-framework.adb.orig 2014-02-08 21:21:51.000000000 +0000 ++++ src/ahven-framework.adb +@@ -14,6 +14,8 @@ + -- OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + -- + ++with GNAT.Traceback.Symbolic; ++use GNAT.Traceback.Symbolic; + with Ada.Strings; + with Ada.Unchecked_Deallocation; + with Ada.Exceptions; +@@ -346,19 +348,19 @@ package body Ahven.Framework is + Set_Status + (S => TEST_FAIL, + Message => Ada.Exceptions.Exception_Message (E), +- Long_Message => Ada.Exceptions.Exception_Information (E), ++ Long_Message => Symbolic_Traceback (E), + R => Result); + when E : Test_Skipped_Error => + Set_Status + (S => TEST_SKIP, + Message => Ada.Exceptions.Exception_Message (E), +- Long_Message => Ada.Exceptions.Exception_Information (E), ++ Long_Message => Symbolic_Traceback (E), + R => Result); + when E : others => + Set_Status + (S => TEST_ERROR, + Message => Ada.Exceptions.Exception_Message (E), +- Long_Message => Ada.Exceptions.Exception_Information (E), ++ Long_Message => Symbolic_Traceback (E), + R => Result); + end; + end Run_A_Command;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201402181835.s1IIZG86086639>