]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
ctf: Improve error message on internal deduplication error
authorNick Alcock <nick.alcock@oracle.com>
Wed, 3 Oct 2012 18:32:09 +0000 (19:32 +0100)
committerNick Alcock <nick.alcock@oracle.com>
Mon, 29 Jun 2015 21:40:34 +0000 (22:40 +0100)
We should at least emit the name of the variable we are looking up (if possible)
as well as the name of the variable we are working over.  (Often this will be
unknown, but not always.)

Signed-off-by: Nick Alcock <nick.alcock@oracle.com>
scripts/dwarf2ctf/dwarf2ctf.c

index 4a6d445301cf6466154193f86e23c4f28f620f25..7867e5807bad45b5f69ea29342d1bcb9e3c28919 100644 (file)
@@ -2347,13 +2347,15 @@ static ctf_id_t lookup_ctf_type(const char *module_name, const char *file_name,
            type_ref->ctf_file != g_hash_table_lookup(module_to_ctf_file,
                                                      "dtrace_ctf")) {
 #ifdef DEBUG
-               fprintf(stderr, "%s: Internal error: lookup found in "
+               fprintf(stderr, "%s: Internal error: lookup of %s found in "
                        "different file: %s/%s versus %s/%s.\n", locerrstr,
+                       dwarf_diename(die) ? dwarf_diename(die) : "(unnamed)",
                        type_ref->module_name, type_ref->file_name, module_name,
                        file_name);
 #else
-               fprintf(stderr, "%s: Internal error: lookup found in different "
-                       "file.\n", locerrstr);
+               fprintf(stderr, "%s: Internal error: lookup of %s found in different "
+                       "file.\n", locerrstr,
+                       dwarf_diename(die) ? dwarf_diename(die) : "(unnamed)");
 #endif
                fprintf(stderr, "detect_duplicates() is probably buggy.\n");
                exit(1);