Translate [rip +- offset] to absolute RVA's in R2RDump (dotnet/coreclr#19219)
authorTomáš Rylek <trylek@microsoft.com>
Tue, 14 Aug 2018 10:37:19 +0000 (12:37 +0200)
committerGitHub <noreply@github.com>
Tue, 14 Aug 2018 10:37:19 +0000 (12:37 +0200)
commit4f71d842ccb97498538287f5ebea5281ab9381a0
tree2bacc1a2c0cabeea25254867f23363d78ed619a8
parentfeb4a8715eefbfe82d8094dc9c3b23ffc921395a
Translate [rip +- offset] to absolute RVA's in R2RDump (dotnet/coreclr#19219)

* Translate [rip +- offset] to absoluate RVA's in R2RDump

The existing logic for displaying rip-relative addressed on X64
make it very hard to calculate the final addresses. I have added
a horrendous hack using textual analysis of the disassembled
instruction to translate this notation to absolute RVA's.

As part of this effort I have also encapsulated the CorDisTools
helper in a new class Disassembler that also contains customizable
provisions for handling special assembly cases on the individual
architectures.

Thanks

Tomas

* Temporarily block out disassembly to make tests pass

In my initial commit I removed the line blocking out disassembly
however this ends up failing several lab tests so I'm putting the
line back.

Thanks

Tomas

Commit migrated from https://github.com/dotnet/coreclr/commit/66b3197f69cf4669ba04a7a8121d33d9aa5d3c9d
src/coreclr/src/tools/r2rdump/CoreDisTools.cs
src/coreclr/src/tools/r2rdump/R2RDump.cs
src/coreclr/src/tools/r2rdump/TextDumper.cs
src/coreclr/src/tools/r2rdump/XmlDumper.cs