svn commit: r288490 - head/usr.sbin/kldxref

Ed Maste emaste at FreeBSD.org
Fri Oct 2 13:16:07 UTC 2015


Author: emaste
Date: Fri Oct  2 13:16:06 2015
New Revision: 288490
URL: https://svnweb.freebsd.org/changeset/base/288490

Log:
  Add debug file extension to kldxref(8) after r288176
  
  After r288176 kernel debug files have the extension .debug.  They also
  moved to /usr/lib/debug/boot/kernel by default so in the normal case
  kldxref does not encounter them.  A src.conf(5) setting may be used to
  continue installing them in /boot/kernel though, so have kldxref skip
  .debug files in addition to .symbols files.
  
  Reported by:	fabient
  Sponsored by:	The FreeBSD Foundation

Modified:
  head/usr.sbin/kldxref/kldxref.c

Modified: head/usr.sbin/kldxref/kldxref.c
==============================================================================
--- head/usr.sbin/kldxref/kldxref.c	Fri Oct  2 12:50:12 2015	(r288489)
+++ head/usr.sbin/kldxref/kldxref.c	Fri Oct  2 13:16:06 2015	(r288490)
@@ -360,9 +360,12 @@ main(int argc, char *argv[])
 			fwrite(&ival, sizeof(ival), 1, fxref);
 			reccnt = 0;
 		}
-		/* skip non-files or .symbols entries */
+		/* skip non-files and separate debug files */
 		if (p->fts_info != FTS_F)
 			continue;
+		if (p->fts_namelen >= 6 &&
+		    strcmp(p->fts_name + p->fts_namelen - 6, ".debug") == 0)
+			continue;
 		if (p->fts_namelen >= 8 &&
 		    strcmp(p->fts_name + p->fts_namelen - 8, ".symbols") == 0)
 			continue;


More information about the svn-src-head mailing list