[Lldb-commits] [PATCH] D101131: [lldb-vscode] Follow up of D99989 - store some strings more safely
walter erquinigo via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Thu Apr 22 21:27:57 PDT 2021
wallace created this revision.
wallace added reviewers: clayborg, teemperor.
wallace requested review of this revision.
Herald added a project: LLDB.
Herald added a subscriber: lldb-commits.
As a follow up of https://reviews.llvm.org/D99989#inline-953343, I'm now
storing std::string instead of char *. I know it might never break as char *,
but if it does, chasing that bug might be dauting.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D101131
Files:
lldb/tools/lldb-vscode/lldb-vscode.cpp
Index: lldb/tools/lldb-vscode/lldb-vscode.cpp
===================================================================
--- lldb/tools/lldb-vscode/lldb-vscode.cpp
+++ lldb/tools/lldb-vscode/lldb-vscode.cpp
@@ -2931,7 +2931,7 @@
const int64_t end_idx = start_idx + ((count == 0) ? num_children : count);
// We first find out which variable names are duplicated
- llvm::DenseMap<const char *, int> variable_name_counts;
+ std::map<std::string, int> variable_name_counts;
for (auto i = start_idx; i < end_idx; ++i) {
lldb::SBValue variable = g_vsc.variables.GetValueAtIndex(i);
if (!variable.IsValid())
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D101131.339868.patch
Type: text/x-patch
Size: 631 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20210423/2ae7a739/attachment.bin>
More information about the lldb-commits
mailing list