Index: lib/DebugInfo/DWARF/DWARFDebugLoc.cpp =================================================================== --- lib/DebugInfo/DWARF/DWARFDebugLoc.cpp +++ lib/DebugInfo/DWARF/DWARFDebugLoc.cpp @@ -158,7 +158,7 @@ switch (Kind) { case dwarf::DW_LLE_startx_length: E.Value0 = Data.getULEB128(Offset); - E.Value1 = Data.getU32(Offset); + E.Value1 = Data.getULEB128(Offset); break; case dwarf::DW_LLE_start_length: E.Value0 = Data.getAddress(Offset); Index: test/tools/llvm-dwarfdump/X86/debug_loc_dwo.s =================================================================== --- test/tools/llvm-dwarfdump/X86/debug_loc_dwo.s +++ test/tools/llvm-dwarfdump/X86/debug_loc_dwo.s @@ -14,7 +14,7 @@ # end_of_list), which is what llvm generates as well. .byte 3 # DW_LLE_startx_length .byte 0x01 # Index -.long 0x10 # Length +.uleb128 0x10 # Length .short 1 # Loc expr size .byte 85 # DW_OP_reg5 .byte 0 # DW_LLE_end_of_list