mecej4
Joined: 31 Oct 2006 Posts: 1896
|
Posted: Thu Jan 27, 2022 6:07 pm Post subject: Disassembly failure in SDBG64 |
|
|
In an attempt to study the behavior of the library routine LENG8$ (in Clearwin64.dll), I compiled and linked the following test program using FTN95 8.83 with the /64 /debug /link options.
Code: | program blendol
implicit none
integer*8 lstr
character*16 :: str = 'AbcdEfghIjklMnop'
lstr=len_trim(str)
print *,'Length = ',lstr
end program |
I opened the resulting EXE inside SDBG64, pressed F11, and then stepped in assembly mode until the library routine LENG8$ was entered. The disassembly of the code in LENG$ that I saw is quite wrong:
Code: | 00007FFA0E3F2E50 48 db 48,83,fa,0l,7+ 0
00007FFA0E3F2E51 83 db 83,fa,01,7d,0+ 1
00007FFA0E3F2E52 fa cti + 2
00007FFA0E3F2E53 017d03 add [3]$,RDI + 3
00007FFA0E3F2E56 33c0 xor RAX,RAX + 6
00007FFA0E3F2E58 c3 ret + 8
... |
For the same range of addresses (ignoring relocation adjustments), the output from the VC++ Dumpbin utility is
Code: | 00000001800D2E50: 48 83 FA 01 cmp rdx,1
00000001800D2E54: 7D 03 jge 00000001800D2E59
00000001800D2E56: 33 C0 xor eax,eax
00000001800D2E58: C3 ret |
Comparing the two, you can see that the code bytes match, but the SDBG64 disassembler is confused.
Last edited by mecej4 on Fri Jan 28, 2022 1:24 am; edited 1 time in total |
|