[Lldb-commits] [lldb] 0431e4b - Recommit "[DWARFYAML][debug_line] Replace `InitialLength` with `Format` and `Length`."

2020-06-13 Thread Xing GUO via lldb-commits

Author: Xing GUO
Date: 2020-06-13T23:39:11+08:00
New Revision: 0431e4bcb27bba30156ac49be4c09ac632c5a03a

URL: 
https://github.com/llvm/llvm-project/commit/0431e4bcb27bba30156ac49be4c09ac632c5a03a
DIFF: 
https://github.com/llvm/llvm-project/commit/0431e4bcb27bba30156ac49be4c09ac632c5a03a.diff

LOG: Recommit "[DWARFYAML][debug_line] Replace `InitialLength` with `Format` 
and `Length`."

This recommits fcc0c186e9cea0af644581069058f0e00469d20e

Added: 


Modified: 
lldb/unittests/Symbol/Inputs/inlined-functions.yaml
llvm/include/llvm/ObjectYAML/DWARFYAML.h
llvm/lib/ObjectYAML/DWARFEmitter.cpp
llvm/lib/ObjectYAML/DWARFYAML.cpp
llvm/test/ObjectYAML/MachO/DWARF-debug_info.yaml
llvm/test/ObjectYAML/MachO/DWARF-debug_line.yaml
llvm/test/ObjectYAML/MachO/DWARF5-debug_info.yaml
llvm/test/tools/llvm-gsymutil/ARM_AArch64/fat-macho-dwarf.yaml
llvm/test/tools/llvm-gsymutil/X86/mach-dwarf.yaml
llvm/test/tools/llvm-objcopy/MachO/Inputs/strip-all-with-dwarf.yaml
llvm/test/tools/yaml2obj/ELF/DWARF/debug-line.yaml
llvm/tools/obj2yaml/dwarf2yaml.cpp
llvm/unittests/DebugInfo/DWARF/DWARFDebugInfoTest.cpp
llvm/unittests/DebugInfo/GSYM/GSYMTest.cpp

Removed: 




diff  --git a/lldb/unittests/Symbol/Inputs/inlined-functions.yaml 
b/lldb/unittests/Symbol/Inputs/inlined-functions.yaml
index 16e437c48bf9..14573da3498d 100644
--- a/lldb/unittests/Symbol/Inputs/inlined-functions.yaml
+++ b/lldb/unittests/Symbol/Inputs/inlined-functions.yaml
@@ -713,8 +713,7 @@ DWARF:
 - AbbrCode:0x
   Values:  []
   debug_line:  
-- Length:  
-TotalLength: 202
+- Length:  202
   Version: 4
   PrologueLength:  45
   MinInstLength:   1

