[Lldb-commits] [lldb] [LLDB] Unify DWARF section name matching (PR #141344)

2025-05-24 Thread via lldb-commits

https://github.com/Nerixyz created 
https://github.com/llvm/llvm-project/pull/141344

Different object file formats support DWARF sections (COFF, ELF, MachO, 
PE/COFF, WASM). COFF and PE/COFF only matched a subset. This caused some GCC 
executables produced on MinGW to have issue later on when debugging. One 
example is that `.debug_rnglists` was not matched, which caused 
range-extraction to fail when printing a backtrace.

This unifies the parsing of section names in 
`ObjectFile::GetDWARFSectionTypeFromName`, so all file formats can use the same 
naming convention. Since the prefixes are different, 
`GetDWARFSectionTypeFromName` only matches the suffixes (i.e. `.debug_` needs 
to be stripped before).

I added two tests to ensure the sections are correctly identified on Windows 
executables.

>From c73f33387be017525772cb7bd056acafa615a881 Mon Sep 17 00:00:00 2001
From: Nerixyz 
Date: Sat, 24 May 2025 14:29:49 +0200
Subject: [PATCH] [LLDB] Unify DWARF section name matching

---
 lldb/include/lldb/Symbol/ObjectFile.h |   7 +
 .../ObjectFile/COFF/ObjectFileCOFF.cpp|  22 ++-
 .../Plugins/ObjectFile/ELF/ObjectFileELF.cpp  |  36 +
 .../ObjectFile/Mach-O/ObjectFileMachO.cpp |  88 +-
 .../ObjectFile/PECOFF/ObjectFilePECOFF.cpp|  17 +-
 .../ObjectFile/wasm/ObjectFileWasm.cpp|  32 +---
 lldb/source/Symbol/ObjectFile.cpp |  35 
 .../Shell/ObjectFile/PECOFF/dwarf-clang.yaml  | 151 ++
 .../ObjectFile/PECOFF/dwarf-gcc-mingw.yaml| 151 ++
 9 files changed, 364 insertions(+), 175 deletions(-)
 create mode 100644 lldb/test/Shell/ObjectFile/PECOFF/dwarf-clang.yaml
 create mode 100644 lldb/test/Shell/ObjectFile/PECOFF/dwarf-gcc-mingw.yaml

diff --git a/lldb/include/lldb/Symbol/ObjectFile.h 
b/lldb/include/lldb/Symbol/ObjectFile.h
index 7fca6383fa9f3..43567592dd447 100644
--- a/lldb/include/lldb/Symbol/ObjectFile.h
+++ b/lldb/include/lldb/Symbol/ObjectFile.h
@@ -709,6 +709,13 @@ class ObjectFile : public 
std::enable_shared_from_this,
   llvm::StringRef name,
   lldb::SymbolType symbol_type_hint = lldb::eSymbolTypeUndefined);
 
+  /// Parses the section type from a section name for DWARF sections.
+  ///
+  /// The \a name must be stripped of the default prefix (e.g. ".debug_" or
+  /// "__debug_"). If there's no matching section type, \a eSectionTypeOther
+  /// will be returned.
+  static lldb::SectionType GetDWARFSectionTypeFromName(llvm::StringRef name);
+
   /// Loads this objfile to memory.
   ///
   /// Loads the bits needed to create an executable image to the memory. It is
