From 1ec572d423672c5fa9f2d214c4dee81f26b4d1dc Mon Sep 17 00:00:00 2001 From: Nick Alcock Date: Fri, 25 Apr 2025 21:22:34 +0100 Subject: [PATCH] libctf: dump: dump conflicting CUs, when declared --- libctf/ctf-dump.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/libctf/ctf-dump.c b/libctf/ctf-dump.c index f76dec97fb6..2362cb73f4d 100644 --- a/libctf/ctf-dump.c +++ b/libctf/ctf-dump.c @@ -206,7 +206,19 @@ ctf_dump_format_type (ctf_dict_t *fp, ctf_id_t id, int flag) } if (nonroot_trailer[0] != 0) - str = str_append (str, nonroot_trailer); + { + int conflicting; + const char *conflicting_cu; + + if ((conflicting = ctf_type_conflicting (fp, id, &conflicting_cu)) < 0) + goto oom; + if (conflicting && conflicting_cu[0] != 0) + { + str = str_append (str, ": conflicting in "); + str = str_append (str, conflicting_cu); + } + str = str_append (str, nonroot_trailer); + } /* Just exit after one iteration if we are not showing the types this type references. */ -- 2.47.2