diff --git a/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp b/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp --- a/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp +++ b/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp @@ -1267,8 +1267,9 @@ if (GetDebugMapSymfile()) return GetID() | ref.die_offset(); - return user_id_t(GetDwoNum().getValueOr(0x7fffffff)) << 32 | - ref.die_offset() | + lldbassert(GetDwoNum().getValueOr(0) <= 0x3fffffff); + return user_id_t(GetDwoNum().getValueOr(0)) << 32 | ref.die_offset() | + lldb::user_id_t(GetDwoNum().hasValue()) << 62 | lldb::user_id_t(ref.section() == DIERef::Section::DebugTypes) << 63; } @@ -1297,9 +1298,10 @@ DIERef::Section section = uid >> 63 ? DIERef::Section::DebugTypes : DIERef::Section::DebugInfo; - llvm::Optional dwo_num = uid >> 32 & 0x7fffffff; - if (*dwo_num == 0x7fffffff) - dwo_num = llvm::None; + llvm::Optional dwo_num; + bool dwo_valid = uid >> 62 & 1; + if (dwo_valid) + dwo_num = uid >> 32 & 0x3fffffff; return DecodedUID{*this, {dwo_num, section, die_offset}}; } diff --git a/lldb/test/Shell/SymbolFile/DWARF/DW_AT_low_pc-addrx.s b/lldb/test/Shell/SymbolFile/DWARF/DW_AT_low_pc-addrx.s --- a/lldb/test/Shell/SymbolFile/DWARF/DW_AT_low_pc-addrx.s +++ b/lldb/test/Shell/SymbolFile/DWARF/DW_AT_low_pc-addrx.s @@ -5,9 +5,9 @@ # RUN: -o exit | FileCheck %s # CHECK-LABEL: image lookup -v -s lookup_rnglists -# CHECK: Function: id = {0x7fffffff0000002d}, name = "rnglists", range = [0x0000000000000000-0x0000000000000003) -# CHECK: Blocks: id = {0x7fffffff0000002d}, range = [0x00000000-0x00000003) -# CHECK-NEXT: id = {0x7fffffff00000043}, range = [0x00000001-0x00000002) +# CHECK: Function: id = {0x0000002d}, name = "rnglists", range = [0x0000000000000000-0x0000000000000003) +# CHECK: Blocks: id = {0x0000002d}, range = [0x00000000-0x00000003) +# CHECK-NEXT: id = {0x00000043}, range = [0x00000001-0x00000002) .text rnglists: diff --git a/lldb/test/Shell/SymbolFile/DWARF/array-sizes.s b/lldb/test/Shell/SymbolFile/DWARF/array-sizes.s --- a/lldb/test/Shell/SymbolFile/DWARF/array-sizes.s +++ b/lldb/test/Shell/SymbolFile/DWARF/array-sizes.s @@ -9,8 +9,8 @@ # RUN: ld.lld %t.o -o %t # RUN: lldb-test symbols %t | FileCheck %s -# CHECK: Variable{0x7fffffff0000001e}, name = "X" -# CHECK-SAME: type = {7fffffff00000033} 0x{{[0-9A-F]*}} (char [56]) +# CHECK: Variable{0x0000001e}, name = "X" +# CHECK-SAME: type = {0000000000000033} 0x{{[0-9A-F]*}} (char [56]) # Generated from "char X[47];" diff --git a/lldb/test/Shell/SymbolFile/DWARF/debug-types-address-ranges.s b/lldb/test/Shell/SymbolFile/DWARF/debug-types-address-ranges.s --- a/lldb/test/Shell/SymbolFile/DWARF/debug-types-address-ranges.s +++ b/lldb/test/Shell/SymbolFile/DWARF/debug-types-address-ranges.s @@ -11,11 +11,11 @@ # RUN: %lldb %t -o "image lookup -a 0x48000 -v" -o exit | FileCheck %s # CHECK: CompileUnit: id = {0x00000001}, file = "/tmp/a.cc", language = "c++" -# CHECK: Function: id = {0x7fffffff0000006a}, name = "::_start({{.*}})", range = [0x0000000000048000-0x000000000004800c) +# CHECK: Function: id = {0x0000006a}, name = "::_start({{.*}})", range = [0x0000000000048000-0x000000000004800c) # CHECK: LineEntry: [0x0000000000048000-0x000000000004800a): /tmp/a.cc:4 # CHECK: Symbol: id = {0x00000002}, range = [0x0000000000048000-0x000000000004800c), name="_start" -# CHECK: Variable: id = {0x7fffffff00000075}, name = "v1", {{.*}} decl = a.cc:4 -# CHECK: Variable: id = {0x7fffffff00000080}, name = "v2", {{.*}} decl = a.cc:4 +# CHECK: Variable: id = {0x00000075}, name = "v1", {{.*}} decl = a.cc:4 +# CHECK: Variable: id = {0x00000080}, name = "v2", {{.*}} decl = a.cc:4 # Output generated via diff --git a/lldb/test/Shell/SymbolFile/DWARF/debug-types-dwarf5.s b/lldb/test/Shell/SymbolFile/DWARF/debug-types-dwarf5.s --- a/lldb/test/Shell/SymbolFile/DWARF/debug-types-dwarf5.s +++ b/lldb/test/Shell/SymbolFile/DWARF/debug-types-dwarf5.s @@ -1,8 +1,8 @@ # RUN: llvm-mc -triple=x86_64-pc-linux -filetype=obj %s > %t # RUN: %lldb %t -o "image lookup -v -s f1" -o exit | FileCheck %s -# CHECK: Function: id = {0x7fffffff0000003c}, name = "f1", range = [0x0000000000000000-0x0000000000000001) -# CHECK: Blocks: id = {0x7fffffff0000003c}, range = [0x00000000-0x00000001) +# CHECK: Function: id = {0x0000003c}, name = "f1", range = [0x0000000000000000-0x0000000000000001) +# CHECK: Blocks: id = {0x0000003c}, range = [0x00000000-0x00000001) .text diff --git a/lldb/test/Shell/SymbolFile/DWARF/debug_ranges-missing-section.s b/lldb/test/Shell/SymbolFile/DWARF/debug_ranges-missing-section.s --- a/lldb/test/Shell/SymbolFile/DWARF/debug_ranges-missing-section.s +++ b/lldb/test/Shell/SymbolFile/DWARF/debug_ranges-missing-section.s @@ -4,8 +4,8 @@ # RUN: %lldb %t -o "image lookup -v -s lookup_ranges" -o exit 2>&1 | FileCheck %s # CHECK: DIE has DW_AT_ranges(0x47) attribute, but range extraction failed (No debug_ranges section), -# CHECK: Function: id = {0x7fffffff0000001c}, name = "ranges", range = [0x0000000000000000-0x0000000000000004) -# CHECK: Blocks: id = {0x7fffffff0000001c}, range = [0x00000000-0x00000004) +# CHECK: Function: id = {0x0000001c}, name = "ranges", range = [0x0000000000000000-0x0000000000000004) +# CHECK: Blocks: id = {0x0000001c}, range = [0x00000000-0x00000004) .text .p2align 12 diff --git a/lldb/test/Shell/SymbolFile/DWARF/debug_ranges.s b/lldb/test/Shell/SymbolFile/DWARF/debug_ranges.s --- a/lldb/test/Shell/SymbolFile/DWARF/debug_ranges.s +++ b/lldb/test/Shell/SymbolFile/DWARF/debug_ranges.s @@ -3,9 +3,9 @@ # RUN: llvm-mc -triple=x86_64-pc-linux -filetype=obj %s > %t # RUN: %lldb %t -o "image lookup -v -s lookup_ranges" -o exit | FileCheck %s -# CHECK: Function: id = {0x7fffffff0000002b}, name = "ranges", range = [0x0000000000000000-0x0000000000000004) -# CHECK: Blocks: id = {0x7fffffff0000002b}, range = [0x00000000-0x00000004) -# CHECK-NEXT: id = {0x7fffffff0000003f}, ranges = [0x00000001-0x00000002)[0x00000003-0x00000004) +# CHECK: Function: id = {0x0000002b}, name = "ranges", range = [0x0000000000000000-0x0000000000000004) +# CHECK: Blocks: id = {0x0000002b}, range = [0x00000000-0x00000004) +# CHECK-NEXT: id = {0x0000003f}, ranges = [0x00000001-0x00000002)[0x00000003-0x00000004) .text .p2align 12 diff --git a/lldb/test/Shell/SymbolFile/DWARF/debug_rnglists-dwo.s b/lldb/test/Shell/SymbolFile/DWARF/debug_rnglists-dwo.s --- a/lldb/test/Shell/SymbolFile/DWARF/debug_rnglists-dwo.s +++ b/lldb/test/Shell/SymbolFile/DWARF/debug_rnglists-dwo.s @@ -6,9 +6,9 @@ # RUN: -o exit | FileCheck %s # CHECK-LABEL: image lookup -v -s lookup_rnglists -# CHECK: Function: id = {0x00000028}, name = "rnglists", range = [0x0000000000000000-0x0000000000000003) -# CHECK: Blocks: id = {0x00000028}, range = [0x00000000-0x00000003) -# CHECK-NEXT: id = {0x00000037}, range = [0x00000001-0x00000002) +# CHECK: Function: id = {0x4000000000000028}, name = "rnglists", range = [0x0000000000000000-0x0000000000000003) +# CHECK: Blocks: id = {0x4000000000000028}, range = [0x00000000-0x00000003) +# CHECK-NEXT: id = {0x4000000000000037}, range = [0x00000001-0x00000002) .text rnglists: diff --git a/lldb/test/Shell/SymbolFile/DWARF/debug_rnglists.s b/lldb/test/Shell/SymbolFile/DWARF/debug_rnglists.s --- a/lldb/test/Shell/SymbolFile/DWARF/debug_rnglists.s +++ b/lldb/test/Shell/SymbolFile/DWARF/debug_rnglists.s @@ -5,14 +5,14 @@ # RUN: -o "image lookup -v -s lookup_rnglists2" -o exit | FileCheck %s # CHECK-LABEL: image lookup -v -s lookup_rnglists -# CHECK: Function: id = {0x7fffffff00000030}, name = "rnglists", range = [0x0000000000000000-0x0000000000000004) -# CHECK: Blocks: id = {0x7fffffff00000030}, range = [0x00000000-0x00000004) -# CHECK-NEXT: id = {0x7fffffff00000046}, ranges = [0x00000001-0x00000002)[0x00000003-0x00000004) +# CHECK: Function: id = {0x00000030}, name = "rnglists", range = [0x0000000000000000-0x0000000000000004) +# CHECK: Blocks: id = {0x00000030}, range = [0x00000000-0x00000004) +# CHECK-NEXT: id = {0x00000046}, ranges = [0x00000001-0x00000002)[0x00000003-0x00000004) # CHECK-LABEL: image lookup -v -s lookup_rnglists2 -# CHECK: Function: id = {0x7fffffff0000007a}, name = "rnglists2", range = [0x0000000000000004-0x0000000000000007) -# CHECK: Blocks: id = {0x7fffffff0000007a}, range = [0x00000004-0x00000007) -# CHECK-NEXT: id = {0x7fffffff00000091}, range = [0x00000005-0x00000007) +# CHECK: Function: id = {0x0000007a}, name = "rnglists2", range = [0x0000000000000004-0x0000000000000007) +# CHECK: Blocks: id = {0x0000007a}, range = [0x00000004-0x00000007) +# CHECK-NEXT: id = {0x00000091}, range = [0x00000005-0x00000007) .text .p2align 12 diff --git a/lldb/test/Shell/SymbolFile/DWARF/dwarf5_locations.s b/lldb/test/Shell/SymbolFile/DWARF/dwarf5_locations.s --- a/lldb/test/Shell/SymbolFile/DWARF/dwarf5_locations.s +++ b/lldb/test/Shell/SymbolFile/DWARF/dwarf5_locations.s @@ -6,7 +6,7 @@ # RUN: ld.lld -m elf_x86_64 %t.o -o %t # RUN: lldb-test symbols %t | FileCheck %s -# CHECK: Variable{0x7fffffff00000011}, name = "color" +# CHECK: Variable{0x00000011}, name = "color" # CHECK-SAME: location = DW_OP_addrx 0x0 .text diff --git a/lldb/test/Shell/SymbolFile/DWARF/dwp-debug-types.s b/lldb/test/Shell/SymbolFile/DWARF/dwp-debug-types.s --- a/lldb/test/Shell/SymbolFile/DWARF/dwp-debug-types.s +++ b/lldb/test/Shell/SymbolFile/DWARF/dwp-debug-types.s @@ -16,15 +16,15 @@ # Make sure each entity is present in the index only once. # SYMBOLS: Globals and statics: -# SYMBOLS-DAG: 3fffffff/INFO/00000023 "A" -# SYMBOLS-DAG: 3fffffff/INFO/0000005a "A" +# SYMBOLS-DAG: INFO/00000023 "A" +# SYMBOLS-DAG: INFO/0000005a "A" # SYMBOLS-EMPTY: # SYMBOLS: Types: -# SYMBOLS-DAG: 3fffffff/TYPE/00000018 "ENUM0" -# SYMBOLS-DAG: 3fffffff/TYPE/0000004d "ENUM1" -# SYMBOLS-DAG: 3fffffff/TYPE/0000002d "int" -# SYMBOLS-DAG: 3fffffff/TYPE/00000062 "int" +# SYMBOLS-DAG: TYPE/00000018 "ENUM0" +# SYMBOLS-DAG: TYPE/0000004d "ENUM1" +# SYMBOLS-DAG: TYPE/0000002d "int" +# SYMBOLS-DAG: TYPE/00000062 "int" # SYMBOLS-EMPTY: .ifdef MAIN