Sarah uttered:
plus, I'm using sqlite-source-3_3_5.
I also find a wired phenomenon:
When I trace into sqlite3Parser(pEngine, TK_SEMI, pParse->sLastToken,
pParse);
the next executed statement pointed by debugger does not match with the
real one, It seems there are one or two lines space. That is to say, the
debugger arrow doesn't point to the real statement which is going to be
executed next.
This can be a problem if the binary is compiled with optimisations of any
level. You should turn optimisations off when compiling for debugging, as
the compiler often rearranges the output assembler for optimal use of
pipeline resources.
----- Original Message -----
From: Sarah
To: [email protected]
Sent: Monday, September 11, 2006 7:22 PM
Subject: met "ARM7TDMI raised an exception,data abort" when executing
sqlite3Parser() in ARM environment
Hi,all
During the execution of a test program in an embedded environment,
after it goes into sqlite3_exec()-->sqlite3_prepare()-->sqlite3RunParser(&sParse,
zSql, &zErrMsg),
the debugger pops "the ARM7TDMI raised an exception,data abort" when the
following sentence is executed(bold and underlined):
...
abort_parse:
...
sqlite3Parser(pEngine, TK_SEMI, pParse->sLastToken, pParse);
...
After "data abort" happens, the debugger stops at assembly languages like
this(pointed by an arrow):
...
[0xbc38] pop {r3-r5}
[0xbc08] pop {r3}
[0x4718] bx r3
[0x6868] ldr r0,[r5,#4]
[0x1c29] mov r1,r5
[0x2800] cmp r0,#0
[0xd018] beq 0x42fc4 ; (__Heap_Alloc + 0x5a)
--> [0x6802] ldr r2,[r0,#0]
[0x42a2] cmp r2,r4
[0xd311] bcc 0x42fbc ; (__Heap_Alloc + 0x52)
[0x1c23] mov r3,r4
[0x6802] ldr r2,[r0,#0]
...
When I trace into sqlite3Parser(),it seems like the error is caused by
"yy_reduce(yypParser,yyact-YYNSTATE);"
My test program is like this:
{
char * database = ":memory:";
sqlite3 * db;
sqlite3_open(database, &db);
sqlite3_exec(db, "create table myt(age smallint)", NULL, NULL, NULL);
....
}
sqlite3_open() runs successfully.
And CPU type is ARM7TDMI, no operating system is used, such as linux.
I'm totally confused. Please help me diagnose this error.
Any little help will be appreciated.
Sarah
--
/"\
\ / ASCII RIBBON CAMPAIGN - AGAINST HTML MAIL
X - AGAINST MS ATTACHMENTS
/ \
-----------------------------------------------------------------------------
To unsubscribe, send email to [EMAIL PROTECTED]
-----------------------------------------------------------------------------