From: Nick Alcock Date: Fri, 25 Apr 2025 20:22:34 +0000 (+0100) Subject: libctf: dump: dump conflicting CUs, when declared X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=1ec572d423672c5fa9f2d214c4dee81f26b4d1dc;p=thirdparty%2Fbinutils-gdb.git libctf: dump: dump conflicting CUs, when declared --- 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. */