From c3f2bf7d53d254e858247913dfaa97195d62a113 Mon Sep 17 00:00:00 2001 From: Nick Alcock Date: Wed, 3 Oct 2012 19:32:09 +0100 Subject: [PATCH] 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 --- scripts/dwarf2ctf/dwarf2ctf.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) 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); -- 2.50.1