From owner-p4-projects@FreeBSD.ORG Mon Jun 26 05:11:49 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 6FC1116A405; Mon, 26 Jun 2006 05:11:49 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 4E79E16A402 for ; Mon, 26 Jun 2006 05:11:49 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9EC4543D7D for ; Mon, 26 Jun 2006 05:11:48 +0000 (GMT) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.6/8.13.6) with ESMTP id k5Q5Bm3t018662 for ; Mon, 26 Jun 2006 05:11:48 GMT (envelope-from jb@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id k5Q5Bm6x018659 for perforce@freebsd.org; Mon, 26 Jun 2006 05:11:48 GMT (envelope-from jb@freebsd.org) Date: Mon, 26 Jun 2006 05:11:48 GMT Message-Id: <200606260511.k5Q5Bm6x018659@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jb@freebsd.org using -f From: John Birrell To: Perforce Change Reviews Cc: Subject: PERFORCE change 100018 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Jun 2006 05:11:49 -0000 http://perforce.freebsd.org/chv.cgi?CH=100018 Change 100018 by jb@jb_freebsd2 on 2006/06/26 05:11:21 Report the error file and line number to help determine what caused the error. Affected files ... .. //depot/projects/dtrace/src/contrib/opensolaris/cmd/dtrace/dtrace.c#7 edit Differences ... ==== //depot/projects/dtrace/src/contrib/opensolaris/cmd/dtrace/dtrace.c#7 (text) ==== @@ -203,6 +203,10 @@ static void dfatal(const char *fmt, ...) { +#if !defined(sun) + char *p_errfile = NULL; + int errline = 0; +#endif va_list ap; va_start(ap, fmt); @@ -220,6 +224,11 @@ (void) fprintf(stderr, "%s\n", dtrace_errmsg(g_dtp, dtrace_errno(g_dtp))); } +#if !defined(sun) + dt_get_errloc(g_dtp, &p_errfile, &errline); + if (p_errfile != NULL) + printf("File '%s', line %d\n", p_errfile, errline); +#endif exit(E_ERROR); }