]> 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>
Fri, 25 Apr 2025 20:23:08 +0000 (21:23 +0100)
libctf/ctf-dump.c

index f76dec97fb673694ac7a3f4b6e0046b29f0ba77f..2362cb73f4dd9c359b180cd4c1b244122c8291c0 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.  */