soccer jersey forums.silverfrost.com :: View topic - Disassembly failure in SDBG64
forums.silverfrost.com Forum Index forums.silverfrost.com
Welcome to the Silverfrost forums
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Disassembly failure in SDBG64

 
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> 64-bit
View previous topic :: View next topic  
Author Message
mecej4



Joined: 31 Oct 2006
Posts: 1896

PostPosted: Thu Jan 27, 2022 6:07 pm    Post subject: Disassembly failure in SDBG64 Reply with quote

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
Back to top
View user's profile Send private message
Robert



Joined: 29 Nov 2006
Posts: 450
Location: Manchester

PostPosted: Thu Jan 27, 2022 8:24 pm    Post subject: Reply with quote

That is pretty confused!
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> 64-bit All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group