[Lldb-commits] [PATCH] D49062: [lldb-mi] Re-implement data-info-line command.

Adrian Prantl via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Mon Jul 9 09:06:02 PDT 2018

aprantl added inline comments.

Comment at: packages/Python/lldbsuite/test/tools/lldb-mi/data/TestMiData.py:376
-            "\^error,msg=\"Command 'data-info-line'\. Error: The LineEntry is absent or has an unknown format\.\"")
+            "\^error,msg=\"Command 'data-info-line'. Error: The LineEntry is absent or has an unknown format.\"")
Why are you changing the regexp here? '.' matches any character, so to match the literal `.` you need to escape it with a backslash.

Comment at: tools/lldb-mi/MICmdCmdData.cpp:28
 #include "llvm/ADT/StringRef.h"
-#include "llvm/Support/Regex.h"
-#include <inttypes.h> // For PRIx64
+#include <string> // For std::to_string.
I don't think that comment is necessary.

Comment at: tools/lldb-mi/MICmdCmdData.cpp:1691
+        break;
+      for (uint32_t j = 0, e = cu.GetNumLineEntries(); j < e; ++j) {
+        const lldb::SBLineEntry &curLine = cu.GetLineEntryAtIndex(j);
@clayborg: Is there something better we could do instead of doing a linear search through all debug line entries?


More information about the lldb-commits mailing list