Date: Mon, 26 Jun 2006 05:11:48 GMT From: John Birrell <jb@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 100018 for review Message-ID: <200606260511.k5Q5Bm6x018659@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
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); }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200606260511.k5Q5Bm6x018659>