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

Reply via email to