Display a short help about the command and exit.
- * ``--debug``
+ * ``--debug-self-comparison``
- In this mode, error messages are emitted for types which fail type canonicalization.
+ In this mode, error messages are emitted for types which fail type
+ canonicalization, in some circumstances, when comparing a binary
+ against itself.
- This is an optional ebugging and sanity check option. To enable
+ When comparing a binary against itself, canonical types of the
+ second binary should be equal (as much as possible) to canonical
+ types of the first binary. When some discrepancies are detected
+ in this mode, an abort signal is emitted and execution is halted.
+ This option should be used while executing the tool in a debugger,
+ for troubleshooting purposes.
+
+ This is an optional debugging and sanity check option. To enable
it the libabigail package needs to be configured with
- the --enable-debug-self-comparison option.
+ the --enable-debug-self-comparison configure option.
+
+ * ``--debug-tc``
+ In this mode, the process of type canonicalization is put under
+ heavy scrutiny. Basically, during type canonicalization, each
+ type comparison is performed twice: once in a structural mode
+ (comparing every sub-type member-wise), and once using canonical
+ comparison. The two comparisons should yield the same result.
+ Otherwise, an abort signal is emitted and the process can be
+ debugged to understand why the two kinds of comparison yield
+ different results.
+
+ This is an optional debugging and sanity check option. To enable
+ it the libabigail package needs to be configured with
+ the --enable-debug-type-canonicalization configure option.
* ``--version | -v``
bool show_stats;
bool do_log;
#ifdef WITH_DEBUG_SELF_COMPARISON
- bool do_debug;
+ bool do_debug_self_comparison;
+#endif
+#ifdef WITH_DEBUG_TYPE_CANONICALIZATION
+ bool do_debug_type_canonicalization;
#endif
#ifdef WITH_CTF
bool use_ctf;
#endif
#ifdef WITH_DEBUG_SELF_COMPARISON
,
- do_debug()
+ do_debug_self_comparison()
+#endif
+#ifdef WITH_DEBUG_TYPE_CANONICALIZATION
+ ,
+ do_debug_type_canonicalization()
#endif
{}
<< " --ctf use CTF instead of DWARF in ELF files\n"
#endif
#ifdef WITH_DEBUG_SELF_COMPARISON
- << " --debug debug the process of comparing an ABI corpus against itself"
+ << " --debug-self-comparison debug the process of comparing "
+ "an ABI corpus against itself"
+#endif
+#ifdef WITH_DEBUG_TYPE_CANONICALIZATION
+ << " --debug-tc debug the type canonicalization process"
#endif
<< " --verbose show verbose messages about internal stuff\n";
}
opts.use_ctf = true;
#endif
#ifdef WITH_DEBUG_SELF_COMPARISON
- else if (!strcmp(argv[i], "--debug"))
- opts.do_debug = true;
+ else if (!strcmp(argv[i], "--debug-self-comparison"))
+ opts.do_debug_self_comparison = true;
+#endif
+#ifdef WITH_DEBUG_TYPE_CANONICALIZATION
+ else if (!strcmp(argv[i], "--debug-tc"))
+ opts.do_debug_type_canonicalization = true;
#endif
else
{
env->analyze_exported_interfaces_only(*opts.exported_interfaces_only);
#ifdef WITH_DEBUG_SELF_COMPARISON
- if (opts.do_debug)
+ if (opts.do_debug_self_comparison)
env->self_comparison_debug_is_on(true);
+#endif
+#ifdef WITH_DEBUG_TYPE_CANONICALIZATION
+ if (opts.do_debug_type_canonicalization)
+ env->debug_type_canonicalization_is_on(true);
#endif
translation_unit_sptr t1, t2;
abigail::elf_reader::status c1_status =