flat assembler
Message board for the users of flat assembler.

Index > Windows > SQLite3: how to get hold of sqlite3_column_double return val

Author
Thread Post new topic Reply to topic
kasake36



Joined: 28 Mar 2006
Posts: 68
kasake36
I'm having trouble of getting the return value of the sqlite3_column_double value. The value isn't returned in eax:edx as i have thought. Via OllyDBG i got hold of the assembler instructions for the procedures sqlite3_column_int (returns via eax) and sqlite3_column_double.

sqlite3_column_int:
Code:
PUSH EBP
MOV EBP,ESP
SUB ESP,10
PUSH ESI
PUSH EBX
MOV EBX,DWORD PTR SS:[EBP+8]
ADD ESP,-0C
ADD ESP,-8
PUSH DWORD PTR SS:[EBP+C]
PUSH EBX
CALL sqlite3.6093164C
PUSH EAX
CALL sqlite3.sqlite3_value_int
MOV ESI,EAX
ADD ESP,20
ADD ESP,-0C
PUSH EBX
CALL sqlite3.609316AC
MOV EAX,ESI
LEA ESP,DWORD PTR SS:[EBP-18]
POP EBX
POP ESI
LEAVE
RETN
    


sqlite3_column_double:
Code:
PUSH EBP
MOV EBP,ESP
SUB ESP,24
PUSH EBX
MOV EBX,DWORD PTR SS:[EBP+8]
ADD ESP,-0C
ADD ESP,-8
PUSH DWORD PTR SS:[EBP+C]
PUSH EBX
CALL sqlite3.6093164C
PUSH EAX
CALL sqlite3.sqlite3_value_double
ADD ESP,20
ADD ESP,-0C
FSTP QWORD PTR SS:[EBP-8]
PUSH EBX
CALL sqlite3.609316AC
MOV EBX,DWORD PTR SS:[EBP-28]
FLD QWORD PTR SS:[EBP-8]
LEAVE
RETN
    


Could anyone please explain me how i can get hold of the return value of sqlite3_column_double? Thanks in advance!
Post 23 Jun 2006, 11:33
View user's profile Send private message Reply with quote
UCM



Joined: 25 Feb 2005
Posts: 285
Location: Canada
UCM
Looks like it is pushed onto FPU stack. Try
Code:
fstp [64bitmemorylocation]
    
Post 23 Jun 2006, 11:52
View user's profile Send private message Reply with quote
kasake36



Joined: 28 Mar 2006
Posts: 68
kasake36
Uh i believe i got it, thanks!! Wink
Post 23 Jun 2006, 11:58
View user's profile Send private message Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< Last Thread | Next Thread >
Forum Rules:
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
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2020, Tomasz Grysztar.

Powered by rwasa.