[Lldb-commits] [PATCH] D110472: [lldb] [gdb-remote] Use llvm::StringRef.split() and llvm::to_integer()

Raphael Isemann via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Sat Sep 25 14:26:34 PDT 2021


teemperor accepted this revision.
teemperor added a comment.
This revision is now accepted and ready to land.

All the `llvm::StringRef &` iteration variables can just be `llvm::StringRef` without the reference. Also some `base` values got lost here (see inline comments).

Beside that this LGTM, thanks!



================
Comment at: lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp:1667
+            addr_t page;
+            if (llvm::to_integer(x, page))
               dirty_page_list.push_back(page);
----------------
Base 16 arg is lost here.


================
Comment at: lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp:390
+    uint32_t reg;
+    if (llvm::to_integer(x, reg))
+      regnums.push_back(reg);
----------------
This needs to forward the `base` arg (there are some callers that seem to parse hex).


================
Comment at: lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp:1464
+    lldb::addr_t pc;
+    if (llvm::to_integer(x, pc))
       m_thread_pcs.push_back(pc);
----------------
base 16 lost here.


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

https://reviews.llvm.org/D110472



More information about the lldb-commits mailing list