PERFORCE change 100018 for review
John Birrell
jb at FreeBSD.org
Mon Jun 26 05:11:49 UTC 2006
http://perforce.freebsd.org/chv.cgi?CH=100018
Change 100018 by jb at 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);
}
More information about the p4-projects
mailing list