From 437ddf0c4cb63fdb68c4bd1cc155144db344d0c5 Mon Sep 17 00:00:00 2001 From: Cary Coutant Date: Thu, 9 Apr 2015 11:52:21 -0700 Subject: Improve ODR checking in gold. gold/ * debug.h (DEBUG_LOCATION): New. (DEBUG_ALL): Include DEBUG_LOCATION. (debug_string_to_enum): Add DEBUG_LOCATION. * dwarf_reader.cc (Sized_dwarf_line_info::read_lines): Fix debug output to print correct context. (Sized_dwarf_line_info::do_addr2line): Add debug output. Return up to 4 more locations at the beginning of the function. * symtab.cc (Symbol_table::detect_odr_violations): Get canonical result before sorting list of line numbers. * testsuite/debug_msg.sh: Allow range of line numbers for canonical results on optimized code. --- gold/debug.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'gold/debug.h') diff --git a/gold/debug.h b/gold/debug.h index bca55f3..3fecbd8 100644 --- a/gold/debug.h +++ b/gold/debug.h @@ -38,9 +38,11 @@ const int DEBUG_SCRIPT = 0x2; const int DEBUG_FILES = 0x4; const int DEBUG_RELAXATION = 0x8; const int DEBUG_INCREMENTAL = 0x10; +const int DEBUG_LOCATION = 0x20; const int DEBUG_ALL = (DEBUG_TASK | DEBUG_SCRIPT | DEBUG_FILES - | DEBUG_RELAXATION | DEBUG_INCREMENTAL); + | DEBUG_RELAXATION | DEBUG_INCREMENTAL + | DEBUG_LOCATION); // Convert a debug string to the appropriate enum. inline int @@ -54,6 +56,7 @@ debug_string_to_enum(const char* arg) { "files", DEBUG_FILES }, { "relaxation", DEBUG_RELAXATION }, { "incremental", DEBUG_INCREMENTAL }, + { "location", DEBUG_LOCATION }, { "all", DEBUG_ALL } }; -- cgit v1.1