mirror of
https://github.com/freebsd/freebsd-src.git
synced 2026-11-07 04:36:52 -10:00
libdtrace: Fix dt_print_sym() not printing symbols in non-oformat mode
dt_print_sym() fills the symbol string via snprintf() in non-oformat mode but the guarding `dtp->dt_oformat != 0 &&` for the dt_printf() call causes the symbol is computed but never emitted. This fixes tests: - common.profile-n.t_dtrace_contrib.tst_sym_ksh - common.profile-n.t_dtrace_contrib.tst_func_ksh Reviewed by: markj Fixes:93f27766a7("dtrace: Add the 'oformat' libdtrace option") MFC after: 3 days Event: Halifax Hackathon 202606 Location: Room 208, Computer Science Building, Dalhousie University Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D57895 (cherry picked from commit8e61d8707f)
This commit is contained in:
1 file changed
+1
-1
@@ -2143,7 +2143,7 @@ dt_print_sym(dtrace_hdl_t *dtp, FILE *fp, const char *format, caddr_t addr)
|
||||
}
|
||||
}
|
||||
|
||||
if (dtp->dt_oformat != 0 && dt_printf(dtp, fp, format, c) < 0)
|
||||
if (!dtp->dt_oformat && dt_printf(dtp, fp, format, c) < 0)
|
||||
return (-1);
|
||||
|
||||
return (0);
|
||||
|
||||
Reference in new issue
Block a user