AnsweredAssumed Answered

SIGBUS Error while debugging using gdbserver on BF609

Question asked by nmzaheer on Jan 29, 2014
Latest reply on Feb 14, 2014 by Aaronwu

Hi there

 

We are using BF609 board ported with uClinux 2012R1 buildroot distribution. We have the following code we want to run on BF609. However during debugging through gdbserver we are getting a SIGBUS error. I am pasting the code we are trying to debug and the gdb session below

 

 

.section .data.l1;

.align 2

in: .byte2 0x2828, 0x4444, 0x1234, 0x6DF0, 0x7777, 0xEEEE, 0x1B11, 0x5111;

.align 2

out: .byte2 0,0,0,0,0,0,0,0;

 

.section .text;

.global _main;

 

_main:

nop;

p0=[p3+in@GOT17m4];

p1=[p3+out@GOT17m4];

i0=p0;

b0=i0;

l0=16;

p2=8;

loop loop1 LC0=p2;

loop_begin loop1;

r1.l=w[i0];

w[p1]=r1.l;

i0+=4;

p1+=2;

loop_end loop1;

nop;

nop;

p0=[p3+in@GOT17m4];

p1=[p3+out@GOT17m4];

nop;

nop;

_main.end:

(gdb) target remote 10.7.143.42:34251

Remote debugging using 10.7.143.42:34251

0x05418bc0 in ?? ()

(gdb) break main

Breakpoint 1 at 0x51a96d0: file A2.s, line 11.

(gdb) continue

Continuing.

warning: Unable to fetch _dl_debug_addr->.r_brk entry point (at address 0x00000000) from dynamic linker

warning: Unable to find dynamic linker breakpoint function.

GDB will be unable to debug shared library initializers

and track explicitly loaded dynamic code.

 

Program received signal SIGBUS, Bus error.

0x05620962 in *___GI_fflush_unlocked (stream=0x5399800)

    at libc/stdio/fflush.c:91

91      libc/stdio/fflush.c: No such file or directory.

        in libc/stdio/fflush.c

(gdb)

 

 

While debugging this step by step, we noticed that when at the line l0=16; or any multiples of 16, the value of l0 is assigned as 0xa1. Maybe that is why we might be getting the error. Can you look into this and suggest a solution?

 

Regards

Zaheer

Outcomes