]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
libctf: dump: dump conflicting CUs, when declared
authorNick Alcock <nick.alcock@oracle.com>
Fri, 25 Apr 2025 20:22:34 +0000 (21:22 +0100)
committerNick Alcock <nick.alcock@oracle.com>
Tue, 9 Dec 2025 13:02:28 +0000 (13:02 +0000)
libctf/ctf-dump.c

index b7085920e879f3c98412db6032aa96570881fc7f..0d7249235a42b96339d134c4c77a59b7e97d8d89 100644 (file)
@@ -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.  */