]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Fix inconsistencies in anonymous DOF files.
authormarkj <markj@FreeBSD.org>
Mon, 18 Nov 2019 18:34:23 +0000 (18:34 +0000)
committermarkj <markj@FreeBSD.org>
Mon, 18 Nov 2019 18:34:23 +0000 (18:34 +0000)
commitb84c86e41e4d7d106abb2119d43eefb97237c290
treea79736401bc080fdc6a382b1dbae65acf84e4499
parente882edff4b522abf3a2adc38b6046577aa896219
Fix inconsistencies in anonymous DOF files.

The DOF file output by dtrace -A contains only the loadable sections.
However, as it was created by a call to dtrace_dof_create() without
flags, the original DOF was created with the loadable sections.  The
result is that the DOF includes the section headers for the unloadable
sections (COMMENTS and UTSNAME) without these sections actually being
present.  This is inconsistent.

A simple change to anon_prog() ensures that the missing sections are
present in the outputted DOF.  Alternatively, the call to
dtrace_dof_create() could pass the DTRACE_D_STRIP flag stripping out the
loadable sections.  As the unloadable sections contain info useful for
debugging purposes they haven't been stripped.

Submitted by: Graeme Jenkinson <graeme.jenkinson@cl.cam.ac.uk>
MFC after: 1 week
Sponsored by: DARPA, AFRL
Differential Revision: https://reviews.freebsd.org/D21875
cddl/contrib/opensolaris/cmd/dtrace/dtrace.c