[Lldb-commits] [lldb] [lldb][ElfCore] Improve main executable detection in core files (PR #157170)
    via lldb-commits 
    lldb-commits at lists.llvm.org
       
    Wed Sep 10 12:23:32 PDT 2025
    
    
  
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 origin/main HEAD --extensions cpp,h -- lldb/source/Plugins/Process/elf-core/ProcessElfCore.cpp lldb/source/Plugins/Process/elf-core/ProcessElfCore.h
``````````
:warning:
The reproduction instructions above might return results for more than one PR
in a stack if you are using a stacked PR workflow. You can limit the results by
changing `origin/main` to the base branch/commit you want to compare against.
:warning:
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/lldb/source/Plugins/Process/elf-core/ProcessElfCore.cpp b/lldb/source/Plugins/Process/elf-core/ProcessElfCore.cpp
index 46b2e3e2e..e083647fd 100644
--- a/lldb/source/Plugins/Process/elf-core/ProcessElfCore.cpp
+++ b/lldb/source/Plugins/Process/elf-core/ProcessElfCore.cpp
@@ -295,8 +295,7 @@ llvm::StringRef ProcessElfCore::GetMainExecutablePath() {
   llvm::StringRef executable_path = m_nt_file_entries[0].path;
   // Prefer the NT_FILE entry matching m_executable_name as main executable.
   for (const NT_FILE_Entry &file_entry : m_nt_file_entries)
-    if (llvm::StringRef(file_entry.path)
-            .ends_with("/" + m_executable_name)) {
+    if (llvm::StringRef(file_entry.path).ends_with("/" + m_executable_name)) {
       executable_path = file_entry.path;
       break;
     }
``````````
</details>
https://github.com/llvm/llvm-project/pull/157170
    
    
More information about the lldb-commits
mailing list