Fix X86 disassembly and a bug regarding ExportedTypes in R2RDump (#20230)
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)
commit31955025defa95915c0532773dbf5cb4a932953a
tree0974fa95efc91e777d0fd5aeae625e29f12d8e63
parentd9ac5ad482510ed944315b847e1a587816553b1c
Fix X86 disassembly and a bug regarding ExportedTypes in R2RDump (#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
src/tools/r2rdump/CoreDisTools.cs
src/tools/r2rdump/R2RReader.cs