ctfconvert: Make the absence of debug info non-fatal

When compiled with gcc14, subr_ticks.o legitimately doesn't contain any
DWARF sections.  Just emit a warning in this case.  In general we still
want to run ctfconvert on asm files.

Reviewed by:	emaste, des
Fixes:		e959f2a7d8 ("ctf*: exit with error upon terminate()")
Differential Revision:	https://reviews.freebsd.org/D61231
This commit is contained in:
Mark Johnston committed 2026-11-06 11:59:43 -05:00
1 parent d0666b1f24
commit 40371e5141
1 file changed
+7 -2
@@ -230,8 +230,13 @@ main(int argc, char **argv)
filetd = tdata_new(); filetd = tdata_new();
if (!file_read(filetd, infile, ignore_non_c)) /*
terminate("%s doesn't have type data to convert\n", infile); * asm files may legitimately not have debug info.
*/
if (!file_read(filetd, infile, ignore_non_c)) {
warning("%s doesn't have type data to convert\n", infile);
exit(0);
}
if (verbose) if (verbose)
iidesc_stats(filetd->td_iihash); iidesc_stats(filetd->td_iihash);