clayborg added inline comments.

================
Comment at: lldb/source/Target/Memory.cpp:133-135
+  if (pos != m_L2_cache.end()) {
+    return pos->second;
+  }
----------------
remove braces for single line if statement per llvm coding guidelines


================
Comment at: lldb/source/Target/Memory.cpp:210-211
+  DataBufferSP first_cache_line = GetL2CacheLine(cache_line_base_addr, error);
+  uint8_t *dst_buf = (uint8_t *)dst;
+  size_t bytes_left = dst_len;
 
----------------
move these two lines below the 2 if statements below that return early?


================
Comment at: lldb/source/Target/Memory.cpp:245-246
+    if (m_invalid_ranges.FindEntryThatContains(cache_line_base_addr)) {
+      error.SetErrorStringWithFormat("memory read failed for 0x%" PRIx64,
+                                     cache_line_base_addr);
+      return dst_len - bytes_left;
----------------
Is this an error here? We already got something from the first read and we are 
just returning partial data, do we need an error? If we fail the first read, 
then this is an error. 


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D145624

_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to