Cleanup, rename and normalize patch serie
This commit is contained in:
parent
69b4e9a786
commit
1214bc7966
@ -1,24 +0,0 @@
|
||||
From 7ef45eab67114ce1ed136f0666f34aafd0dab89d Mon Sep 17 00:00:00 2001
|
||||
From: Tom Stellard <tstellar@redhat.com>
|
||||
Date: Tue, 14 Mar 2017 14:54:10 -0400
|
||||
Subject: [PATCH] Fix build with gcc 7
|
||||
|
||||
---
|
||||
include/lldb/Utility/TaskPool.h | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/include/lldb/Utility/TaskPool.h b/include/lldb/Utility/TaskPool.h
|
||||
index 3ad9c7c..bcd8186 100644
|
||||
--- a/include/lldb/Utility/TaskPool.h
|
||||
+++ b/include/lldb/Utility/TaskPool.h
|
||||
@@ -12,6 +12,7 @@
|
||||
|
||||
#include <cassert>
|
||||
#include <cstdint>
|
||||
+#include <functional>
|
||||
#include <future>
|
||||
#include <list>
|
||||
#include <queue>
|
||||
--
|
||||
1.8.3.1
|
||||
|
@ -1,35 +0,0 @@
|
||||
diff -ru lldb-8.0.0rc1.src.orig/lit/CMakeLists.txt lldb-8.0.0rc1.src/lit/CMakeLists.txt
|
||||
--- lldb-8.0.0rc1.src.orig/lit/CMakeLists.txt 2019-02-13 13:55:19.983186453 +0000
|
||||
+++ lldb-8.0.0rc1.src/lit/CMakeLists.txt 2019-02-13 13:58:01.783865287 +0000
|
||||
@@ -19,18 +19,23 @@
|
||||
|
||||
list(APPEND LLDB_TEST_DEPS
|
||||
LLDBUnitTests
|
||||
- dsymutil
|
||||
- llc
|
||||
lldb
|
||||
lldb-test
|
||||
- llvm-config
|
||||
- llvm-mc
|
||||
- llvm-objcopy
|
||||
- FileCheck
|
||||
- count
|
||||
- not
|
||||
)
|
||||
|
||||
+if (NOT LLDB_BUILT_STANDALONE)
|
||||
+ list(APPEND LLDB_TEST_DEPS
|
||||
+ dsymutil
|
||||
+ llc
|
||||
+ llvm-config
|
||||
+ llvm-mc
|
||||
+ llvm-objcopy
|
||||
+ FileCheck
|
||||
+ count
|
||||
+ not
|
||||
+ )
|
||||
+endif()
|
||||
+
|
||||
if(TARGET lld)
|
||||
list(APPEND LLDB_TEST_DEPS lld)
|
||||
endif()
|
26
0001-PATCH-lldb-Portable-asm-ptrace.h-include.patch
Normal file
26
0001-PATCH-lldb-Portable-asm-ptrace.h-include.patch
Normal file
@ -0,0 +1,26 @@
|
||||
From 6349965eccf12178cd4235e9f8996142d12ff607 Mon Sep 17 00:00:00 2001
|
||||
From: serge-sans-paille <sguelton@redhat.com>
|
||||
Date: Thu, 25 Feb 2021 14:27:43 +0100
|
||||
Subject: [PATCH 1/2] [PATCH][lldb] Portable asm/ptrace.h include
|
||||
|
||||
---
|
||||
lldb/source/Plugins/Process/Linux/NativeRegisterContextLinux_arm64.h | 3 ++-
|
||||
1 file changed, 2 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/lldb/source/Plugins/Process/Linux/NativeRegisterContextLinux_arm64.h b/lldb/source/Plugins/Process/Linux/NativeRegisterContextLinux_arm64.h
|
||||
index 344eae2..c483abc 100644
|
||||
--- a/lldb/source/Plugins/Process/Linux/NativeRegisterContextLinux_arm64.h
|
||||
+++ b/lldb/source/Plugins/Process/Linux/NativeRegisterContextLinux_arm64.h
|
||||
@@ -14,7 +14,8 @@
|
||||
#include "Plugins/Process/Linux/NativeRegisterContextLinux.h"
|
||||
#include "Plugins/Process/Utility/RegisterInfoPOSIX_arm64.h"
|
||||
|
||||
-#include <asm/ptrace.h>
|
||||
+#include <sys/ptrace.h>
|
||||
+#include <linux/ptrace.h>
|
||||
|
||||
namespace lldb_private {
|
||||
namespace process_linux {
|
||||
--
|
||||
1.8.3.1
|
||||
|
@ -1,321 +0,0 @@
|
||||
From 8f442727f2e8d6d426ae9cef42434ef538d1ed13 Mon Sep 17 00:00:00 2001
|
||||
From: Michal Gorny <mgorny@gentoo.org>
|
||||
Date: Fri, 4 Oct 2019 12:03:03 +0000
|
||||
Subject: [PATCH] [lldb] [cmake] Support linking against clang-cpp dylib
|
||||
|
||||
Link against clang-cpp dylib rather than split libs when
|
||||
CLANG_LINK_CLANG_DYLIB is enabled.
|
||||
|
||||
Differential Revision: https://reviews.llvm.org/D68456
|
||||
|
||||
llvm-svn: 373734
|
||||
---
|
||||
lldb/cmake/modules/AddLLDB.cmake | 15 +++++++++++++--
|
||||
lldb/source/Core/CMakeLists.txt | 4 +++-
|
||||
.../Plugins/ExpressionParser/Clang/CMakeLists.txt | 19 ++++++++++---------
|
||||
lldb/source/Plugins/Language/ObjC/CMakeLists.txt | 3 ++-
|
||||
.../ObjC/AppleObjCRuntime/CMakeLists.txt | 3 ++-
|
||||
.../RenderScript/RenderScriptRuntime/CMakeLists.txt | 3 ++-
|
||||
lldb/source/Plugins/Platform/MacOSX/CMakeLists.txt | 3 ++-
|
||||
lldb/source/Plugins/SymbolFile/DWARF/CMakeLists.txt | 5 +++--
|
||||
.../Plugins/SymbolFile/NativePDB/CMakeLists.txt | 5 +++--
|
||||
lldb/source/Plugins/SymbolFile/PDB/CMakeLists.txt | 7 ++++---
|
||||
lldb/source/Symbol/CMakeLists.txt | 8 +++++---
|
||||
lldb/tools/lldb-instr/CMakeLists.txt | 2 +-
|
||||
12 files changed, 50 insertions(+), 27 deletions(-)
|
||||
|
||||
diff --git a/lldb/cmake/modules/AddLLDB.cmake b/lldb/cmake/modules/AddLLDB.cmake
|
||||
index 4c99278..35a8097 100644
|
||||
--- a/lldb/cmake/modules/AddLLDB.cmake
|
||||
+++ b/lldb/cmake/modules/AddLLDB.cmake
|
||||
@@ -37,7 +37,7 @@ function(add_lldb_library name)
|
||||
cmake_parse_arguments(PARAM
|
||||
"MODULE;SHARED;STATIC;OBJECT;PLUGIN"
|
||||
"INSTALL_PREFIX;ENTITLEMENTS"
|
||||
- "EXTRA_CXXFLAGS;DEPENDS;LINK_LIBS;LINK_COMPONENTS"
|
||||
+ "EXTRA_CXXFLAGS;DEPENDS;LINK_LIBS;LINK_COMPONENTS;CLANG_LIBS"
|
||||
${ARGN})
|
||||
llvm_process_sources(srcs ${PARAM_UNPARSED_ARGUMENTS})
|
||||
list(APPEND LLVM_LINK_COMPONENTS ${PARAM_LINK_COMPONENTS})
|
||||
@@ -91,6 +91,12 @@ function(add_lldb_library name)
|
||||
${pass_ENTITLEMENTS}
|
||||
${pass_NO_INSTALL_RPATH}
|
||||
)
|
||||
+
|
||||
+ if(CLANG_LINK_CLANG_DYLIB)
|
||||
+ target_link_libraries(${name} PRIVATE clang-cpp)
|
||||
+ else()
|
||||
+ target_link_libraries(${name} PRIVATE ${PARAM_CLANG_LIBS})
|
||||
+ endif()
|
||||
endif()
|
||||
|
||||
if(PARAM_SHARED)
|
||||
@@ -132,7 +138,7 @@ function(add_lldb_executable name)
|
||||
cmake_parse_arguments(ARG
|
||||
"GENERATE_INSTALL"
|
||||
"INSTALL_PREFIX;ENTITLEMENTS"
|
||||
- "LINK_LIBS;LINK_COMPONENTS"
|
||||
+ "LINK_LIBS;CLANG_LIBS;LINK_COMPONENTS"
|
||||
${ARGN}
|
||||
)
|
||||
|
||||
@@ -152,6 +158,11 @@ function(add_lldb_executable name)
|
||||
)
|
||||
|
||||
target_link_libraries(${name} PRIVATE ${ARG_LINK_LIBS})
|
||||
+ if(CLANG_LINK_CLANG_DYLIB)
|
||||
+ target_link_libraries(${name} PRIVATE clang-cpp)
|
||||
+ else()
|
||||
+ target_link_libraries(${name} PRIVATE ${ARG_CLANG_LIBS})
|
||||
+ endif()
|
||||
set_target_properties(${name} PROPERTIES FOLDER "lldb executables")
|
||||
|
||||
if(ARG_GENERATE_INSTALL)
|
||||
diff --git a/lldb/source/Core/CMakeLists.txt b/lldb/source/Core/CMakeLists.txt
|
||||
index 7ca37f9..2e05fa3 100644
|
||||
--- a/lldb/source/Core/CMakeLists.txt
|
||||
+++ b/lldb/source/Core/CMakeLists.txt
|
||||
@@ -58,7 +58,6 @@ add_lldb_library(lldbCore
|
||||
ValueObjectVariable.cpp
|
||||
|
||||
LINK_LIBS
|
||||
- clangAST
|
||||
lldbBreakpoint
|
||||
lldbDataFormatters
|
||||
lldbExpression
|
||||
@@ -71,6 +70,9 @@ add_lldb_library(lldbCore
|
||||
lldbPluginObjCLanguage
|
||||
${LLDB_CURSES_LIBS}
|
||||
|
||||
+ CLANG_LIBS
|
||||
+ clangDriver
|
||||
+
|
||||
LINK_COMPONENTS
|
||||
Support
|
||||
Demangle
|
||||
diff --git a/lldb/source/Plugins/ExpressionParser/Clang/CMakeLists.txt b/lldb/source/Plugins/ExpressionParser/Clang/CMakeLists.txt
|
||||
index 950dae6..3fc1e0d 100644
|
||||
--- a/lldb/source/Plugins/ExpressionParser/Clang/CMakeLists.txt
|
||||
+++ b/lldb/source/Plugins/ExpressionParser/Clang/CMakeLists.txt
|
||||
@@ -25,6 +25,16 @@ add_lldb_library(lldbPluginExpressionParserClang PLUGIN
|
||||
${tablegen_deps}
|
||||
|
||||
LINK_LIBS
|
||||
+ lldbCore
|
||||
+ lldbExpression
|
||||
+ lldbHost
|
||||
+ lldbInterpreter
|
||||
+ lldbSymbol
|
||||
+ lldbTarget
|
||||
+ lldbUtility
|
||||
+ lldbPluginCPlusPlusLanguage
|
||||
+ lldbPluginCPPRuntime
|
||||
+ CLANG_LIBS
|
||||
clangAST
|
||||
clangCodeGen
|
||||
clangDriver
|
||||
@@ -36,15 +46,6 @@ add_lldb_library(lldbPluginExpressionParserClang PLUGIN
|
||||
clangRewriteFrontend
|
||||
clangSema
|
||||
clangSerialization
|
||||
- lldbCore
|
||||
- lldbExpression
|
||||
- lldbHost
|
||||
- lldbInterpreter
|
||||
- lldbSymbol
|
||||
- lldbTarget
|
||||
- lldbUtility
|
||||
- lldbPluginCPlusPlusLanguage
|
||||
- lldbPluginCPPRuntime
|
||||
LINK_COMPONENTS
|
||||
Core
|
||||
ExecutionEngine
|
||||
diff --git a/lldb/source/Plugins/Language/ObjC/CMakeLists.txt b/lldb/source/Plugins/Language/ObjC/CMakeLists.txt
|
||||
index afb68d4..ebb96c2 100644
|
||||
--- a/lldb/source/Plugins/Language/ObjC/CMakeLists.txt
|
||||
+++ b/lldb/source/Plugins/Language/ObjC/CMakeLists.txt
|
||||
@@ -22,7 +22,6 @@ add_lldb_library(lldbPluginObjCLanguage PLUGIN
|
||||
NSString.cpp
|
||||
|
||||
LINK_LIBS
|
||||
- clangAST
|
||||
lldbCore
|
||||
lldbDataFormatters
|
||||
lldbExpression
|
||||
@@ -32,6 +31,8 @@ add_lldb_library(lldbPluginObjCLanguage PLUGIN
|
||||
lldbUtility
|
||||
lldbPluginAppleObjCRuntime
|
||||
lldbPluginClangCommon
|
||||
+ CLANG_LIBS
|
||||
+ clangAST
|
||||
|
||||
EXTRA_CXXFLAGS ${EXTRA_CXXFLAGS}
|
||||
)
|
||||
diff --git a/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/CMakeLists.txt b/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/CMakeLists.txt
|
||||
index 29d9ba1..bcf3240 100644
|
||||
--- a/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/CMakeLists.txt
|
||||
+++ b/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/CMakeLists.txt
|
||||
@@ -9,7 +9,6 @@ add_lldb_library(lldbPluginAppleObjCRuntime PLUGIN
|
||||
AppleObjCTypeEncodingParser.cpp
|
||||
|
||||
LINK_LIBS
|
||||
- clangAST
|
||||
lldbBreakpoint
|
||||
lldbCore
|
||||
lldbExpression
|
||||
@@ -20,6 +19,8 @@ add_lldb_library(lldbPluginAppleObjCRuntime PLUGIN
|
||||
lldbUtility
|
||||
lldbPluginExpressionParserClang
|
||||
lldbPluginCPPRuntime
|
||||
+ CLANG_LIBS
|
||||
+ clangAST
|
||||
LINK_COMPONENTS
|
||||
Support
|
||||
)
|
||||
diff --git a/lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/CMakeLists.txt b/lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/CMakeLists.txt
|
||||
index 1a6c499..c122e09 100644
|
||||
--- a/lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/CMakeLists.txt
|
||||
+++ b/lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/CMakeLists.txt
|
||||
@@ -13,7 +13,6 @@ add_lldb_library(lldbPluginRenderScriptRuntime PLUGIN
|
||||
${tablegen_deps}
|
||||
|
||||
LINK_LIBS
|
||||
- clangBasic
|
||||
lldbBreakpoint
|
||||
lldbCore
|
||||
lldbDataFormatters
|
||||
@@ -22,6 +21,8 @@ add_lldb_library(lldbPluginRenderScriptRuntime PLUGIN
|
||||
lldbInterpreter
|
||||
lldbSymbol
|
||||
lldbTarget
|
||||
+ CLANG_LIBS
|
||||
+ clangBasic
|
||||
LINK_COMPONENTS
|
||||
Core
|
||||
IRReader
|
||||
diff --git a/lldb/source/Plugins/Platform/MacOSX/CMakeLists.txt b/lldb/source/Plugins/Platform/MacOSX/CMakeLists.txt
|
||||
index 6f0d952..dc04693 100644
|
||||
--- a/lldb/source/Plugins/Platform/MacOSX/CMakeLists.txt
|
||||
+++ b/lldb/source/Plugins/Platform/MacOSX/CMakeLists.txt
|
||||
@@ -31,7 +31,6 @@ add_lldb_library(lldbPluginPlatformMacOSX PLUGIN
|
||||
${PLUGIN_PLATFORM_MACOSX_SOURCES}
|
||||
|
||||
LINK_LIBS
|
||||
- clangBasic
|
||||
lldbBreakpoint
|
||||
lldbCore
|
||||
lldbHost
|
||||
@@ -41,6 +40,8 @@ add_lldb_library(lldbPluginPlatformMacOSX PLUGIN
|
||||
lldbUtility
|
||||
lldbPluginPlatformPOSIX
|
||||
${OBJC_LIBS}
|
||||
+ CLANG_LIBS
|
||||
+ clangBasic
|
||||
LINK_COMPONENTS
|
||||
Support
|
||||
)
|
||||
diff --git a/lldb/source/Plugins/SymbolFile/DWARF/CMakeLists.txt b/lldb/source/Plugins/SymbolFile/DWARF/CMakeLists.txt
|
||||
index cd588cb..69d2d21 100644
|
||||
--- a/lldb/source/Plugins/SymbolFile/DWARF/CMakeLists.txt
|
||||
+++ b/lldb/source/Plugins/SymbolFile/DWARF/CMakeLists.txt
|
||||
@@ -36,8 +36,6 @@ add_lldb_library(lldbPluginSymbolFileDWARF PLUGIN
|
||||
UniqueDWARFASTType.cpp
|
||||
|
||||
LINK_LIBS
|
||||
- clangAST
|
||||
- clangBasic
|
||||
lldbCore
|
||||
lldbExpression
|
||||
lldbHost
|
||||
@@ -48,6 +46,9 @@ add_lldb_library(lldbPluginSymbolFileDWARF PLUGIN
|
||||
lldbPluginObjCLanguage
|
||||
lldbPluginCPlusPlusLanguage
|
||||
lldbPluginExpressionParserClang
|
||||
+ CLANG_LIBS
|
||||
+ clangAST
|
||||
+ clangBasic
|
||||
LINK_COMPONENTS
|
||||
DebugInfoDWARF
|
||||
Support
|
||||
diff --git a/lldb/source/Plugins/SymbolFile/NativePDB/CMakeLists.txt b/lldb/source/Plugins/SymbolFile/NativePDB/CMakeLists.txt
|
||||
index 52b431d..aaecec4 100644
|
||||
--- a/lldb/source/Plugins/SymbolFile/NativePDB/CMakeLists.txt
|
||||
+++ b/lldb/source/Plugins/SymbolFile/NativePDB/CMakeLists.txt
|
||||
@@ -11,11 +11,12 @@ add_lldb_library(lldbPluginSymbolFileNativePDB PLUGIN
|
||||
UdtRecordCompleter.cpp
|
||||
|
||||
LINK_LIBS
|
||||
- clangAST
|
||||
- clangLex
|
||||
lldbCore
|
||||
lldbSymbol
|
||||
lldbUtility
|
||||
+ CLANG_LIBS
|
||||
+ clangAST
|
||||
+ clangLex
|
||||
LINK_COMPONENTS
|
||||
DebugInfoCodeView
|
||||
DebugInfoPDB
|
||||
diff --git a/lldb/source/Plugins/SymbolFile/PDB/CMakeLists.txt b/lldb/source/Plugins/SymbolFile/PDB/CMakeLists.txt
|
||||
index 64168d0..79bdce42 100644
|
||||
--- a/lldb/source/Plugins/SymbolFile/PDB/CMakeLists.txt
|
||||
+++ b/lldb/source/Plugins/SymbolFile/PDB/CMakeLists.txt
|
||||
@@ -4,12 +4,13 @@ add_lldb_library(lldbPluginSymbolFilePDB PLUGIN
|
||||
SymbolFilePDB.cpp
|
||||
|
||||
LINK_LIBS
|
||||
- clangAST
|
||||
- clangLex
|
||||
lldbCore
|
||||
+ lldbPluginSymbolFileNativePDB
|
||||
lldbSymbol
|
||||
lldbUtility
|
||||
- lldbPluginSymbolFileNativePDB
|
||||
+ CLANG_LIBS
|
||||
+ clangAST
|
||||
+ clangLex
|
||||
LINK_COMPONENTS
|
||||
DebugInfoPDB
|
||||
Support
|
||||
diff --git a/lldb/source/Symbol/CMakeLists.txt b/lldb/source/Symbol/CMakeLists.txt
|
||||
index 4b922c2..8614172 100644
|
||||
--- a/lldb/source/Symbol/CMakeLists.txt
|
||||
+++ b/lldb/source/Symbol/CMakeLists.txt
|
||||
@@ -47,9 +47,6 @@ add_lldb_library(lldbSymbol
|
||||
${PLATFORM_SOURCES}
|
||||
|
||||
LINK_LIBS
|
||||
- clangAST
|
||||
- clangBasic
|
||||
- clangFrontend
|
||||
lldbCore
|
||||
lldbExpression
|
||||
lldbHost
|
||||
@@ -61,6 +58,11 @@ add_lldb_library(lldbSymbol
|
||||
lldbPluginObjCLanguage
|
||||
lldbPluginObjCRuntime
|
||||
|
||||
+ CLANG_LIBS
|
||||
+ clangAST
|
||||
+ clangBasic
|
||||
+ clangFrontend
|
||||
+
|
||||
LINK_COMPONENTS
|
||||
Support
|
||||
)
|
||||
diff --git a/lldb/tools/lldb-instr/CMakeLists.txt b/lldb/tools/lldb-instr/CMakeLists.txt
|
||||
index e3dbeba..8da453b 100644
|
||||
--- a/lldb/tools/lldb-instr/CMakeLists.txt
|
||||
+++ b/lldb/tools/lldb-instr/CMakeLists.txt
|
||||
@@ -1,7 +1,7 @@
|
||||
add_lldb_tool(lldb-instr
|
||||
Instrument.cpp
|
||||
|
||||
- LINK_LIBS
|
||||
+ CLANG_LIBS
|
||||
clangAST
|
||||
clangBasic
|
||||
clangCodeGen
|
||||
--
|
||||
1.8.3.1
|
||||
|
131
0002-PATCH-lldb-Support-DWARF-5-DW_FORM_line_strp-used-by.patch
Normal file
131
0002-PATCH-lldb-Support-DWARF-5-DW_FORM_line_strp-used-by.patch
Normal file
@ -0,0 +1,131 @@
|
||||
From 2e94dca0c2cedf0bdbcf8517db2f3750ba95513b Mon Sep 17 00:00:00 2001
|
||||
From: serge-sans-paille <sguelton@redhat.com>
|
||||
Date: Tue, 2 Mar 2021 14:08:02 +0100
|
||||
Subject: [PATCH 2/2] [PATCH][lldb] Support DWARF-5 DW_FORM_line_strp (used by
|
||||
GCC)
|
||||
|
||||
---
|
||||
.../SymbolFile/DWARF/DWARFDebugInfoEntry.cpp | 1 +
|
||||
.../Plugins/SymbolFile/DWARF/DWARFFormValue.cpp | 73 +++++++++++-----------
|
||||
2 files changed, 39 insertions(+), 35 deletions(-)
|
||||
|
||||
diff --git a/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugInfoEntry.cpp b/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugInfoEntry.cpp
|
||||
index 4212988..bce2529 100644
|
||||
--- a/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugInfoEntry.cpp
|
||||
+++ b/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugInfoEntry.cpp
|
||||
@@ -173,6 +173,7 @@ bool DWARFDebugInfoEntry::Extract(const DWARFDataExtractor &data,
|
||||
break;
|
||||
|
||||
case DW_FORM_strp:
|
||||
+ case DW_FORM_line_strp:
|
||||
case DW_FORM_sec_offset:
|
||||
data.GetU32(&offset);
|
||||
break;
|
||||
diff --git a/lldb/source/Plugins/SymbolFile/DWARF/DWARFFormValue.cpp b/lldb/source/Plugins/SymbolFile/DWARF/DWARFFormValue.cpp
|
||||
index 305f1cb..ec78c5b 100644
|
||||
--- a/lldb/source/Plugins/SymbolFile/DWARF/DWARFFormValue.cpp
|
||||
+++ b/lldb/source/Plugins/SymbolFile/DWARF/DWARFFormValue.cpp
|
||||
@@ -150,40 +150,40 @@ struct FormSize {
|
||||
uint8_t valid:1, size:7;
|
||||
};
|
||||
static FormSize g_form_sizes[] = {
|
||||
- {0,0}, // 0x00 unused
|
||||
- {0,0}, // 0x01 DW_FORM_addr
|
||||
- {0,0}, // 0x02 unused
|
||||
- {0,0}, // 0x03 DW_FORM_block2
|
||||
- {0,0}, // 0x04 DW_FORM_block4
|
||||
- {1,2}, // 0x05 DW_FORM_data2
|
||||
- {1,4}, // 0x06 DW_FORM_data4
|
||||
- {1,8}, // 0x07 DW_FORM_data8
|
||||
- {0,0}, // 0x08 DW_FORM_string
|
||||
- {0,0}, // 0x09 DW_FORM_block
|
||||
- {0,0}, // 0x0a DW_FORM_block1
|
||||
- {1,1}, // 0x0b DW_FORM_data1
|
||||
- {1,1}, // 0x0c DW_FORM_flag
|
||||
- {0,0}, // 0x0d DW_FORM_sdata
|
||||
- {1,4}, // 0x0e DW_FORM_strp
|
||||
- {0,0}, // 0x0f DW_FORM_udata
|
||||
- {0,0}, // 0x10 DW_FORM_ref_addr (addr size for DWARF2 and earlier, 4 bytes for
|
||||
- // DWARF32, 8 bytes for DWARF32 in DWARF 3 and later
|
||||
- {1,1}, // 0x11 DW_FORM_ref1
|
||||
- {1,2}, // 0x12 DW_FORM_ref2
|
||||
- {1,4}, // 0x13 DW_FORM_ref4
|
||||
- {1,8}, // 0x14 DW_FORM_ref8
|
||||
- {0,0}, // 0x15 DW_FORM_ref_udata
|
||||
- {0,0}, // 0x16 DW_FORM_indirect
|
||||
- {1,4}, // 0x17 DW_FORM_sec_offset
|
||||
- {0,0}, // 0x18 DW_FORM_exprloc
|
||||
- {1,0}, // 0x19 DW_FORM_flag_present
|
||||
- {0,0}, // 0x1a
|
||||
- {0,0}, // 0x1b
|
||||
- {0,0}, // 0x1c
|
||||
- {0,0}, // 0x1d
|
||||
- {0,0}, // 0x1e
|
||||
- {0,0}, // 0x1f
|
||||
- {1,8}, // 0x20 DW_FORM_ref_sig8
|
||||
+ {0, 0}, // 0x00 unused
|
||||
+ {0, 0}, // 0x01 DW_FORM_addr
|
||||
+ {0, 0}, // 0x02 unused
|
||||
+ {0, 0}, // 0x03 DW_FORM_block2
|
||||
+ {0, 0}, // 0x04 DW_FORM_block4
|
||||
+ {1, 2}, // 0x05 DW_FORM_data2
|
||||
+ {1, 4}, // 0x06 DW_FORM_data4
|
||||
+ {1, 8}, // 0x07 DW_FORM_data8
|
||||
+ {0, 0}, // 0x08 DW_FORM_string
|
||||
+ {0, 0}, // 0x09 DW_FORM_block
|
||||
+ {0, 0}, // 0x0a DW_FORM_block1
|
||||
+ {1, 1}, // 0x0b DW_FORM_data1
|
||||
+ {1, 1}, // 0x0c DW_FORM_flag
|
||||
+ {0, 0}, // 0x0d DW_FORM_sdata
|
||||
+ {1, 4}, // 0x0e DW_FORM_strp
|
||||
+ {0, 0}, // 0x0f DW_FORM_udata
|
||||
+ {0, 0}, // 0x10 DW_FORM_ref_addr (addr size for DWARF2 and earlier, 4 bytes
|
||||
+ // for DWARF32, 8 bytes for DWARF32 in DWARF 3 and later
|
||||
+ {1, 1}, // 0x11 DW_FORM_ref1
|
||||
+ {1, 2}, // 0x12 DW_FORM_ref2
|
||||
+ {1, 4}, // 0x13 DW_FORM_ref4
|
||||
+ {1, 8}, // 0x14 DW_FORM_ref8
|
||||
+ {0, 0}, // 0x15 DW_FORM_ref_udata
|
||||
+ {0, 0}, // 0x16 DW_FORM_indirect
|
||||
+ {1, 4}, // 0x17 DW_FORM_sec_offset
|
||||
+ {0, 0}, // 0x18 DW_FORM_exprloc
|
||||
+ {1, 0}, // 0x19 DW_FORM_flag_present
|
||||
+ {0, 0}, // 0x1a DW_FORM_strx (ULEB128)
|
||||
+ {0, 0}, // 0x1b DW_FORM_addrx (ULEB128)
|
||||
+ {1, 4}, // 0x1c DW_FORM_ref_sup4
|
||||
+ {0, 0}, // 0x1d DW_FORM_strp_sup (4 bytes for DWARF32, 8 bytes for DWARF64)
|
||||
+ {1, 16}, // 0x1e DW_FORM_data16
|
||||
+ {1, 4}, // 0x1f DW_FORM_line_strp
|
||||
+ {1, 8}, // 0x20 DW_FORM_ref_sig8
|
||||
};
|
||||
|
||||
llvm::Optional<uint8_t>
|
||||
@@ -286,6 +286,7 @@ bool DWARFFormValue::SkipValue(dw_form_t form,
|
||||
// 32 bit for DWARF 32, 64 for DWARF 64
|
||||
case DW_FORM_sec_offset:
|
||||
case DW_FORM_strp:
|
||||
+ case DW_FORM_line_strp:
|
||||
*offset_ptr += 4;
|
||||
return true;
|
||||
|
||||
@@ -398,7 +399,8 @@ void DWARFFormValue::Dump(Stream &s) const {
|
||||
case DW_FORM_udata:
|
||||
s.PutULEB128(uvalue);
|
||||
break;
|
||||
- case DW_FORM_strp: {
|
||||
+ case DW_FORM_strp:
|
||||
+ case DW_FORM_line_strp: {
|
||||
const char *dbg_str = AsCString();
|
||||
if (dbg_str) {
|
||||
s.QuotedCString(dbg_str);
|
||||
@@ -606,6 +608,7 @@ bool DWARFFormValue::FormIsSupported(dw_form_t form) {
|
||||
case DW_FORM_flag:
|
||||
case DW_FORM_sdata:
|
||||
case DW_FORM_strp:
|
||||
+ case DW_FORM_line_strp:
|
||||
case DW_FORM_strx:
|
||||
case DW_FORM_strx1:
|
||||
case DW_FORM_strx2:
|
||||
--
|
||||
1.8.3.1
|
||||
|
3810
D15067.id41365.diff
3810
D15067.id41365.diff
File diff suppressed because it is too large
Load Diff
328
D97721.diff
328
D97721.diff
@ -1,328 +0,0 @@
|
||||
diff --git lldb-a/source/Plugins/SymbolFile/DWARF/DWARFDebugInfoEntry.cpp lldb-b/source/Plugins/SymbolFile/DWARF/DWARFDebugInfoEntry.cpp
|
||||
--- lldb-a/source/Plugins/SymbolFile/DWARF/DWARFDebugInfoEntry.cpp
|
||||
+++ lldb-b/source/Plugins/SymbolFile/DWARF/DWARFDebugInfoEntry.cpp
|
||||
@@ -173,6 +173,7 @@
|
||||
break;
|
||||
|
||||
case DW_FORM_strp:
|
||||
+ case DW_FORM_line_strp:
|
||||
case DW_FORM_sec_offset:
|
||||
data.GetU32(&offset);
|
||||
break;
|
||||
diff --git lldb-a/source/Plugins/SymbolFile/DWARF/DWARFFormValue.cpp lldb-b/source/Plugins/SymbolFile/DWARF/DWARFFormValue.cpp
|
||||
--- lldb-a/source/Plugins/SymbolFile/DWARF/DWARFFormValue.cpp
|
||||
+++ lldb-b/source/Plugins/SymbolFile/DWARF/DWARFFormValue.cpp
|
||||
@@ -150,40 +150,40 @@
|
||||
uint8_t valid:1, size:7;
|
||||
};
|
||||
static FormSize g_form_sizes[] = {
|
||||
- {0,0}, // 0x00 unused
|
||||
- {0,0}, // 0x01 DW_FORM_addr
|
||||
- {0,0}, // 0x02 unused
|
||||
- {0,0}, // 0x03 DW_FORM_block2
|
||||
- {0,0}, // 0x04 DW_FORM_block4
|
||||
- {1,2}, // 0x05 DW_FORM_data2
|
||||
- {1,4}, // 0x06 DW_FORM_data4
|
||||
- {1,8}, // 0x07 DW_FORM_data8
|
||||
- {0,0}, // 0x08 DW_FORM_string
|
||||
- {0,0}, // 0x09 DW_FORM_block
|
||||
- {0,0}, // 0x0a DW_FORM_block1
|
||||
- {1,1}, // 0x0b DW_FORM_data1
|
||||
- {1,1}, // 0x0c DW_FORM_flag
|
||||
- {0,0}, // 0x0d DW_FORM_sdata
|
||||
- {1,4}, // 0x0e DW_FORM_strp
|
||||
- {0,0}, // 0x0f DW_FORM_udata
|
||||
- {0,0}, // 0x10 DW_FORM_ref_addr (addr size for DWARF2 and earlier, 4 bytes for
|
||||
- // DWARF32, 8 bytes for DWARF32 in DWARF 3 and later
|
||||
- {1,1}, // 0x11 DW_FORM_ref1
|
||||
- {1,2}, // 0x12 DW_FORM_ref2
|
||||
- {1,4}, // 0x13 DW_FORM_ref4
|
||||
- {1,8}, // 0x14 DW_FORM_ref8
|
||||
- {0,0}, // 0x15 DW_FORM_ref_udata
|
||||
- {0,0}, // 0x16 DW_FORM_indirect
|
||||
- {1,4}, // 0x17 DW_FORM_sec_offset
|
||||
- {0,0}, // 0x18 DW_FORM_exprloc
|
||||
- {1,0}, // 0x19 DW_FORM_flag_present
|
||||
- {0,0}, // 0x1a
|
||||
- {0,0}, // 0x1b
|
||||
- {0,0}, // 0x1c
|
||||
- {0,0}, // 0x1d
|
||||
- {0,0}, // 0x1e
|
||||
- {0,0}, // 0x1f
|
||||
- {1,8}, // 0x20 DW_FORM_ref_sig8
|
||||
+ {0, 0}, // 0x00 unused
|
||||
+ {0, 0}, // 0x01 DW_FORM_addr
|
||||
+ {0, 0}, // 0x02 unused
|
||||
+ {0, 0}, // 0x03 DW_FORM_block2
|
||||
+ {0, 0}, // 0x04 DW_FORM_block4
|
||||
+ {1, 2}, // 0x05 DW_FORM_data2
|
||||
+ {1, 4}, // 0x06 DW_FORM_data4
|
||||
+ {1, 8}, // 0x07 DW_FORM_data8
|
||||
+ {0, 0}, // 0x08 DW_FORM_string
|
||||
+ {0, 0}, // 0x09 DW_FORM_block
|
||||
+ {0, 0}, // 0x0a DW_FORM_block1
|
||||
+ {1, 1}, // 0x0b DW_FORM_data1
|
||||
+ {1, 1}, // 0x0c DW_FORM_flag
|
||||
+ {0, 0}, // 0x0d DW_FORM_sdata
|
||||
+ {1, 4}, // 0x0e DW_FORM_strp
|
||||
+ {0, 0}, // 0x0f DW_FORM_udata
|
||||
+ {0, 0}, // 0x10 DW_FORM_ref_addr (addr size for DWARF2 and earlier, 4 bytes
|
||||
+ // for DWARF32, 8 bytes for DWARF32 in DWARF 3 and later
|
||||
+ {1, 1}, // 0x11 DW_FORM_ref1
|
||||
+ {1, 2}, // 0x12 DW_FORM_ref2
|
||||
+ {1, 4}, // 0x13 DW_FORM_ref4
|
||||
+ {1, 8}, // 0x14 DW_FORM_ref8
|
||||
+ {0, 0}, // 0x15 DW_FORM_ref_udata
|
||||
+ {0, 0}, // 0x16 DW_FORM_indirect
|
||||
+ {1, 4}, // 0x17 DW_FORM_sec_offset
|
||||
+ {0, 0}, // 0x18 DW_FORM_exprloc
|
||||
+ {1, 0}, // 0x19 DW_FORM_flag_present
|
||||
+ {0, 0}, // 0x1a DW_FORM_strx (ULEB128)
|
||||
+ {0, 0}, // 0x1b DW_FORM_addrx (ULEB128)
|
||||
+ {1, 4}, // 0x1c DW_FORM_ref_sup4
|
||||
+ {0, 0}, // 0x1d DW_FORM_strp_sup (4 bytes for DWARF32, 8 bytes for DWARF64)
|
||||
+ {1, 16}, // 0x1e DW_FORM_data16
|
||||
+ {1, 4}, // 0x1f DW_FORM_line_strp
|
||||
+ {1, 8}, // 0x20 DW_FORM_ref_sig8
|
||||
};
|
||||
|
||||
llvm::Optional<uint8_t>
|
||||
@@ -286,6 +286,7 @@
|
||||
// 32 bit for DWARF 32, 64 for DWARF 64
|
||||
case DW_FORM_sec_offset:
|
||||
case DW_FORM_strp:
|
||||
+ case DW_FORM_line_strp:
|
||||
*offset_ptr += 4;
|
||||
return true;
|
||||
|
||||
@@ -398,7 +399,8 @@
|
||||
case DW_FORM_udata:
|
||||
s.PutULEB128(uvalue);
|
||||
break;
|
||||
- case DW_FORM_strp: {
|
||||
+ case DW_FORM_strp:
|
||||
+ case DW_FORM_line_strp: {
|
||||
const char *dbg_str = AsCString();
|
||||
if (dbg_str) {
|
||||
s.QuotedCString(dbg_str);
|
||||
@@ -606,6 +608,7 @@
|
||||
case DW_FORM_flag:
|
||||
case DW_FORM_sdata:
|
||||
case DW_FORM_strp:
|
||||
+ case DW_FORM_line_strp:
|
||||
case DW_FORM_strx:
|
||||
case DW_FORM_strx1:
|
||||
case DW_FORM_strx2:
|
||||
diff --git lldb-a/test/Shell/SymbolFile/DWARF/dwarf5-line-strp.s lldb-b/test/Shell/SymbolFile/DWARF/dwarf5-line-strp.s
|
||||
new file mode 100755
|
||||
--- /dev/null
|
||||
+++ lldb-b/test/Shell/SymbolFile/DWARF/dwarf5-line-strp.s
|
||||
@@ -0,0 +1,207 @@
|
||||
+# Test handling of DWARF5 DW_FORM_line_strp from .debug_info as used by GCC.
|
||||
+
|
||||
+# REQUIRES: x86
|
||||
+
|
||||
+# RUN: llvm-mc -filetype=obj -o %t -triple x86_64-pc-linux %s
|
||||
+# RUN: %lldb %t -o "p main" \
|
||||
+# RUN: -o exit | FileCheck %s
|
||||
+
|
||||
+# CHECK: (int (*)()) $0 = 0x0000000000000000
|
||||
+
|
||||
+ .text
|
||||
+.Ltext0:
|
||||
+ .globl main
|
||||
+ .type main, @function
|
||||
+main:
|
||||
+.LFB0:
|
||||
+.LM1:
|
||||
+ .long 0
|
||||
+.LM2:
|
||||
+ .long 0
|
||||
+.LFE0:
|
||||
+ .size main, .-main
|
||||
+.Letext0:
|
||||
+ .section .debug_info,"",@progbits
|
||||
+.Ldebug_info0:
|
||||
+ .long 0x50 # Length of Compilation Unit Info
|
||||
+ .value 0x5 # DWARF version number
|
||||
+ .byte 0x1 # DW_UT_compile
|
||||
+ .byte 0x8 # Pointer Size (in bytes)
|
||||
+ .long .Ldebug_abbrev0 # Offset Into Abbrev. Section
|
||||
+ .uleb128 0x1 # (DIE (0xc) DW_TAG_compile_unit)
|
||||
+ .long .LASF2 # DW_AT_producer: "GNU C17 11.0.0 20210210 (Red Hat 11.0.0-0) -mtune=generic -march=x86-64 -gdwarf-5 -gno-as-loc-support"
|
||||
+ .byte 0x1d # DW_AT_language
|
||||
+ .long .LASF0 # DW_AT_name: "main.c"
|
||||
+ .long .LASF1 # DW_AT_comp_dir: ""
|
||||
+ .quad .Ltext0 # DW_AT_low_pc
|
||||
+ .quad .Letext0-.Ltext0 # DW_AT_high_pc
|
||||
+ .long .Ldebug_line0 # DW_AT_stmt_list
|
||||
+ .uleb128 0x2 # (DIE (0x2e) DW_TAG_subprogram)
|
||||
+ # DW_AT_external
|
||||
+ .long .LASF3 # DW_AT_name: "main"
|
||||
+ .byte 0x1 # DW_AT_decl_file (main.c)
|
||||
+ .byte 0x1 # DW_AT_decl_line
|
||||
+ .byte 0x5 # DW_AT_decl_column
|
||||
+ .long 0x4c # DW_AT_type
|
||||
+ .quad .LFB0 # DW_AT_low_pc
|
||||
+ .quad .LFE0-.LFB0 # DW_AT_high_pc
|
||||
+ .uleb128 0x1 # DW_AT_frame_base
|
||||
+ .byte 0x9c # DW_OP_call_frame_cfa
|
||||
+ # DW_AT_call_all_calls
|
||||
+ .uleb128 0x3 # (DIE (0x4c) DW_TAG_base_type)
|
||||
+ .byte 0x4 # DW_AT_byte_size
|
||||
+ .byte 0x5 # DW_AT_encoding
|
||||
+ .ascii "int\0" # DW_AT_name
|
||||
+ .byte 0 # end of children of DIE 0xc
|
||||
+ .section .debug_abbrev,"",@progbits
|
||||
+.Ldebug_abbrev0:
|
||||
+ .uleb128 0x1 # (abbrev code)
|
||||
+ .uleb128 0x11 # (TAG: DW_TAG_compile_unit)
|
||||
+ .byte 0x1 # DW_children_yes
|
||||
+ .uleb128 0x25 # (DW_AT_producer)
|
||||
+ .uleb128 0xe # (DW_FORM_strp)
|
||||
+ .uleb128 0x13 # (DW_AT_language)
|
||||
+ .uleb128 0xb # (DW_FORM_data1)
|
||||
+ .uleb128 0x3 # (DW_AT_name)
|
||||
+ .uleb128 0x1f # (DW_FORM_line_strp)
|
||||
+ .uleb128 0x1b # (DW_AT_comp_dir)
|
||||
+ .uleb128 0x1f # (DW_FORM_line_strp)
|
||||
+ .uleb128 0x11 # (DW_AT_low_pc)
|
||||
+ .uleb128 0x1 # (DW_FORM_addr)
|
||||
+ .uleb128 0x12 # (DW_AT_high_pc)
|
||||
+ .uleb128 0x7 # (DW_FORM_data8)
|
||||
+ .uleb128 0x10 # (DW_AT_stmt_list)
|
||||
+ .uleb128 0x17 # (DW_FORM_sec_offset)
|
||||
+ .byte 0
|
||||
+ .byte 0
|
||||
+ .uleb128 0x2 # (abbrev code)
|
||||
+ .uleb128 0x2e # (TAG: DW_TAG_subprogram)
|
||||
+ .byte 0 # DW_children_no
|
||||
+ .uleb128 0x3f # (DW_AT_external)
|
||||
+ .uleb128 0x19 # (DW_FORM_flag_present)
|
||||
+ .uleb128 0x3 # (DW_AT_name)
|
||||
+ .uleb128 0xe # (DW_FORM_strp)
|
||||
+ .uleb128 0x3a # (DW_AT_decl_file)
|
||||
+ .uleb128 0xb # (DW_FORM_data1)
|
||||
+ .uleb128 0x3b # (DW_AT_decl_line)
|
||||
+ .uleb128 0xb # (DW_FORM_data1)
|
||||
+ .uleb128 0x39 # (DW_AT_decl_column)
|
||||
+ .uleb128 0xb # (DW_FORM_data1)
|
||||
+ .uleb128 0x49 # (DW_AT_type)
|
||||
+ .uleb128 0x13 # (DW_FORM_ref4)
|
||||
+ .uleb128 0x11 # (DW_AT_low_pc)
|
||||
+ .uleb128 0x1 # (DW_FORM_addr)
|
||||
+ .uleb128 0x12 # (DW_AT_high_pc)
|
||||
+ .uleb128 0x7 # (DW_FORM_data8)
|
||||
+ .uleb128 0x40 # (DW_AT_frame_base)
|
||||
+ .uleb128 0x18 # (DW_FORM_exprloc)
|
||||
+ .uleb128 0x7a # (DW_AT_call_all_calls)
|
||||
+ .uleb128 0x19 # (DW_FORM_flag_present)
|
||||
+ .byte 0
|
||||
+ .byte 0
|
||||
+ .uleb128 0x3 # (abbrev code)
|
||||
+ .uleb128 0x24 # (TAG: DW_TAG_base_type)
|
||||
+ .byte 0 # DW_children_no
|
||||
+ .uleb128 0xb # (DW_AT_byte_size)
|
||||
+ .uleb128 0xb # (DW_FORM_data1)
|
||||
+ .uleb128 0x3e # (DW_AT_encoding)
|
||||
+ .uleb128 0xb # (DW_FORM_data1)
|
||||
+ .uleb128 0x3 # (DW_AT_name)
|
||||
+ .uleb128 0x8 # (DW_FORM_string)
|
||||
+ .byte 0
|
||||
+ .byte 0
|
||||
+ .byte 0
|
||||
+ .section .debug_aranges,"",@progbits
|
||||
+ .long 0x2c # Length of Address Ranges Info
|
||||
+ .value 0x2 # DWARF aranges version
|
||||
+ .long .Ldebug_info0 # Offset of Compilation Unit Info
|
||||
+ .byte 0x8 # Size of Address
|
||||
+ .byte 0 # Size of Segment Descriptor
|
||||
+ .value 0 # Pad to 16 byte boundary
|
||||
+ .value 0
|
||||
+ .quad .Ltext0 # Address
|
||||
+ .quad .Letext0-.Ltext0 # Length
|
||||
+ .quad 0
|
||||
+ .quad 0
|
||||
+ .section .debug_line,"",@progbits
|
||||
+.Ldebug_line0:
|
||||
+ .long .LELT0-.LSLT0 # Length of Source Line Info
|
||||
+.LSLT0:
|
||||
+ .value 0x5 # DWARF version number
|
||||
+ .byte 0x8 # Address Size
|
||||
+ .byte 0 # Segment Size
|
||||
+ .long .LELTP0-.LASLTP0 # Prolog Length
|
||||
+.LASLTP0:
|
||||
+ .byte 0x1 # Minimum Instruction Length
|
||||
+ .byte 0x1 # Maximum Operations Per Instruction
|
||||
+ .byte 0x1 # Default is_stmt_start flag
|
||||
+ .byte 0xf6 # Line Base Value (Special Opcodes)
|
||||
+ .byte 0xf2 # Line Range Value (Special Opcodes)
|
||||
+ .byte 0xd # Special Opcode Base
|
||||
+ .byte 0 # opcode: 0x1 has 0 args
|
||||
+ .byte 0x1 # opcode: 0x2 has 1 args
|
||||
+ .byte 0x1 # opcode: 0x3 has 1 args
|
||||
+ .byte 0x1 # opcode: 0x4 has 1 args
|
||||
+ .byte 0x1 # opcode: 0x5 has 1 args
|
||||
+ .byte 0 # opcode: 0x6 has 0 args
|
||||
+ .byte 0 # opcode: 0x7 has 0 args
|
||||
+ .byte 0 # opcode: 0x8 has 0 args
|
||||
+ .byte 0x1 # opcode: 0x9 has 1 args
|
||||
+ .byte 0 # opcode: 0xa has 0 args
|
||||
+ .byte 0 # opcode: 0xb has 0 args
|
||||
+ .byte 0x1 # opcode: 0xc has 1 args
|
||||
+ .byte 0x1 # Directory entry format count
|
||||
+ .uleb128 0x1 # DW_LNCT_path
|
||||
+ .uleb128 0x1f # DW_FORM_line_strp
|
||||
+ .uleb128 0x2 # Directories count
|
||||
+ .long .LASF1 # Directory Entry: 0: ""
|
||||
+ .long .LASF4 # Directory Entry: 0: ""
|
||||
+ .byte 0x2 # File name entry format count
|
||||
+ .uleb128 0x1 # DW_LNCT_path
|
||||
+ .uleb128 0x1f # DW_FORM_line_strp
|
||||
+ .uleb128 0x2 # DW_LNCT_directory_index
|
||||
+ .uleb128 0xb # DW_FORM_data1
|
||||
+ .uleb128 0x2 # File names count
|
||||
+ .long .LASF0 # File Entry: 0: "main.c"
|
||||
+ .byte 0
|
||||
+ .long .LASF5 # File Entry: 0: "main.c"
|
||||
+ .byte 0x1
|
||||
+.LELTP0:
|
||||
+ .byte 0 # set address *.LM1
|
||||
+ .uleb128 0x9
|
||||
+ .byte 0x2
|
||||
+ .quad .LM1
|
||||
+ .byte 0x1 # copy line 1
|
||||
+ .byte 0x5 # column 12
|
||||
+ .uleb128 0xc # 12
|
||||
+ .byte 0 # set address *.LM2
|
||||
+ .uleb128 0x9
|
||||
+ .byte 0x2
|
||||
+ .quad .LM2
|
||||
+ .byte 0x1 # copy line 1
|
||||
+ .byte 0x5 # column 13
|
||||
+ .uleb128 0xd # 13
|
||||
+ .byte 0 # set address *.Letext0
|
||||
+ .uleb128 0x9
|
||||
+ .byte 0x2
|
||||
+ .quad .Letext0
|
||||
+ .byte 0 # end sequence
|
||||
+ .uleb128 0x1
|
||||
+ .byte 0x1
|
||||
+.LELT0:
|
||||
+ .section .debug_str,"MS",@progbits,1
|
||||
+.LASF2:
|
||||
+ .string "GNU C17 11.0.0 20210210 (Red Hat 11.0.0-0) -mtune=generic -march=x86-64 -gdwarf-5 -gno-as-loc-support"
|
||||
+.LASF3:
|
||||
+ .string "main"
|
||||
+ .section .debug_line_str,"MS",@progbits,1
|
||||
+.LASF1:
|
||||
+ .string ""
|
||||
+.LASF4:
|
||||
+ .string ""
|
||||
+.LASF0:
|
||||
+ .string "main.c"
|
||||
+.LASF5:
|
||||
+ .string "main.c"
|
||||
+ .ident "GCC: (GNU) 11.0.0 20210210 (Red Hat 11.0.0-0)"
|
||||
+ .section .note.GNU-stack,"",@progbits
|
||||
|
BIN
asm-ptrace.patch
BIN
asm-ptrace.patch
Binary file not shown.
@ -35,8 +35,8 @@ Requires: python3-lldb
|
||||
# For origin certification
|
||||
BuildRequires: gnupg2
|
||||
|
||||
Patch0: asm-ptrace.patch
|
||||
Patch1: D97721.diff
|
||||
Patch0: 0001-PATCH-lldb-Portable-asm-ptrace.h-include.patch
|
||||
Patch1: 0002-PATCH-lldb-Support-DWARF-5-DW_FORM_line_strp-used-by.patch
|
||||
|
||||
%description
|
||||
LLDB is a next generation, high-performance debugger. It is built as a set
|
||||
@ -63,7 +63,7 @@ The package contains the LLDB Python module.
|
||||
|
||||
%prep
|
||||
%{gpgverify} --keyring='%{SOURCE2}' --signature='%{SOURCE1}' --data='%{SOURCE0}'
|
||||
%autosetup -n %{lldb_srcdir} -p1
|
||||
%autosetup -n %{lldb_srcdir} -p2
|
||||
|
||||
%build
|
||||
|
||||
|
@ -1,92 +0,0 @@
|
||||
commit 9ad9480c3a380a04b3dbe869c0675d6bba37247b
|
||||
Author: Kamil Rytarowski <n54@gmx.com>
|
||||
Date: Thu May 25 20:12:30 2017 +0000
|
||||
|
||||
Fix bug #28898
|
||||
lldb: libedit produces garbled, unusable input on Linux
|
||||
|
||||
Apply patch from Christos Zoulas, upstream libedit developer.
|
||||
It has been tested on NetBSD/amd64.
|
||||
|
||||
New code supports combination of wide libedit and disabled
|
||||
LLDB_EDITLINE_USE_WCHAR, which was the popular case on Linux
|
||||
systems.
|
||||
|
||||
|
||||
git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@303907 91177308-0d34-0410-b5e6-96231b3b80d8
|
||||
|
||||
diff --git a/include/lldb/Host/Editline.h b/include/lldb/Host/Editline.h
|
||||
index 2b1a8e0..0b75e9c 100644
|
||||
--- a/include/lldb/Host/Editline.h
|
||||
+++ b/include/lldb/Host/Editline.h
|
||||
@@ -82,8 +82,14 @@ using EditLineStringStreamType = std::stringstream;
|
||||
using EditLineCharType = char;
|
||||
#endif
|
||||
|
||||
+#ifdef EL_CLIENTDATA /* editline with wide support + wide char read function */
|
||||
+using EditLineGetCharType = wchar_t;
|
||||
+#else
|
||||
+using EditLineGetCharType = char;
|
||||
+#endif
|
||||
+
|
||||
typedef int (*EditlineGetCharCallbackType)(::EditLine *editline,
|
||||
- EditLineCharType *c);
|
||||
+ EditLineGetCharType *c);
|
||||
typedef unsigned char (*EditlineCommandCallbackType)(::EditLine *editline,
|
||||
int ch);
|
||||
typedef const char *(*EditlinePromptCallbackType)(::EditLine *editline);
|
||||
@@ -270,7 +276,7 @@ private:
|
||||
|
||||
/// Character reading implementation for EditLine that supports our multi-line
|
||||
/// editing trickery.
|
||||
- int GetCharacter(EditLineCharType *c);
|
||||
+ int GetCharacter(EditLineGetCharType *c);
|
||||
|
||||
/// Prompt implementation for EditLine.
|
||||
const char *Prompt();
|
||||
@@ -323,7 +329,7 @@ private:
|
||||
/// single or multi-line editing.
|
||||
void ConfigureEditor(bool multiline);
|
||||
|
||||
- bool CompleteCharacter(char ch, EditLineCharType &out);
|
||||
+ bool CompleteCharacter(char ch, EditLineGetCharType &out);
|
||||
|
||||
private:
|
||||
#if LLDB_EDITLINE_USE_WCHAR
|
||||
diff --git a/source/Host/common/Editline.cpp b/source/Host/common/Editline.cpp
|
||||
index 7d4b398..7b580dd 100644
|
||||
--- a/source/Host/common/Editline.cpp
|
||||
+++ b/source/Host/common/Editline.cpp
|
||||
@@ -474,7 +474,7 @@ unsigned char Editline::RecallHistory(bool earlier) {
|
||||
return CC_NEWLINE;
|
||||
}
|
||||
|
||||
-int Editline::GetCharacter(EditLineCharType *c) {
|
||||
+int Editline::GetCharacter(EditLineGetCharType *c) {
|
||||
const LineInfoW *info = el_wline(m_editline);
|
||||
|
||||
// Paint a faint version of the desired prompt over the version libedit draws
|
||||
@@ -969,7 +969,7 @@ void Editline::ConfigureEditor(bool multiline) {
|
||||
}));
|
||||
|
||||
el_wset(m_editline, EL_GETCFN, (EditlineGetCharCallbackType)([](
|
||||
- EditLine *editline, EditLineCharType *c) {
|
||||
+ EditLine *editline, EditLineGetCharType *c) {
|
||||
return Editline::InstanceFor(editline)->GetCharacter(c);
|
||||
}));
|
||||
|
||||
@@ -1360,12 +1360,12 @@ void Editline::PrintAsync(Stream *stream, const char *s, size_t len) {
|
||||
}
|
||||
}
|
||||
|
||||
-bool Editline::CompleteCharacter(char ch, EditLineCharType &out) {
|
||||
+bool Editline::CompleteCharacter(char ch, EditLineGetCharType &out) {
|
||||
#if !LLDB_EDITLINE_USE_WCHAR
|
||||
if (ch == (char)EOF)
|
||||
return false;
|
||||
|
||||
- out = ch;
|
||||
+ out = (unsigned char)ch;
|
||||
return true;
|
||||
#else
|
||||
std::codecvt_utf8<wchar_t> cvt;
|
Loading…
Reference in New Issue
Block a user