[Lldb-commits] [PATCH] D122429: [lldb/Plugin] Sort the ScriptedProcess' thread list before creating threads

Med Ismail Bennani via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Fri Mar 25 09:16:39 PDT 2022


mib added inline comments.


================
Comment at: lldb/source/Plugins/Process/scripted/ScriptedProcess.cpp:320
+
+  std::vector<llvm::StringRef> sorted_keys(keys->GetSize());
+  auto sort_keys = [&sorted_keys](StructuredData::Object *item) -> bool {
----------------
JDevlieghere wrote:
> Won't this overflow when you return the example from the summary?
> 
> ```
> {1: "one", 2: "two", 10: "ten"}
> ```
> 
> Would it be easier to populate our own `map<size_t, ObjectSP>` and iterate over that below? 
I don't see why it would overflow 🧐


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D122429/new/

https://reviews.llvm.org/D122429



More information about the lldb-commits mailing list