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
This commit is contained in:
Ed Maste 2015-10-02 13:16:06 +00:00
parent cf8f2fa24b
commit 113a1a2139
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=288490

View File

@ -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;