aboutsummaryrefslogtreecommitdiff
path: root/cddl/contrib/opensolaris/tools
diff options
context:
space:
mode:
authorMatt Macy <mmacy@FreeBSD.org>2018-05-19 18:50:58 +0000
committerMatt Macy <mmacy@FreeBSD.org>2018-05-19 18:50:58 +0000
commit1f52c1db905b5e6689fb2d954e99645a74dc60a0 (patch)
tree4ffa013fadd0b99b1fd0cf253972e64f478d8a1f /cddl/contrib/opensolaris/tools
parent0842ea9bb98fa8327fa040f9a487e7bb66aba60b (diff)
downloadsrc-1f52c1db905b5e6689fb2d954e99645a74dc60a0.tar.gz
src-1f52c1db905b5e6689fb2d954e99645a74dc60a0.zip
ctf dwarf: don't report "no dwarf entry" as if it were an error
Notes
Notes: svn path=/head/; revision=333885
Diffstat (limited to 'cddl/contrib/opensolaris/tools')
-rw-r--r--cddl/contrib/opensolaris/tools/ctf/cvt/dwarf.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/cddl/contrib/opensolaris/tools/ctf/cvt/dwarf.c b/cddl/contrib/opensolaris/tools/ctf/cvt/dwarf.c
index 8c958693e08e..d97d00e68c29 100644
--- a/cddl/contrib/opensolaris/tools/ctf/cvt/dwarf.c
+++ b/cddl/contrib/opensolaris/tools/ctf/cvt/dwarf.c
@@ -1941,9 +1941,12 @@ dw_read(tdata_t *td, Elf *elf, char *filename __unused)
}
if ((rc = dwarf_next_cu_header_b(dw.dw_dw, &hdrlen, &vers, &abboff,
- &addrsz, &offsz, NULL, &nxthdr, &dw.dw_err)) != DW_DLV_OK)
- terminate("rc = %d %s\n", rc, dwarf_errmsg(dw.dw_err));
-
+ &addrsz, &offsz, NULL, &nxthdr, &dw.dw_err)) != DW_DLV_OK) {
+ if (dw.dw_err.err_error == DW_DLE_NO_ENTRY)
+ exit(0);
+ else
+ terminate("rc = %d %s\n", rc, dwarf_errmsg(dw.dw_err));
+ }
if ((cu = die_sibling(&dw, NULL)) == NULL ||
(((child = die_child(&dw, cu)) == NULL) &&
should_have_dwarf(elf))) {