Fix X86 disassembly and a bug regarding ExportedTypes in R2RDump (dotnet/coreclr...
authorTomáš Rylek <trylek@microsoft.com>
Wed, 3 Oct 2018 00:04:51 +0000 (02:04 +0200)
committerGitHub <noreply@github.com>
Wed, 3 Oct 2018 00:04:51 +0000 (02:04 +0200)
commit5964c82160b5e32b9d13905712730bb2a3384b5c
tree817a39673c846c16aa2468a424d703d731a18a49
parentc830c22725729fb5b684c169116bb0c4c32e881a
Fix X86 disassembly and a bug regarding ExportedTypes in R2RDump (dotnet/coreclr#20230)

1) X86 CoreDisTools disassembler has a bug in decoding absolute
indirections, interpreting them as RIP-relative offsets. I have
reused the logic that's already in place for patching X64
RIP-relative addresses to take care of this additional case.

2) the CoreDisTools disassembly apparently only produces newline
(0A) characters that don't work well in Notepad and other viewers;
I have forcibly replaced them with the platform newline separator.

3) I hit a bug in available type decoding - the logic wasn't
properly checking whether the type is exported or not.

Thanks

Tomas

Commit migrated from https://github.com/dotnet/coreclr/commit/31955025defa95915c0532773dbf5cb4a932953a
src/coreclr/src/tools/r2rdump/CoreDisTools.cs
src/coreclr/src/tools/r2rdump/R2RReader.cs