diff  --git a/llvm/include/llvm/ObjectYAML/DWARFYAML.h 
b/llvm/include/llvm/ObjectYAML/DWARFYAML.h
index 2f355b2a5b59..08b02691ffc1 100644
--- a/llvm/include/llvm/ObjectYAML/DWARFYAML.h
+++ b/llvm/include/llvm/ObjectYAML/DWARFYAML.h
@@ -144,7 +144,8 @@ struct LineTableOpcode {
 };
 
 struct LineTable {
-  InitialLength Length;
+  dwarf::DwarfFormat Format;
+  uint64_t Length;
   uint16_t Version;
   uint64_t PrologueLength;
   uint8_t MinInstLength;

diff  --git a/llvm/lib/ObjectYAML/DWARFEmitter.cpp 
b/llvm/lib/ObjectYAML/DWARFEmitter.cpp
index b496e2a09386..9ab6aa5aeafc 100644
--- a/llvm/lib/ObjectYAML/DWARFEmitter.cpp
+++ b/llvm/lib/ObjectYAML/DWARFEmitter.cpp
@@ -262,8 +262,9 @@ static void emitFileEntry(raw_ostream &OS, const 
DWARFYAML::File &File) {
 
 Error DWARFYAML::emitDebugLine(raw_ostream &OS, const DWARFYAML::Data &DI) {
   for (const auto &LineTable : DI.DebugLines) {
-writeInitialLength(LineTable.Length, OS, DI.IsLittleEndian);
-uint64_t SizeOfPrologueLength = LineTable.Length.isDWARF64() ? 8 : 4;
+writeInitialLength(LineTable.Format, LineTable.Length, OS,
+   DI.IsLittleEndian);
+uint64_t SizeOfPrologueLength = LineTable.Format == dwarf::DWARF64 ? 8 : 4;
 writeInteger((uint16_t)LineTable.Version, OS, DI.IsLittleEndian);
 writeVariableSizedInteger(LineTable.PrologueLength, SizeOfPrologueLength,
   OS, DI.IsLittleEndian);

diff  --git a/llvm/lib/ObjectYAML/DWARFYAML.cpp 
b/llvm/lib/ObjectYAML/DWARFYAML.cpp
index 257db357ca73..8298047d8be9 100644
--- a/llvm/lib/ObjectYAML/DWARFYAML.cpp
+++ b/llvm/lib/ObjectYAML/DWARFYAML.cpp
@@ -175,6 +175,7 @@ void MappingTraits::mapping(
 
 void MappingTraits::mapping(
 IO &IO, DWARFYAML::LineTable &LineTable) {
+  IO.mapOptional("Format", LineTable.Format, dwarf::DWARF32);
   IO.mapRequired("Length", LineTable.Length);
   IO.mapRequired("Version", LineTable.Version);
   IO.mapRequired("PrologueLength", LineTable.PrologueLength);

diff  --git a/llvm/test/ObjectYAML/MachO/DWARF-debug_info.yaml 
b/llvm/test/ObjectYAML/MachO/DWARF-debug_info.yaml
index 95f3eae597c2..af997b010b2d 100644
--- a/llvm/test/ObjectYAML/MachO/DWARF-debug_info.yaml
+++ b/llvm/test/ObjectYAML/MachO/DWARF-debug_info.yaml
@@ -453,8 +453,7 @@ DWARF:
 - AbbrCode:0x
   Values:  
   debug_line:  
-- Length:  
-TotalLength: 65
+- Length:  65
   Version: 2
   PrologueLength:  36
   MinInstLength:   1

diff  --git a/llvm/test/ObjectYAML/MachO/DWARF-debug_line.yaml 
b/llvm/test/ObjectYAML/MachO/DWARF-debug_line.yaml
index 5d17deb2fac2..d24fe7c8a4b8 100644
--- a/llvm/test/ObjectYAML/MachO/DWARF-debug_line.yaml
+++ b/llvm/test/ObjectYAML/MachO/DWARF-debug_line.yaml
@@ -492,8 +492,7 @@ DWARF:
 - AbbrCode:0x
   Values:  
   debug_line:  
-- Length:  
-TotalLength: 65
+- Length:  65
   Version: 2
   PrologueLength:  36
   MinInstLength:   1
@@ -534,8 +533,7 @@ DWARF:
 ...
 
 #CHECK:   debug_line:  
-#CH

[Lldb-commits] [lldb] 8a2ff19 - [lldb][test] Trying to fix build bot after 0431e4bcb27bba30156ac49be4c09ac632c5a03a

2020-06-13 Thread Xing GUO via lldb-commits

Author: Xing GUO
Date: 2020-06-13T23:53:13+08:00
New Revision: 8a2ff19272051cfd0ff906eafaee5372773bdbc7

URL: 
https://github.com/llvm/llvm-project/commit/8a2ff19272051cfd0ff906eafaee5372773bdbc7
DIFF: 
https://github.com/llvm/llvm-project/commit/8a2ff19272051cfd0ff906eafaee5372773bdbc7.diff

LOG: [lldb][test] Trying to fix build bot after 
0431e4bcb27bba30156ac49be4c09ac632c5a03a

Added: 


Modified: 
lldb/test/API/functionalities/source-map/a.yaml

Removed: 




diff  --git a/lldb/test/API/functionalities/source-map/a.yaml 
b/lldb/test/API/functionalities/source-map/a.yaml
index d14e9a3b8329..08fd9895d912 100644
--- a/lldb/test/API/functionalities/source-map/a.yaml
+++ b/lldb/test/API/functionalities/source-map/a.yaml
@@ -368,8 +368,7 @@ DWARF:
 - AbbrCode:0x
   Values:  []
   debug_line:  
-- Length:  
-TotalLength: 68
+- Length:  68
   Version: 4
   PrologueLength:  40
   MinInstLength:   1



___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits