[Lldb-commits] [PATCH] D115508: Reland "[lldb] Remove non address bits when looking up memory regions"

Muhammad Omair Javaid via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Wed Jan 12 16:17:37 PST 2022


omjavaid added a comment.

Apologies for late response!!!



================
Comment at: lldb/source/Commands/CommandObjectMemory.cpp:1668
+    if (argc > 1 || (argc == 0 && load_addr == LLDB_INVALID_ADDRESS) ||
+        (abi && (abi->FixDataAddress(load_addr) != load_addr))) {
       result.AppendErrorWithFormat("'%s' takes one argument:\nUsage: %s\n",
----------------
Perhaps this condition should only run when argument is not equal to 1. When user supplies an argument which has non-address-bits set, load_addr may not be equal to value returned by FixDataAddress(load_address). This will fire a invalid argument error which according to comment above we do not intend?




================
Comment at: lldb/source/Target/Process.cpp:5891
+      // is at or beyond the end of mappable memory.
+      !(abi && (abi->FixDataAddress(range_end) != range_end)));
 
----------------
Just to confirm this assumes range base will always be free of any non-address-bits. ?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D115508



More information about the lldb-commits mailing list