2008-05-27 09:02:23     Run Time error

Document created by Aaronwu Employee on Aug 6, 2013
Version 1Show Document
  • View in full screen mode

2008-05-27 09:02:23     Run Time error

P SENTHIL KUMAR (INDIA)

Message: 56303   

 

hi all,

 

Let me know your suggestion to solve the below issue.

 

In my project, i had a loadable module with two function - init() and decode(),

 

i got the below issue, when the init() function is called,

 

 

 

root:/bin> ./MP2Play

Instruction fetch misaligned address violation

- Attempted misaligned instruction cache fetch. On a misaligned instruction fet

ch exception,

the return address provided in RETX is the destination address which is misalig

ned, rather than the address of the offending instruction.

ICPLB_FAULT_ADDR=031ab15c

 

CURRENT PROCESS:

 

COMM=MP2Dynamic PID=48

TEXT=03298000-0329d438 DATA=031c0480-031d0a30 BSS=031d0a30-031e0000

USER-STACK=031ffec0

 

return address: 031ab15c; contents of [PC-16...PC+8[:

0570 e800 0003 3038 3031 e3ff fff3 3210

e801 0000 3007 300e 0530 9153 9159 ac5b X

0051 0000 0568 e800 0003 3038 3031 302a

 

RETE:  00000000  RETN: 03066000  RETX: 031ab15c  RETS: 031a9914

IPEND: 0030  SYSCFG: 0036

SEQSTAT: 0006002a    SP: 03065f24

R0: 031ffe20    R1: 031ffdfc    R2: 031febc0    R3: 00000000

R4: 00000001    R5: 031ffecc    R6: 031c5108    R7: 004226ac

P0: 00000036    P1: d5dff5f7    P2: 000854e4    P3: 57fff77f

P4: 031ffe20    P5: 031c5108    FP: 031ffe5c

A0.w: 00000000    A0.x: 00000000    A1.w: 00000000    A1.x: 00000000

LB0: 0329cf21  LT0: 0329cf14  LC0: 00000000

LB1: 00000001  LT1: 00000000  LC1: 00000000

B0: 00001000  L0: 00000000  M0: 00000000  I0: 03002578

B1: 031fedc4  L1: 00000000  M1: 00000000  I1: 0000001b

B2: 03298244  L2: 00000000  M2: 00000000  I2: 00420000

B3: 00000312  L3: 00000000  M3: 00000000  I3: 00000002

 

USP: 031febe4   ASTAT: 02000000

 

 

Hardware Trace:

0 Target : [<00102c98>]<0>

   Source : [<00105816>]<0>

1 Target : [<00105784>]<0>

   Source : [<00105780>]<0>

2 Target : [<00105754>]<0>

   Source : [<001058a0>]<0>

3 Target : [<00105878>]<0>

   Source : [<031ab15a>]<0>

4 Target : [<031ab14a>]<0>

   Source : [<031ab13a>]<0>

5 Target : [<031ab12c>]<0>

   Source : [<031ab146>]<0>

6 Target : [<031ab13c>]<0>

   Source : [<031a9910>]<0>

7 Target : [<031a98d0>]<0>

   Source : [<031a987e>]<0>

8 Target : [<031a9878>]<0>

   Source : [<031ab284>]<0>

9 Target : [<031ab280>]<0>

   Source : [<0303076e>]<0>

10 Target : [<0303076a>]<0>

   Source : [<03030750>]<0>

11 Target : [<03030748>]<0>

   Source : [<0303075e>]<0>

12 Target : [<03030756>]<0>

   Source : [<0301f200>]<0>

13 Target : [<0301f1f4>]<0>

   Source : [<0300fb96>]<0>

14 Target : [<0300fb8e>]<0>

   Source : [<03030752>]<0>

15 Target : [<03030752>]<0>

   Source : [<03030746>]<0>

Stack from 03065e74:<0>

       <0> 00000007<0> 00102e78<0> 03065e80<0> 031ab15c<0> 0000ffff<0> 00000007<

0> 00000000<0> 00030001<0>

       <0> 031ab15c<0> 00000001<0> 00000000<0> 00000000<0> ffffffe0<0> 031ab338<

0> ffffff9c<0> 00000000<0>

       <0> 001253cc<0> 00000003<0> 00125444<0> 00000002<0> fffffffe<0> 004226ac<

0> ffffff9c<0> 03065ef4<0>

       <0> 001d79e8<0> 004244d4<0> 00004717<0> 00000000<0> 00125450<0> 00000005<

0> 00000002<0> ffffe000<0>

       <0> 00000000<0> 001059d6<0> 00132b4c<0> 00000000<0> ffffe000<0> 0010581a<

0> 001061c0<0> 004226ac<0>

       <0> 0000ffff<0> 00082000<0> 00000000<0> 0303073e<0> 031ab15c<0> 00000030<

0> 0006002a<0> 00000000<0>

Call Trace:<0>

Bus error

root:/bin>

 

Let me know some suggestions to fix this issue

 

 

 

Regards, Senthil

QuoteReplyEditDelete

 

 

2008-05-28 03:11:17     Re: Run Time error

Mike Frysinger (UNITED STATES)

Message: 56319   

 

please search the forums and documentation

 

http://docs.blackfin.uclinux.org/doku.php?id=debuging_applications#analyzing_traces

QuoteReplyEditDelete

 

 

2008-05-28 09:50:57     Re: Run Time error

P SENTHIL KUMAR (INDIA)

Message: 56348   

 

hi mike,

 

thanks for your suggestion

 

Regards,Senthil

QuoteReplyEditDelete

 

 

2008-05-30 09:34:22     Re: Run Time error

P SENTHIL KUMAR (INDIA)

Message: 56471   

 

hi Mike,

 

as per suggestion i had taken the gdb file of th executable and try to trace the issue,

 

i cant able to get the disassemble of the exe

 

but below is the execution state of gdb file

 

>bfin-uclinux-gcc objdump -d dist_test.gdb

 

dist_test.gdb:     file format elf32-little

 

objdump: Can't disassemble for architecture UNKNOWN!

 

>

 

let me know your suggestion

 

regards,Senthil

QuoteReplyEditDelete

 

 

2008-05-30 11:46:03     Re: Run Time error

Robin Getz (UNITED STATES)

Message: 56476   

 

Senthil:

 

you should be using ">bfin-uclinux-objdump -d dist_test.gdb". What you typed was wrong? Where did you see that?

 

-Robin

QuoteReplyEditDelete

 

 

2008-06-02 03:50:50     Re: Run Time error

P SENTHIL KUMAR (INDIA)

Message: 56548   

 

hi Robin,

 

Thanks for your update,

 

i had understood wrongly, by mistake only i had written as bfin-uclinux-gcc objdump -d dist_test.gdb

 

As per your suggestion i had changed the commnad,now i can able to see the disassemble of the executable file.

 

the executable contains upto 3372 address line, in that i can able to see upto 30e8 address line in the disassemble, i cant able to see the disassemble from the starting 0000.

 

Is it possible to see the application disassemble from the 0000 - 3372 address line for debugging

 

below is the disassemble i had got while executing the >bfin-uclinux-objdump -d dist_test.gdb

 

 

 

   3314:       38 b5           W[FP+0x8]=R0;

    3316:       1a e5 53 00     P2=[P3+0x14c];

    331a:       57 30           R2=FP;

    331c:       10 91           R0=[P2];

    331e:       21 e1 17 47     R1=0x4717 (X);

    3322:       42 64           R2+=0x8;

    3324:       ff e3 0e f1     CALL  1540 <__init+0xf8>;

    3328:       01 e8 00 00     UNLINK;

    332c:       10 00           RTS;

        ...

 

00003330 <___do_global_ctors_aux>:

    3330:       c5 04           [--SP] = (P5:5);

    3332:       00 e8 03 00     LINK 0xc;

    3336:       1a e5 3f 00     P2=[P3+0xfc];

    333a:       10 e4 ff ff     R0=[P2+-4];

    333e:       6a 32           P5=P2;

    3340:       38 0c           CC=R0==-1;

    3342:       e5 6f           P5+=-4;

    3344:       0a 18           IF CC JUMP 3358 <___do_global_ctors_aux+0x28>;

    3346:       00 00           NOP;

    3348:       10 32           P2=R0;

    334a:       51 91           P1=[P2];

    334c:       53 ac           P3=[P2+0x4];

    334e:       e5 6f           P5+=-4;

    3350:       61 00           CALL  (P1);

    3352:       6a 91           P2=[P5];

    3354:       7a 0c           CC=P2==-1;

    3356:       fa 17           IF ! CC JUMP 334a <___do_global_ctors_aux+0x1a>(BP);

    3358:       01 e8 00 00     UNLINK;

    335c:       85 04           (P5:5) = [SP++];

    335e:       10 00           RTS;

Disassembly of section .fini:

 

00003360 <__fini>:

    3360:       4b 01           [--SP] = P3;

    3362:       00 e8 03 00     LINK 0xc;

    3366:       73 ad           P3=[SP+0x14];

    3368:       ff e3 d0 f1     CALL  1708 <___do_global_dtors_aux>;

    336c:       01 e8 00 00     UNLINK;

    3370:       73 90           P3=[SP++];

    3372:       10 00           RTS;

psenthil@mdtv/Testing/>

 

 

 

 

 

 

Regard, Senthil

Attachments

    Outcomes