From: Nick Alcock Date: Wed, 3 Oct 2012 18:32:09 +0000 (+0100) Subject: ctf: Improve error message on internal deduplication error X-Git-Tag: v4.1.12-92~313^2~113 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=c3f2bf7d53d254e858247913dfaa97195d62a113;p=users%2Fjedix%2Flinux-maple.git ctf: Improve error message on internal deduplication error 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 --- diff --git a/scripts/dwarf2ctf/dwarf2ctf.c b/scripts/dwarf2ctf/dwarf2ctf.c index 4a6d445301cf..7867e5807bad 100644 --- a/scripts/dwarf2ctf/dwarf2ctf.c +++ b/scripts/dwarf2ctf/dwarf2ctf.c @@ -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);