diff --git a/lldb/source/Plugins/ObjectFile/COFF/ObjectFileCOFF.cpp 
b/lldb/source/Plugins/ObjectFile/COFF/ObjectFileCOFF.cpp
index a7ad5d27b237f..1121f696637b6 100644
--- a/lldb/source/Plugins/ObjectFile/COFF/ObjectFileCOFF.cpp
+++ b/lldb/source/Plugins/ObjectFile/COFF/ObjectFileCOFF.cpp
@@ -191,19 +191,15 @@ void 
ObjectFileCOFF::CreateSections(lldb_private::SectionList §ions) {
 
   auto SectionType = [](StringRef Name,
 const coff_section *Section) -> lldb::SectionType {
-lldb::SectionType type =
-StringSwitch(Name)
-// DWARF Debug Sections
-.Case(".debug_abbrev", eSectionTypeDWARFDebugAbbrev)
-.Case(".debug_info", eSectionTypeDWARFDebugInfo)
-.Case(".debug_line", eSectionTypeDWARFDebugLine)
-.Case(".debug_pubnames", eSectionTypeDWARFDebugPubNames)
-.Case(".debug_pubtypes", eSectionTypeDWARFDebugPubTypes)
-.Case(".debug_str", eSectionTypeDWARFDebugStr)
-// CodeView Debug Sections: .debug$S, .debug$T
-.StartsWith(".debug$", eSectionTypeDebug)
-.Case("clangast", eSectionTypeOther)
-.Default(eSectionTypeInvalid);
+// DWARF Debug Sections
+if (Name.consume_front(".debug_"))
+  return GetDWARFSectionTypeFromName(Name);
+
+lldb::SectionType type = StringSwitch(Name)
+ // CodeView Debug Sections: .debug$S, .debug$T
+ .StartsWith(".debug$", eSectionTypeDebug)
+ .Case("clangast", eSectionTypeOther)
+ .Default(eSectionTypeInvalid);
 if (type != eSectionTypeInvalid)
   return type;
 
diff --git a/lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp 
b/lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp
index 13e1198516f78..f69358de6a288 100644
--- a/lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp
+++ b/lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp
@@ -1653,39 +1653,9 @@ lldb::user_id_t 
ObjectFileELF::GetSectionIndexByName(const char *name) {
 }
 
 static SectionType GetSectionTypeFromName(llvm::StringRef Name) {
-  if (Name.consume_front(".debug_")) {
-return llvm::StringSwitch(Name)
-.Case("abbrev", eSectionTypeDWARFDebugAbbrev)
-.Case("abbrev.dwo", eSectionTypeDWARFDebugAbbrevDwo)
-.Case("addr"

[Lldb-commits] [lldb] [LLDB] Unify DWARF section name matching (PR #141344)

2025-05-24 Thread via lldb-commits

llvmbot wrote:




@llvm/pr-subscribers-lldb

Author: nerix (Nerixyz)


Changes

Different object file formats support DWARF sections (COFF, ELF, MachO, 
PE/COFF, WASM). COFF and PE/COFF only matched a subset. This caused some GCC 
executables produced on MinGW to have issue later on when debugging. One 
example is that `.debug_rnglists` was not matched, which caused 
range-extraction to fail when printing a backtrace.

This unifies the parsing of section names in 
`ObjectFile::GetDWARFSectionTypeFromName`, so all file formats can use the same 
naming convention. Since the prefixes are different, 
`GetDWARFSectionTypeFromName` only matches the suffixes (i.e. `.debug_` needs 
to be stripped before).

I added two tests to ensure the sections are correctly identified on Windows 
executables.

---

Patch is 28.96 KiB, truncated to 20.00 KiB below, full version: 
https://github.com/llvm/llvm-project/pull/141344.diff


9 Files Affected:

- (modified) lldb/include/lldb/Symbol/ObjectFile.h (+7) 
- (modified) lldb/source/Plugins/ObjectFile/COFF/ObjectFileCOFF.cpp (+9-13) 
- (modified) lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp (+3-33) 
- (modified) lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp (+4-84) 
- (modified) lldb/source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.cpp (+3-14) 
- (modified) lldb/source/Plugins/ObjectFile/wasm/ObjectFileWasm.cpp (+1-31) 
- (modified) lldb/source/Symbol/ObjectFile.cpp (+35) 
- (added) lldb/test/Shell/ObjectFile/PECOFF/dwarf-clang.yaml (+151) 
- (added) lldb/test/Shell/ObjectFile/PECOFF/dwarf-gcc-mingw.yaml (+151) 


``diff
diff --git a/lldb/include/lldb/Symbol/ObjectFile.h 
b/lldb/include/lldb/Symbol/ObjectFile.h
index 7fca6383fa9f3..43567592dd447 100644
--- a/lldb/include/lldb/Symbol/ObjectFile.h
+++ b/lldb/include/lldb/Symbol/ObjectFile.h
@@ -709,6 +709,13 @@ class ObjectFile : public 
std::enable_shared_from_this,
   llvm::StringRef name,
   lldb::SymbolType symbol_type_hint = lldb::eSymbolTypeUndefined);
 
+  /// Parses the section type from a section name for DWARF sections.
+  ///
+  /// The \a name must be stripped of the default prefix (e.g. ".debug_" or
+  /// "__debug_"). If there's no matching section type, \a eSectionTypeOther
+  /// will be returned.
+  static lldb::SectionType GetDWARFSectionTypeFromName(llvm::StringRef name);
+
   /// Loads this objfile to memory.
   ///
   /// Loads the bits needed to create an executable image to the memory. It is
diff --git a/lldb/source/Plugins/ObjectFile/COFF/ObjectFileCOFF.cpp 
b/lldb/source/Plugins/ObjectFile/COFF/ObjectFileCOFF.cpp
index a7ad5d27b237f..1121f696637b6 100644
--- a/lldb/source/Plugins/ObjectFile/COFF/ObjectFileCOFF.cpp
+++ b/lldb/source/Plugins/ObjectFile/COFF/ObjectFileCOFF.cpp
@@ -191,19 +191,15 @@ void 
ObjectFileCOFF::CreateSections(lldb_private::SectionList §ions) {
 
   auto SectionType = [](StringRef Name,
 const coff_section *Section) -> lldb::SectionType {
-lldb::SectionType type =
-StringSwitch(Name)
-// DWARF Debug Sections
-.Case(".debug_abbrev", eSectionTypeDWARFDebugAbbrev)
-.Case(".debug_info", eSectionTypeDWARFDebugInfo)
-.Case(".debug_line", eSectionTypeDWARFDebugLine)
-.Case(".debug_pubnames", eSectionTypeDWARFDebugPubNames)
-.Case(".debug_pubtypes", eSectionTypeDWARFDebugPubTypes)
-.Case(".debug_str", eSectionTypeDWARFDebugStr)
-// CodeView Debug Sections: .debug$S, .debug$T
-.StartsWith(".debug$", eSectionTypeDebug)
-.Case("clangast", eSectionTypeOther)
-.Default(eSectionTypeInvalid);
+// DWARF Debug Sections
+if (Name.consume_front(".debug_"))
+  return GetDWARFSectionTypeFromName(Name);
+
+lldb::SectionType type = StringSwitch(Name)
+ // CodeView Debug Sections: .debug$S, .debug$T
+ .StartsWith(".debug$", eSectionTypeDebug)
+ .Case("clangast", eSectionTypeOther)
+ .Default(eSectionTypeInvalid);
 if (type != eSectionTypeInvalid)
   return type;
 
diff --git a/lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp 
b/lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp
index 13e1198516f78..f69358de6a288 100644
--- a/lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp
+++ b/lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp
@@ -1653,39 +1653,9 @@ lldb::user_id_t 
ObjectFileELF::GetSectionIndexByName(const char *name) {
 }
 
 static SectionType GetSectionTypeFromName(llvm::StringRef Name) {
-  if (Name.consume_front(".debug_")) {
-return llvm::StringSwitch(Name)
-.Case("abbrev", eSectionTypeDWARFDebugAbbrev)
-.Case("abbrev.dwo", eSectionTypeDWARFDebugAbbrevDwo)
-.Case("addr", eSectionTypeDWARFDebugAddr)
-.Case("aranges", eSectionTypeDWARFDebugAranges)
-.Case("cu_index", eSectionTypeDWARFDebugCuIn

[Lldb-commits] [lldb] 4788d5f - [lldb] Use llvm::stable_sort (NFC) (#141352)

2025-05-24 Thread via lldb-commits

Author: Kazu Hirata
Date: 2025-05-24T09:37:29-07:00
New Revision: 4788d5fabc54ec5f6e95d3b00a9811f90c5f94ae

URL: 
https://github.com/llvm/llvm-project/commit/4788d5fabc54ec5f6e95d3b00a9811f90c5f94ae
DIFF: 
https://github.com/llvm/llvm-project/commit/4788d5fabc54ec5f6e95d3b00a9811f90c5f94ae.diff

LOG: [lldb] Use llvm::stable_sort (NFC) (#141352)

Added: 


Modified: 
lldb/include/lldb/Utility/RangeMap.h
lldb/source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.cpp
lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.cpp
lldb/source/Symbol/Symtab.cpp
lldb/source/Utility/DiagnosticsRendering.cpp

Removed: 




diff  --git a/lldb/include/lldb/Utility/RangeMap.h 
b/lldb/include/lldb/Utility/RangeMap.h
index 2f7711c1eb11e..e701ae1ba96c8 100644
--- a/lldb/include/lldb/Utility/RangeMap.h
+++ b/lldb/include/lldb/Utility/RangeMap.h
@@ -216,7 +216,7 @@ template  class 
RangeVector {
 
   void Sort() {
 if (m_entries.size() > 1)
-  std::stable_sort(m_entries.begin(), m_entries.end());
+  llvm::stable_sort(m_entries);
   }
 
 #ifdef ASSERT_RANGEMAP_ARE_SORTED
@@ -484,14 +484,14 @@ class RangeDataVector {
 
   void Sort() {
 if (m_entries.size() > 1)
-  std::stable_sort(m_entries.begin(), m_entries.end(),
-   [&compare = m_compare](const Entry &a, const Entry &b) {
- if (a.base != b.base)
-   return a.base < b.base;
- if (a.size != b.size)
-   return a.size < b.size;
- return compare(a.data, b.data);
-   });
+  llvm::stable_sort(m_entries,
+[&compare = m_compare](const Entry &a, const Entry &b) 
{
+  if (a.base != b.base)
+return a.base < b.base;
+  if (a.size != b.size)
+return a.size < b.size;
+  return compare(a.data, b.data);
+});
 if (!m_entries.empty())
   ComputeUpperBounds(0, m_entries.size());
   }

diff  --git a/lldb/source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.cpp 
b/lldb/source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.cpp
index 609968bf0bde2..389339a1bc622 100644
--- a/lldb/source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.cpp
+++ b/lldb/source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.cpp
@@ -919,8 +919,7 @@ ObjectFilePECOFF::AppendFromExportTable(SectionList 
*sect_list,
 uint32_t idx = symtab.AddSymbol(symbol);
 export_list.push_back(std::make_pair(function_rva, idx));
   }
-  std::stable_sort(export_list.begin(), export_list.end(),
-   RVASymbolListCompareRVA);
+  llvm::stable_sort(export_list, RVASymbolListCompareRVA);
   return export_list;
 }
 

diff  --git a/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp 
b/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
index 709d09fc887bc..420c84b496d15 100644
--- a/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
+++ b/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
@@ -2758,11 +2758,10 @@ Status ProcessGDBRemote::WriteObjectFile(
   Status error;
   // Sort the entries by address because some writes, like those to flash
   // memory, must happen in order of increasing address.
-  std::stable_sort(
-  std::begin(entries), std::end(entries),
-  [](const ObjectFile::LoadableData a, const ObjectFile::LoadableData b) {
-return a.Dest < b.Dest;
-  });
+  llvm::stable_sort(entries, [](const ObjectFile::LoadableData a,
+const ObjectFile::LoadableData b) {
+return a.Dest < b.Dest;
+  });
   m_allow_flash_writes = true;
   error = Process::WriteObjectFile(entries);
   if (error.Success())

diff  --git a/lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.cpp 
b/lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.cpp
index 150c08ff353ea..8c19d5be76bcf 100644
--- a/lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.cpp
+++ b/lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.cpp
@@ -8631,10 +8631,9 @@ static bool DumpEnumValue(const clang::QualType 
&qual_type, Stream &s,
   // Sort in reverse order of the number of the population count,  so that in
   // `enum {A, B, ALL = A|B }` we visit ALL first. Use a stable sort so that
   // A | C where A is declared before C is displayed in this order.
-  std::stable_sort(values.begin(), values.end(),
-   [](const auto &a, const auto &b) {
- return llvm::popcount(a.first) > llvm::popcount(b.first);
-   });
+  llvm::stable_sort(values, [](const auto &a, const auto &b) {
+return llvm::popcount(a.first) > llvm::popcount(b.first);
+  });
 
   for (const auto &val : values) {
 if ((remaining_value & val.first) !=

[Lldb-commits] [lldb] [lldb] Use llvm::stable_sort (NFC) (PR #141352)

2025-05-24 Thread Kazu Hirata via lldb-commits

https://github.com/kazutakahirata closed 
https://github.com/llvm/llvm-project/pull/141352
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [lldb] [LLDB] Fix std::shared_ptr formatter crash on windows (PR #141348)

2025-05-24 Thread Emanuel Berggren via lldb-commits

MrBoboGet wrote:

Ah, it does, didn't think about double checking if it had been solved outside 
of main. Then this pull request is completely redundant

https://github.com/llvm/llvm-project/pull/141348
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [lldb] [LLDB] Fix std::shared_ptr formatter crash on windows (PR #141348)

2025-05-24 Thread Emanuel Berggren via lldb-commits

https://github.com/MrBoboGet created 
https://github.com/llvm/llvm-project/pull/141348

lldb-dap crashes when requesting variables if the scope includes a 
std::shared_ptr, as it assumes that m_ptr_obj is not null after Update. This is 
however only true if Update doesn't fail for any reason, and the problem is 
that LibStdcppSharedPtrSyntheticFrontEnd is used even when running on windows 
and not using libstdcpp. As _M_ptr is not present in the class, so is m_ptr_obj 
always null, which results in a crash when calling GetChildAtIndex with idx= 0. 

This commit only fixes the crash by adding a null check, whether or not it's a 
bug that LibStdcppSharedPtrSyntheticFrontEnd is used on windows at all is 
difficult for me to decide, and there doesn't seem to be any support for 
microsoft STL regardless.

A minimal example showcasing the bug is easy to provide:
```cpp
#include 
#include 
int main(int arg, char** argv)
{
std::shared_ptr broken = std::make_shared();
std::cout<<"Hello world!"GetSP();
   if (idx == 1) {
 if (m_ptr_obj && !m_obj_obj) {

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


[Lldb-commits] [lldb] [LLDB] Fix std::shared_ptr formatter crash on windows (PR #141348)

2025-05-24 Thread Michael Buch via lldb-commits

Michael137 wrote:

Thanks for the patch

I believe https://github.com/llvm/llvm-project/pull/140761 addresses this issue 
(and another). There's some discussion around testing too

https://github.com/llvm/llvm-project/pull/141348
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [lldb] [LLDB] Fix std::shared_ptr formatter crash on windows (PR #141348)

2025-05-24 Thread via lldb-commits

github-actions[bot] wrote:



Thank you for submitting a Pull Request (PR) to the LLVM Project!

This PR will be automatically labeled and the relevant teams will be notified.

If you wish to, you can add reviewers by using the "Reviewers" section on this 
page.

If this is not working for you, it is probably because you do not have write 
permissions for the repository. In which case you can instead tag reviewers by 
name in a comment by using `@` followed by their GitHub username.

If you have received no comments on your PR for a week, you can request a 
review by "ping"ing the PR by adding a comment “Ping”. The common courtesy 
"ping" rate is once a week. Please remember that you are asking for valuable 
time from other developers.

If you have further questions, they may be answered by the [LLVM GitHub User 
Guide](https://llvm.org/docs/GitHub.html).

You can also ask questions in a comment on this PR, on the [LLVM 
Discord](https://discord.com/invite/xS7Z362) or on the 
[forums](https://discourse.llvm.org/).

https://github.com/llvm/llvm-project/pull/141348
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [lldb] [LLDB] Fix std::shared_ptr formatter crash on windows (PR #141348)

2025-05-24 Thread via lldb-commits

llvmbot wrote:




@llvm/pr-subscribers-lldb

Author: Emanuel Berggren (MrBoboGet)


Changes

lldb-dap crashes when requesting variables if the scope includes a 
std::shared_ptr, as it assumes that m_ptr_obj is not null after Update. This is 
however only true if Update doesn't fail for any reason, and the problem is 
that LibStdcppSharedPtrSyntheticFrontEnd is used even when running on windows 
and not using libstdcpp. As _M_ptr is not present in the class, so is m_ptr_obj 
always null, which results in a crash when calling GetChildAtIndex with idx= 0. 

This commit only fixes the crash by adding a null check, whether or not it's a 
bug that LibStdcppSharedPtrSyntheticFrontEnd is used on windows at all is 
difficult for me to decide, and there doesn't seem to be any support for 
microsoft STL regardless.

A minimal example showcasing the bug is easy to provide:
```cpp
#include 
#include 
int main(int arg, char** argv)
{
std::shared_ptr broken = std::make_shared();
std::cout<<"Hello world!"<GetSP();
   if (idx == 1) {
 if (m_ptr_obj && !m_obj_obj) {

``




https://github.com/llvm/llvm-project/pull/141348
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [lldb] [lldb] Use llvm::stable_sort (NFC) (PR #141352)

2025-05-24 Thread Kazu Hirata via lldb-commits

https://github.com/kazutakahirata created 
https://github.com/llvm/llvm-project/pull/141352

None

>From e7fb3d02c3a27a77a234c3ca485a7c6ca3a7b6a7 Mon Sep 17 00:00:00 2001
From: Kazu Hirata 
Date: Fri, 23 May 2025 20:01:29 -0700
Subject: [PATCH] [lldb] Use llvm::stable_sort (NFC)

---
 lldb/include/lldb/Utility/RangeMap.h   | 18 +-
 .../ObjectFile/PECOFF/ObjectFilePECOFF.cpp |  3 +--
 .../Process/gdb-remote/ProcessGDBRemote.cpp|  9 -
 .../TypeSystem/Clang/TypeSystemClang.cpp   |  7 +++
 lldb/source/Symbol/Symtab.cpp  |  2 +-
 lldb/source/Utility/DiagnosticsRendering.cpp   |  2 +-
 6 files changed, 19 insertions(+), 22 deletions(-)

diff --git a/lldb/include/lldb/Utility/RangeMap.h 
b/lldb/include/lldb/Utility/RangeMap.h
index 2f7711c1eb11e..e701ae1ba96c8 100644
--- a/lldb/include/lldb/Utility/RangeMap.h
+++ b/lldb/include/lldb/Utility/RangeMap.h
@@ -216,7 +216,7 @@ template  class 
RangeVector {
 
   void Sort() {
 if (m_entries.size() > 1)
-  std::stable_sort(m_entries.begin(), m_entries.end());
+  llvm::stable_sort(m_entries);
   }
 
 #ifdef ASSERT_RANGEMAP_ARE_SORTED
@@ -484,14 +484,14 @@ class RangeDataVector {
 
   void Sort() {
 if (m_entries.size() > 1)
-  std::stable_sort(m_entries.begin(), m_entries.end(),
-   [&compare = m_compare](const Entry &a, const Entry &b) {
- if (a.base != b.base)
-   return a.base < b.base;
- if (a.size != b.size)
-   return a.size < b.size;
- return compare(a.data, b.data);
-   });
+  llvm::stable_sort(m_entries,
+[&compare = m_compare](const Entry &a, const Entry &b) 
{
+  if (a.base != b.base)
+return a.base < b.base;
+  if (a.size != b.size)
+return a.size < b.size;
+  return compare(a.data, b.data);
+});
 if (!m_entries.empty())
   ComputeUpperBounds(0, m_entries.size());
   }
diff --git a/lldb/source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.cpp 
b/lldb/source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.cpp
index 609968bf0bde2..389339a1bc622 100644
--- a/lldb/source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.cpp
+++ b/lldb/source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.cpp
@@ -919,8 +919,7 @@ ObjectFilePECOFF::AppendFromExportTable(SectionList 
*sect_list,
 uint32_t idx = symtab.AddSymbol(symbol);
 export_list.push_back(std::make_pair(function_rva, idx));
   }
-  std::stable_sort(export_list.begin(), export_list.end(),
-   RVASymbolListCompareRVA);
+  llvm::stable_sort(export_list, RVASymbolListCompareRVA);
   return export_list;
 }
 
diff --git a/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp 
b/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
index 709d09fc887bc..420c84b496d15 100644
--- a/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
+++ b/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
@@ -2758,11 +2758,10 @@ Status ProcessGDBRemote::WriteObjectFile(
   Status error;
   // Sort the entries by address because some writes, like those to flash
   // memory, must happen in order of increasing address.
-  std::stable_sort(
-  std::begin(entries), std::end(entries),
-  [](const ObjectFile::LoadableData a, const ObjectFile::LoadableData b) {
-return a.Dest < b.Dest;
-  });
+  llvm::stable_sort(entries, [](const ObjectFile::LoadableData a,
+const ObjectFile::LoadableData b) {
+return a.Dest < b.Dest;
+  });
   m_allow_flash_writes = true;
   error = Process::WriteObjectFile(entries);
   if (error.Success())
diff --git a/lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.cpp 
b/lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.cpp
index 150c08ff353ea..8c19d5be76bcf 100644
--- a/lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.cpp
+++ b/lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.cpp
@@ -8631,10 +8631,9 @@ static bool DumpEnumValue(const clang::QualType 
&qual_type, Stream &s,
   // Sort in reverse order of the number of the population count,  so that in
   // `enum {A, B, ALL = A|B }` we visit ALL first. Use a stable sort so that
   // A | C where A is declared before C is displayed in this order.
-  std::stable_sort(values.begin(), values.end(),
-   [](const auto &a, const auto &b) {
- return llvm::popcount(a.first) > llvm::popcount(b.first);
-   });
+  llvm::stable_sort(values, [](const auto &a, const auto &b) {
+return llvm::popcount(a.first) > llvm::popcount(b.first);
+  });
 
   for (const auto &val : values) {
 if ((remaining_value & val.first) != val.first)
diff --git a/lldb/source/Symbol/Symtab.cpp b/lldb/source/Symbol/Symtab.cpp
i

[Lldb-commits] [lldb] [LLDB] Fix std::shared_ptr formatter crash on windows (PR #141348)

2025-05-24 Thread Emanuel Berggren via lldb-commits

https://github.com/MrBoboGet closed 
https://github.com/llvm/llvm-project/pull/141348
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [lldb] [lldb] Use llvm::stable_sort (NFC) (PR #141352)

2025-05-24 Thread Tim Gymnich via lldb-commits

https://github.com/tgymnich approved this pull request.


https://github.com/llvm/llvm-project/pull/141352
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [lldb] [lldb] Use llvm::stable_sort (NFC) (PR #141352)

2025-05-24 Thread via lldb-commits

llvmbot wrote:




@llvm/pr-subscribers-lldb

Author: Kazu Hirata (kazutakahirata)


Changes



---
Full diff: https://github.com/llvm/llvm-project/pull/141352.diff


6 Files Affected:

- (modified) lldb/include/lldb/Utility/RangeMap.h (+9-9) 
- (modified) lldb/source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.cpp (+1-2) 
- (modified) lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp (+4-5) 
- (modified) lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.cpp (+3-4) 
- (modified) lldb/source/Symbol/Symtab.cpp (+1-1) 
- (modified) lldb/source/Utility/DiagnosticsRendering.cpp (+1-1) 


``diff
diff --git a/lldb/include/lldb/Utility/RangeMap.h 
b/lldb/include/lldb/Utility/RangeMap.h
index 2f7711c1eb11e..e701ae1ba96c8 100644
--- a/lldb/include/lldb/Utility/RangeMap.h
+++ b/lldb/include/lldb/Utility/RangeMap.h
@@ -216,7 +216,7 @@ template  class 
RangeVector {
 
   void Sort() {
 if (m_entries.size() > 1)
-  std::stable_sort(m_entries.begin(), m_entries.end());
+  llvm::stable_sort(m_entries);
   }
 
 #ifdef ASSERT_RANGEMAP_ARE_SORTED
@@ -484,14 +484,14 @@ class RangeDataVector {
 
   void Sort() {
 if (m_entries.size() > 1)
-  std::stable_sort(m_entries.begin(), m_entries.end(),
-   [&compare = m_compare](const Entry &a, const Entry &b) {
- if (a.base != b.base)
-   return a.base < b.base;
- if (a.size != b.size)
-   return a.size < b.size;
- return compare(a.data, b.data);
-   });
+  llvm::stable_sort(m_entries,
+[&compare = m_compare](const Entry &a, const Entry &b) 
{
+  if (a.base != b.base)
+return a.base < b.base;
+  if (a.size != b.size)
+return a.size < b.size;
+  return compare(a.data, b.data);
+});
 if (!m_entries.empty())
   ComputeUpperBounds(0, m_entries.size());
   }
diff --git a/lldb/source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.cpp 
b/lldb/source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.cpp
index 609968bf0bde2..389339a1bc622 100644
--- a/lldb/source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.cpp
+++ b/lldb/source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.cpp
@@ -919,8 +919,7 @@ ObjectFilePECOFF::AppendFromExportTable(SectionList 
*sect_list,
 uint32_t idx = symtab.AddSymbol(symbol);
 export_list.push_back(std::make_pair(function_rva, idx));
   }
-  std::stable_sort(export_list.begin(), export_list.end(),
-   RVASymbolListCompareRVA);
+  llvm::stable_sort(export_list, RVASymbolListCompareRVA);
   return export_list;
 }
 
diff --git a/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp 
b/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
index 709d09fc887bc..420c84b496d15 100644
--- a/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
+++ b/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
@@ -2758,11 +2758,10 @@ Status ProcessGDBRemote::WriteObjectFile(
   Status error;
   // Sort the entries by address because some writes, like those to flash
   // memory, must happen in order of increasing address.
-  std::stable_sort(
-  std::begin(entries), std::end(entries),
-  [](const ObjectFile::LoadableData a, const ObjectFile::LoadableData b) {
-return a.Dest < b.Dest;
-  });
+  llvm::stable_sort(entries, [](const ObjectFile::LoadableData a,
+const ObjectFile::LoadableData b) {
+return a.Dest < b.Dest;
+  });
   m_allow_flash_writes = true;
   error = Process::WriteObjectFile(entries);
   if (error.Success())
diff --git a/lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.cpp 
b/lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.cpp
index 150c08ff353ea..8c19d5be76bcf 100644
--- a/lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.cpp
+++ b/lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.cpp
@@ -8631,10 +8631,9 @@ static bool DumpEnumValue(const clang::QualType 
&qual_type, Stream &s,
   // Sort in reverse order of the number of the population count,  so that in
   // `enum {A, B, ALL = A|B }` we visit ALL first. Use a stable sort so that
   // A | C where A is declared before C is displayed in this order.
-  std::stable_sort(values.begin(), values.end(),
-   [](const auto &a, const auto &b) {
- return llvm::popcount(a.first) > llvm::popcount(b.first);
-   });
+  llvm::stable_sort(values, [](const auto &a, const auto &b) {
+return llvm::popcount(a.first) > llvm::popcount(b.first);
+  });
 
   for (const auto &val : values) {
 if ((remaining_value & val.first) != val.first)
diff --git a/lldb/source/Symbol/Symtab.cpp b/lldb/source/Symbol/Symtab.cpp
index 9a3e8476fa356..970f6c474e375 100644
--- a/lldb/source/Symbol/Symtab.cpp
+++ b/lld

[Lldb-commits] [lldb] [lldb] Use llvm::find_if (NFC) (PR #141385)

2025-05-24 Thread Kazu Hirata via lldb-commits

https://github.com/kazutakahirata created 
https://github.com/llvm/llvm-project/pull/141385

None

>From ac77c0122b5f698017ef2c937e6f8bdc9397930d Mon Sep 17 00:00:00 2001
From: Kazu Hirata 
Date: Sat, 24 May 2025 16:51:58 -0700
Subject: [PATCH] [lldb] Use llvm::find_if (NFC)

---
 .../lldb/Breakpoint/StopPointSiteList.h   | 10 +++-
 lldb/source/Breakpoint/BreakpointList.cpp | 18 ++---
 .../BreakpointLocationCollection.cpp  | 10 +++-
 lldb/source/Breakpoint/WatchpointList.cpp | 10 +++-
 lldb/source/Core/Debugger.cpp |  6 ++---
 lldb/source/Core/PluginManager.cpp|  6 ++---
 .../source/DataFormatters/TypeCategoryMap.cpp |  7 +++---
 lldb/source/Target/TargetList.cpp | 25 +--
 8 files changed, 43 insertions(+), 49 deletions(-)

diff --git a/lldb/include/lldb/Breakpoint/StopPointSiteList.h 
b/lldb/include/lldb/Breakpoint/StopPointSiteList.h
index b929c37a12f09..7ed53e952dc8d 100644
--- a/lldb/include/lldb/Breakpoint/StopPointSiteList.h
+++ b/lldb/include/lldb/Breakpoint/StopPointSiteList.h
@@ -278,9 +278,8 @@ template  class StopPointSiteList {
 [site_id](const std::pair s) {
   return site_id == s.second->GetID();
 };
-return std::find_if(m_site_list.begin(),
-m_site_list.end(), // Search full range
-id_matches);
+return llvm::find_if(m_site_list, // Search full range
+ id_matches);
   }
 
   typename collection::const_iterator
@@ -290,9 +289,8 @@ template  class StopPointSiteList {
 [site_id](const std::pair s) {
   return site_id == s.second->GetID();
 };
-return std::find_if(m_site_list.begin(),
-m_site_list.end(), // Search full range
-id_matches);
+return llvm::find_if(m_site_list, // Search full range
+ id_matches);
   }
 
   mutable std::recursive_mutex m_mutex;
diff --git a/lldb/source/Breakpoint/BreakpointList.cpp 
b/lldb/source/Breakpoint/BreakpointList.cpp
index 2c47b3b1263c6..779490ae0316a 100644
--- a/lldb/source/Breakpoint/BreakpointList.cpp
+++ b/lldb/source/Breakpoint/BreakpointList.cpp
@@ -47,9 +47,9 @@ break_id_t BreakpointList::Add(BreakpointSP &bp_sp, bool 
notify) {
 bool BreakpointList::Remove(break_id_t break_id, bool notify) {
   std::lock_guard guard(m_mutex);
 
-  auto it = std::find_if(
-  m_breakpoints.begin(), m_breakpoints.end(),
-  [&](const BreakpointSP &bp) { return bp->GetID() == break_id; });
+  auto it = llvm::find_if(m_breakpoints, [&](const BreakpointSP &bp) {
+return bp->GetID() == break_id;
+  });
 
   if (it == m_breakpoints.end())
 return false;
@@ -109,16 +109,16 @@ void BreakpointList::RemoveAllowed(bool notify) {
 
 BreakpointList::bp_collection::iterator
 BreakpointList::GetBreakpointIDIterator(break_id_t break_id) {
-  return std::find_if(
-  m_breakpoints.begin(), m_breakpoints.end(),
-  [&](const BreakpointSP &bp) { return bp->GetID() == break_id; });
+  return llvm::find_if(m_breakpoints, [&](const BreakpointSP &bp) {
+return bp->GetID() == break_id;
+  });
 }
 
 BreakpointList::bp_collection::const_iterator
 BreakpointList::GetBreakpointIDConstIterator(break_id_t break_id) const {
-  return std::find_if(
-  m_breakpoints.begin(), m_breakpoints.end(),
-  [&](const BreakpointSP &bp) { return bp->GetID() == break_id; });
+  return llvm::find_if(m_breakpoints, [&](const BreakpointSP &bp) {
+return bp->GetID() == break_id;
+  });
 }
 
 BreakpointSP BreakpointList::FindBreakpointByID(break_id_t break_id) const {
diff --git a/lldb/source/Breakpoint/BreakpointLocationCollection.cpp 
b/lldb/source/Breakpoint/BreakpointLocationCollection.cpp
index d649e889c3f76..28a3639e95bb6 100644
--- a/lldb/source/Breakpoint/BreakpointLocationCollection.cpp
+++ b/lldb/source/Breakpoint/BreakpointLocationCollection.cpp
@@ -60,18 +60,16 @@ class BreakpointIDPairMatches {
 BreakpointLocationCollection::collection::iterator
 BreakpointLocationCollection::GetIDPairIterator(lldb::break_id_t break_id,
 lldb::break_id_t break_loc_id) 
{
-  return std::find_if(
-  m_break_loc_collection.begin(),
-  m_break_loc_collection.end(), // Search full range
+  return llvm::find_if(
+  m_break_loc_collection,   // Search full range
   BreakpointIDPairMatches(break_id, break_loc_id)); // Predicate
 }
 
 BreakpointLocationCollection::collection::const_iterator
 BreakpointLocationCollection::GetIDPairConstIterator(
 lldb::break_id_t break_id, lldb::break_id_t break_loc_id) const {
-  return std::find_if(
-  m_break_loc_collection.begin(),
-  m_break_loc_collection.end(), // Search full range
+  return llvm::find_if(
+  m_break_loc_collection,   // Search full range
   BreakpointIDPairMatches(break_

[Lldb-commits] [lldb] [lldb] Fix a typo in documentation (PR #141384)

2025-05-24 Thread Kazu Hirata via lldb-commits

https://github.com/kazutakahirata created 
https://github.com/llvm/llvm-project/pull/141384

None

>From 47d8abfbc263505f34a5cef8214127748b95fae5 Mon Sep 17 00:00:00 2001
From: Kazu Hirata 
Date: Sat, 24 May 2025 15:04:00 -0700
Subject: [PATCH] [lldb] Fix a typo in documentation

---
 lldb/docs/use/python-reference.rst | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lldb/docs/use/python-reference.rst 
b/lldb/docs/use/python-reference.rst
index 4bf0cb075064b..325d0685d9d38 100644
--- a/lldb/docs/use/python-reference.rst
+++ b/lldb/docs/use/python-reference.rst
@@ -609,7 +609,7 @@ special needs.
 The easiest way to do this is to derive your new command from the 
lldb.ParsedCommand
 class.  That responds in the same way to the help & repeat command interfaces, 
and
 provides some convenience methods, and most importantly an 
LLDBOptionValueParser,
-accessed throught lldb.ParsedCommand.get_parser().  The parser is used to set
+accessed through lldb.ParsedCommand.get_parser().  The parser is used to set
 your command definitions, and to retrieve option values in the __call__ method.
 
 To set up the command definition, implement the ParsedCommand abstract method:

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


[Lldb-commits] [lldb] [lldb] Use llvm::find_if (NFC) (PR #141385)

2025-05-24 Thread via lldb-commits

llvmbot wrote:




@llvm/pr-subscribers-lldb

Author: Kazu Hirata (kazutakahirata)


Changes



---
Full diff: https://github.com/llvm/llvm-project/pull/141385.diff


8 Files Affected:

- (modified) lldb/include/lldb/Breakpoint/StopPointSiteList.h (+4-6) 
- (modified) lldb/source/Breakpoint/BreakpointList.cpp (+9-9) 
- (modified) lldb/source/Breakpoint/BreakpointLocationCollection.cpp (+4-6) 
- (modified) lldb/source/Breakpoint/WatchpointList.cpp (+4-6) 
- (modified) lldb/source/Core/Debugger.cpp (+3-3) 
- (modified) lldb/source/Core/PluginManager.cpp (+3-3) 
- (modified) lldb/source/DataFormatters/TypeCategoryMap.cpp (+4-3) 
- (modified) lldb/source/Target/TargetList.cpp (+12-13) 


``diff
diff --git a/lldb/include/lldb/Breakpoint/StopPointSiteList.h 
b/lldb/include/lldb/Breakpoint/StopPointSiteList.h
index b929c37a12f09..7ed53e952dc8d 100644
--- a/lldb/include/lldb/Breakpoint/StopPointSiteList.h
+++ b/lldb/include/lldb/Breakpoint/StopPointSiteList.h
@@ -278,9 +278,8 @@ template  class StopPointSiteList {
 [site_id](const std::pair s) {
   return site_id == s.second->GetID();
 };
-return std::find_if(m_site_list.begin(),
-m_site_list.end(), // Search full range
-id_matches);
+return llvm::find_if(m_site_list, // Search full range
+ id_matches);
   }
 
   typename collection::const_iterator
@@ -290,9 +289,8 @@ template  class StopPointSiteList {
 [site_id](const std::pair s) {
   return site_id == s.second->GetID();
 };
-return std::find_if(m_site_list.begin(),
-m_site_list.end(), // Search full range
-id_matches);
+return llvm::find_if(m_site_list, // Search full range
+ id_matches);
   }
 
   mutable std::recursive_mutex m_mutex;
diff --git a/lldb/source/Breakpoint/BreakpointList.cpp 
b/lldb/source/Breakpoint/BreakpointList.cpp
index 2c47b3b1263c6..779490ae0316a 100644
--- a/lldb/source/Breakpoint/BreakpointList.cpp
+++ b/lldb/source/Breakpoint/BreakpointList.cpp
@@ -47,9 +47,9 @@ break_id_t BreakpointList::Add(BreakpointSP &bp_sp, bool 
notify) {
 bool BreakpointList::Remove(break_id_t break_id, bool notify) {
   std::lock_guard guard(m_mutex);
 
-  auto it = std::find_if(
-  m_breakpoints.begin(), m_breakpoints.end(),
-  [&](const BreakpointSP &bp) { return bp->GetID() == break_id; });
+  auto it = llvm::find_if(m_breakpoints, [&](const BreakpointSP &bp) {
+return bp->GetID() == break_id;
+  });
 
   if (it == m_breakpoints.end())
 return false;
@@ -109,16 +109,16 @@ void BreakpointList::RemoveAllowed(bool notify) {
 
 BreakpointList::bp_collection::iterator
 BreakpointList::GetBreakpointIDIterator(break_id_t break_id) {
-  return std::find_if(
-  m_breakpoints.begin(), m_breakpoints.end(),
-  [&](const BreakpointSP &bp) { return bp->GetID() == break_id; });
+  return llvm::find_if(m_breakpoints, [&](const BreakpointSP &bp) {
+return bp->GetID() == break_id;
+  });
 }
 
 BreakpointList::bp_collection::const_iterator
 BreakpointList::GetBreakpointIDConstIterator(break_id_t break_id) const {
-  return std::find_if(
-  m_breakpoints.begin(), m_breakpoints.end(),
-  [&](const BreakpointSP &bp) { return bp->GetID() == break_id; });
+  return llvm::find_if(m_breakpoints, [&](const BreakpointSP &bp) {
+return bp->GetID() == break_id;
+  });
 }
 
 BreakpointSP BreakpointList::FindBreakpointByID(break_id_t break_id) const {
diff --git a/lldb/source/Breakpoint/BreakpointLocationCollection.cpp 
b/lldb/source/Breakpoint/BreakpointLocationCollection.cpp
index d649e889c3f76..28a3639e95bb6 100644
--- a/lldb/source/Breakpoint/BreakpointLocationCollection.cpp
+++ b/lldb/source/Breakpoint/BreakpointLocationCollection.cpp
@@ -60,18 +60,16 @@ class BreakpointIDPairMatches {
 BreakpointLocationCollection::collection::iterator
 BreakpointLocationCollection::GetIDPairIterator(lldb::break_id_t break_id,
 lldb::break_id_t break_loc_id) 
{
-  return std::find_if(
-  m_break_loc_collection.begin(),
-  m_break_loc_collection.end(), // Search full range
+  return llvm::find_if(
+  m_break_loc_collection,   // Search full range
   BreakpointIDPairMatches(break_id, break_loc_id)); // Predicate
 }
 
 BreakpointLocationCollection::collection::const_iterator
 BreakpointLocationCollection::GetIDPairConstIterator(
 lldb::break_id_t break_id, lldb::break_id_t break_loc_id) const {
-  return std::find_if(
-  m_break_loc_collection.begin(),
-  m_break_loc_collection.end(), // Search full range
+  return llvm::find_if(
+  m_break_loc_collection,   // Search full range
   BreakpointIDPairMatches(break_id, break_loc_id)); // Predicate
 }
 
diff --git a/lldb/source/Breakpoint/WatchpointList.cpp 
b/lldb/source/Breakpoint/Wat

[Lldb-commits] [lldb] [lldb] Fix a typo in documentation (PR #141384)

2025-05-24 Thread via lldb-commits

llvmbot wrote:




@llvm/pr-subscribers-lldb

Author: Kazu Hirata (kazutakahirata)


Changes



---
Full diff: https://github.com/llvm/llvm-project/pull/141384.diff


1 Files Affected:

- (modified) lldb/docs/use/python-reference.rst (+1-1) 


``diff
diff --git a/lldb/docs/use/python-reference.rst 
b/lldb/docs/use/python-reference.rst
index 4bf0cb075064b..325d0685d9d38 100644
--- a/lldb/docs/use/python-reference.rst
+++ b/lldb/docs/use/python-reference.rst
@@ -609,7 +609,7 @@ special needs.
 The easiest way to do this is to derive your new command from the 
lldb.ParsedCommand
 class.  That responds in the same way to the help & repeat command interfaces, 
and
 provides some convenience methods, and most importantly an 
LLDBOptionValueParser,
-accessed throught lldb.ParsedCommand.get_parser().  The parser is used to set
+accessed through lldb.ParsedCommand.get_parser().  The parser is used to set
 your command definitions, and to retrieve option values in the __call__ method.
 
 To set up the command definition, implement the ParsedCommand abstract method:

``




https://github.com/llvm/llvm-project/pull/141384
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits