[PATCH] D61969: Fix Bugzilla ID 41862 to support checking addresses of disassembled object

Jordan Rupprecht via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed May 22 14:17:02 PDT 2019


rupprecht added a comment.

nit: the title should start with [llvm-objdump]

There's already a test in `llvm/test/tools/llvm-objdump/X86/start-stop-address.test`. Can you add cases for both stop < start and stop == start there? You should use `// RUN: not llvm-objdump -d ...` and FileCheck the error message



================
Comment at: llvm/tools/llvm-objdump/llvm-objdump.cpp:1379
     error("Start address should be less than stop address");
+  else if (StartAddress == StopAddress)
+    error("Start address should not be equal to  target object's stop address");
----------------
jakehehrlich wrote:
> If this is in fact the behavior we want we can just make the above operator '>=' and the error message will still be valid (actually as is the error message is technically wrong but would be made right if used '>=')
Yep, I think we should just have one error. Just changing the previous check from `>` to `>=` should work.


Repository:
  rL LLVM

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

https://reviews.llvm.org/D61969





More information about the llvm-commits mailing list