Re: [sqlite] Help with sqlite3OsRead - porting to a new OS

2011-10-25 Thread David Garfield
Also, if this is debugger output (as it appears), it could be that an
optimizer is confusing the parameters.  I see that all the time on GCC
i386 when I set a breakpoint at the start of a function.

--David

David Garfield writes:
> Sounds like it could be a difference in calling convention...  Check
> compile options and function declaration modifiers.
> 
> --David
> 
> Stuart Thomson writes:
> > Hi,
> > 
> > I'm in the middle of porting sqlite3 to a new Operating System and have 
> > come across a problem with the sqlite3OsRead function in the 
> > sqlite3PagerReadFileheader function body.
> > 
> > Before the sqlite3OsRead function is called, the parameters are correctly 
> > populated
> > 
> > for example:
> > pPager->fd= \u565c,  0x6208565c
> > pDest= \ufea8,   0x2000fea8
> > N  = d,  0x0064
> > Offset= 0
> > 
> > But when the function sqlite3OsRead is actually implemented the parameters 
> > are in the incorrect order. More specifically:
> > 
> > Sqlite3_file *id= d,  0x0064
> > Void *pBuf = \u565c,  0x6208565c
> > Int amt  = \ufea8,   0x2000fea8
> > I64 offset   = \0,  0x2000fea8
> > 
> > I have built a Database using sqlite3 3.7.5 and the code is built to 3.7.5.
> > 
> > Any ideas are welcome,
> > 
> > Cheers
> > Stuart
> > 
> > 
> > 
> > BitWise Ltd - Crescent House, Carnegie Campus, Dunfermline, KY11 8GR, 
> > United Kingdom
> > tel: +44 (0)1383 625151   -mob:
> > web: BitWise Group 
> > 
> > This e-mail may be confidential and privileged. Do not open it if you are 
> > in any doubt that you are the intended recipient. You must scan this e-mail 
> > and any attachments for the presence of viruses or any other unwelcome 
> > content. This e-mail must be read in conjunction with the important legal 
> > notice at BitWise Group/Legal 
> > ___
> > sqlite-users mailing list
> > sqlite-users@sqlite.org
> > http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
> 

___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Help with sqlite3OsRead - porting to a new OS

2011-10-25 Thread David Garfield
Sounds like it could be a difference in calling convention...  Check
compile options and function declaration modifiers.

--David

Stuart Thomson writes:
> Hi,
> 
> I'm in the middle of porting sqlite3 to a new Operating System and have come 
> across a problem with the sqlite3OsRead function in the 
> sqlite3PagerReadFileheader function body.
> 
> Before the sqlite3OsRead function is called, the parameters are correctly 
> populated
> 
> for example:
> pPager->fd= \u565c,  0x6208565c
> pDest= \ufea8,   0x2000fea8
> N  = d,  0x0064
> Offset= 0
> 
> But when the function sqlite3OsRead is actually implemented the parameters 
> are in the incorrect order. More specifically:
> 
> Sqlite3_file *id= d,  0x0064
> Void *pBuf = \u565c,  0x6208565c
> Int amt  = \ufea8,   0x2000fea8
> I64 offset   = \0,  0x2000fea8
> 
> I have built a Database using sqlite3 3.7.5 and the code is built to 3.7.5.
> 
> Any ideas are welcome,
> 
> Cheers
> Stuart
> 
> 
> 
> BitWise Ltd - Crescent House, Carnegie Campus, Dunfermline, KY11 8GR, United 
> Kingdom
> tel: +44 (0)1383 625151   -mob:
> web: BitWise Group 
> 
> This e-mail may be confidential and privileged. Do not open it if you are in 
> any doubt that you are the intended recipient. You must scan this e-mail and 
> any attachments for the presence of viruses or any other unwelcome content. 
> This e-mail must be read in conjunction with the important legal notice at 
> BitWise Group/Legal 
> ___
> sqlite-users mailing list
> sqlite-users@sqlite.org
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


[sqlite] Help with sqlite3OsRead - porting to a new OS

2011-10-25 Thread Stuart Thomson
Hi,

I'm in the middle of porting sqlite3 to a new Operating System and have come 
across a problem with the sqlite3OsRead function in the 
sqlite3PagerReadFileheader function body.

Before the sqlite3OsRead function is called, the parameters are correctly 
populated

for example:
pPager->fd= \u565c,  0x6208565c
pDest= \ufea8,   0x2000fea8
N  = d,  0x0064
Offset= 0

But when the function sqlite3OsRead is actually implemented the parameters are 
in the incorrect order. More specifically:

Sqlite3_file *id= d,  0x0064
Void *pBuf = \u565c,  0x6208565c
Int amt  = \ufea8,   0x2000fea8
I64 offset   = \0,  0x2000fea8

I have built a Database using sqlite3 3.7.5 and the code is built to 3.7.5.

Any ideas are welcome,

Cheers
Stuart



BitWise Ltd - Crescent House, Carnegie Campus, Dunfermline, KY11 8GR, United 
Kingdom
tel: +44 (0)1383 625151   -mob:
web: BitWise Group 

This e-mail may be confidential and privileged. Do not open it if you are in 
any doubt that you are the intended recipient. You must scan this e-mail and 
any attachments for the presence of viruses or any other unwelcome content. 
This e-mail must be read in conjunction with the important legal notice at 
BitWise Group/Legal 
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users