summaryrefslogtreecommitdiff
path: root/src/tools/r2rdump/R2RDump.cs
diff options
context:
space:
mode:
authorAmy <amycmyu@gmail.com>2018-08-25 20:55:04 -0700
committerGitHub <noreply@github.com>2018-08-25 20:55:04 -0700
commitd2b76e093c71f471b0eb59192c3f0b0d409410b1 (patch)
treea9fc7c5d9b6dfd39726410c6af9a5e0f0c7f3904 /src/tools/r2rdump/R2RDump.cs
parentd27fff3f65193dd71c6197e9876101f496bbd28b (diff)
downloadcoreclr-d2b76e093c71f471b0eb59192c3f0b0d409410b1.tar.gz
coreclr-d2b76e093c71f471b0eb59192c3f0b0d409410b1.tar.bz2
coreclr-d2b76e093c71f471b0eb59192c3f0b0d409410b1.zip
R2RDump - Check disassembler support (#19664)
* Determine if disasm is supported on architectures instead of match * Readme changes
Diffstat (limited to 'src/tools/r2rdump/R2RDump.cs')
-rw-r--r--src/tools/r2rdump/R2RDump.cs7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/tools/r2rdump/R2RDump.cs b/src/tools/r2rdump/R2RDump.cs
index c374050597..e83931c2ad 100644
--- a/src/tools/r2rdump/R2RDump.cs
+++ b/src/tools/r2rdump/R2RDump.cs
@@ -403,16 +403,13 @@ namespace R2RDump
if (_disasm)
{
- // TODO: Fix R2RDump issue where an x64 R2R image cannot be dissassembled with the x86 CoreDisTools
- // For the short term, we want to error out with a decent message explaining the unexpected error
- // Issue #19564: https://github.com/dotnet/coreclr/issues/19564
- if (r2r.InputArchitectureMatchesDisassemblerArchitecture())
+ if (r2r.InputArchitectureSupported() && r2r.DisassemblerArchitectureSupported())
{
disassembler = new Disassembler(r2r.Image, r2r.Machine);
}
else
{
- throw new ArgumentException($"The architecture of input file {filename} is {r2r.Machine.ToString()} and does not match the architecture of the disassembler tools {System.Runtime.InteropServices.RuntimeInformation.ProcessArchitecture.ToString()}");
+ throw new ArgumentException($"The architecture of input file {filename} ({r2r.Machine.ToString()}) or the architecture of the disassembler tools ({System.Runtime.InteropServices.RuntimeInformation.ProcessArchitecture.ToString()}) is not supported.");
}
}