[Lldb-commits] [PATCH] D75730: [lldb] Reduce duplication in the Disassembler class

Pavel Labath via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Fri Mar 6 02:46:26 PST 2020


labath marked an inline comment as done.
labath added inline comments.


================
Comment at: lldb/source/Commands/CommandObjectDisassemble.cpp:462-469
+    Disassembler::Limit limit;
+    if (m_options.num_instructions == 0) {
+      limit = {Disassembler::Limit::Bytes, cur_range.GetByteSize()};
+      if (limit.value == 0)
+        limit.value = DEFAULT_DISASM_BYTE_SIZE;
     } else {
+      limit = {Disassembler::Limit::Instructions, m_options.num_instructions};
----------------
The idea is that further refactorings will change `ranges` from a `vector<AddressRange>` to a `vector<pair<Address, Limit>>` and this will become a simple ranged for loop.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D75730





More information about the lldb-commits mailing list