[llvm] r362847 - [llvm-objdump] Fix Bugzilla ID 41862 to support checking addresses of disassembled object
Jordan Rupprecht via llvm-commits
llvm-commits at lists.llvm.org
Fri Jun 7 14:49:26 PDT 2019
Author: rupprecht
Date: Fri Jun 7 14:49:26 2019
New Revision: 362847
URL: http://llvm.org/viewvc/llvm-project?rev=362847&view=rev
Log:
[llvm-objdump] Fix Bugzilla ID 41862 to support checking addresses of disassembled object
Summary:
This fixes the bugzilla id,41862 to support dealing with checking
stop address against start address to support this not being a
proper object to check the disasembly against like gnu objdump
currently does.
Reviewers: jakehehrlich, rupprecht, echristo, jhenderson, grimar
Reviewed By: jhenderson
Subscribers: MaskRay, smeenai, rupprecht, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D61969
Patch by Nicholas Krause!
Modified:
llvm/trunk/test/tools/llvm-objdump/X86/start-stop-address.test
llvm/trunk/tools/llvm-objdump/llvm-objdump.cpp
Modified: llvm/trunk/test/tools/llvm-objdump/X86/start-stop-address.test
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/tools/llvm-objdump/X86/start-stop-address.test?rev=362847&r1=362846&r2=362847&view=diff
==============================================================================
--- llvm/trunk/test/tools/llvm-objdump/X86/start-stop-address.test (original)
+++ llvm/trunk/test/tools/llvm-objdump/X86/start-stop-address.test Fri Jun 7 14:49:26 2019
@@ -68,4 +68,5 @@
// OUT-OF-RANGE-NOT: Disassembly
// RUN: not llvm-objdump -d %t.out --start-address=0x40 --stop-address=0x3f 2>&1 | FileCheck %s --check-prefix ERRMSG
-// ERRMSG: error: Start address should be less than stop address.
+// RUN: not llvm-objdump -d %t.out --start-address=0x40 --stop-address=0x40 2>&1 | FileCheck %s --check-prefix ERRMSG
+// ERRMSG: start address should be less than stop address.
Modified: llvm/trunk/tools/llvm-objdump/llvm-objdump.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-objdump/llvm-objdump.cpp?rev=362847&r1=362846&r2=362847&view=diff
==============================================================================
--- llvm/trunk/tools/llvm-objdump/llvm-objdump.cpp (original)
+++ llvm/trunk/tools/llvm-objdump/llvm-objdump.cpp Fri Jun 7 14:49:26 2019
@@ -1417,8 +1417,8 @@ static void disassembleObject(const Targ
}
static void disassembleObject(const ObjectFile *Obj, bool InlineRelocs) {
- if (StartAddress > StopAddress)
- error("Start address should be less than stop address");
+ if (StartAddress >= StopAddress)
+ error("start address should be less than stop address");
const Target *TheTarget = getTarget(Obj);
More information about the llvm-commits
mailing list