[Lldb-commits] [lldb] Impove ObjectFileELF's .dynamic parsing and usage. (PR #101237)
via lldb-commits
lldb-commits at lists.llvm.org
Tue Jul 30 13:48:39 PDT 2024
github-actions[bot] wrote:
<!--LLVM CODE FORMAT COMMENT: {clang-format}-->
:warning: C/C++ code formatter, clang-format found issues in your code. :warning:
<details>
<summary>
You can test this locally with the following command:
</summary>
``````````bash
git-clang-format --diff bee2654300a8f524e05dd4cad41411d597246ac0 6ef64acd518afe8bdc42c5042f35c857be96e3b4 --extensions cpp,h -- lldb/test/Shell/ObjectFile/ELF/Inputs/memory-elf.cpp lldb/include/lldb/Target/Process.h lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.h lldb/source/Target/Process.cpp
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp b/lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp
index becee73f96..ee891a5182 100644
--- a/lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp
+++ b/lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp
@@ -3208,7 +3208,7 @@ void ObjectFileELF::Dump(Stream *s) {
DumpDependentModules(s);
s->EOL();
DumpELFDynamic(s);
- s->EOL();
+ s->EOL();
}
// DumpELFHeader
@@ -3797,8 +3797,8 @@ std::optional<DataExtractor> ObjectFileELF::GetDynstrData() {
if (section_list) {
// Find the SHT_DYNAMIC section.
Section *dynamic =
- section_list->FindSectionByType(eSectionTypeELFDynamicLinkInfo, true)
- .get();
+ section_list->FindSectionByType(eSectionTypeELFDynamicLinkInfo, true)
+ .get();
if (dynamic) {
assert(dynamic->GetObjectFile() == this);
const ELFSectionHeaderInfo *header =
diff --git a/lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.h b/lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.h
index cb38830197..ae2025ba2c 100644
--- a/lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.h
+++ b/lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.h
@@ -436,8 +436,6 @@ private:
/// \return The bytes that represent the string table data or \c std::nullopt
/// if an error occured.
std::optional<lldb_private::DataExtractor> GetDynstrData();
-
-
};
#endif // LLDB_SOURCE_PLUGINS_OBJECTFILE_ELF_OBJECTFILEELF_H
diff --git a/lldb/test/Shell/ObjectFile/ELF/Inputs/memory-elf.cpp b/lldb/test/Shell/ObjectFile/ELF/Inputs/memory-elf.cpp
index f4162a4a1d..9cae6c99c9 100644
--- a/lldb/test/Shell/ObjectFile/ELF/Inputs/memory-elf.cpp
+++ b/lldb/test/Shell/ObjectFile/ELF/Inputs/memory-elf.cpp
@@ -3,4 +3,3 @@ int main() {
printf("Hello World\n"); // Use something from libc.so
return 0;
}
-
``````````
</details>
https://github.com/llvm/llvm-project/pull/101237
More information about the lldb-commits
mailing list