AnsweredAssumed Answered

GDBserver crash (2012R2-RC2)

Question asked by RobertCraig on Sep 12, 2013
Latest reply on Sep 16, 2013 by RobertCraig

I've got the 2012R2-RC2 buildroot up and running with our hardware and application and have started debugging.  Unfortunately, gdbserver on the target crashes as soon as I connect into it from the host.  I've selected "Build gdb server for target" and the GDB debugger version is 6.6.

 

I'm obviously doing something wrong, but I'm not sure what it is...

 

      Thanks for any help,

          Robert Craig

 

On the host:

 

(gdb) file ptpEnable.gdb

Reading symbols from ptpEnable.gdb...done.

No registers.

(gdb) break main

Breakpoint 1 at 0x1e0: file ptpEnable.c, line 59.

(gdb) target remote 192.168.10.10:1234

Remote debugging using 192.168.10.10:1234

Remote communication error: Connection reset by peer.

(gdb)

 

 

gdbserver host:1234 /usr/bin/ptpEnable 1 &
[1] 226 gdbserver host:1234 /usr/bin/ptpEnable 1

root:/> Process /usr/bin/ptpEnable created; pid = 227
Listening on port 1234

 

root:/> Remote debugging from host 192.168.10.7
NULL pointer access
Deferred Exception context
CURRENT PROCESS:
COMM=gdbserver PID=226  CPU=0
TEXT = 0x00860040-0x0086b300        DATA = 0x0086b320-0x0086f968
BSS = 0x0086f968-0x0086fec0  USER-STACK = 0x00871f08

 

return address: [0x008613be]; contents of:
0x00861390:  0000  0538  0010  0000  05e3  3229  e800  0006
0x008613a0:  3218  e3ff  f85f  e121  07b0  0908  10f2  e120
0x008613b0:  07d0  e300  34e1  3208  bbe0  6120  0d45 [9a08]
0x008613c0:  18f3  6006  6005  e128  0061  e130  002a  e131

 

ADSP-BF518-0.65535(Detected 0.2) 400(MHz CCLK) 100(MHz SCLK) (mpu off)
Linux version 3.5.7-ADI-2012R2-svn11 (rcraig@Blackfin-buildroot64-VB) (gcc version 4.3.5 (ADI-2012R2-RC2) ) #12 PREEMPT Thu Sep 12 16:37:39 EDT 2013

 

SEQUENCER STATUS:               Not tainted
SEQSTAT: 00000027  IPEND: 0008  IMASK: ffff  SYSCFG: 0006
  EXCAUSE   : 0x27
  physical IVG3 asserted : <0xffa00794> { _trap + 0x0 }
RETE: <0x00000000> /* Maybe null pointer? */
RETN: <0x0123c000> /* kernel dynamic memory */
RETX: <0x00000480> /* Maybe fixed code section */
RETS: <0x008613b6> [ gdbserver + 0x1376 ]
PC  : <0x008613be> [ gdbserver + 0x137e ]
DCPLB_FAULT_ADDR: <0x00000000> /* Maybe null pointer? */
ICPLB_FAULT_ADDR: <0x008613be> [ gdbserver + 0x137e ]
PROCESSOR STATE:

 

An objdump of gdbserver gives me:

 

  1362:       ff e3 5f f8     CALL 0x420 <_registers_length>;
    1366:       21 e1 b0 07     R1 = 0x7b0 (X);         /*              R1=0x7b0
(1968) */
    136a:       08 09           CC = R0 <= R1;
    136c:       f2 10           IF !CC JUMP 0x1550 <_putpkt_binary+0x1f8>;
    136e:       20 e1 d0 07     R0 = 0x7d0 (X);         /*              R0=0x7d0
<_new_register_cache>(2000) */
    1372:       00 e3 e1 34     CALL 0x7d34 <_malloc>;
    1376:       08 32           P1 = R0;
    1378:       e0 bb           [FP -0x8] = R0;
    137a:       20 61           R0 = 0x24 (X);          /*              R0=0x0(
0) */
    137c:       45 0d           CC = P5 <= 0x0;
    137e:       08 9a           B[P1++] = R0;
    1380:       f3 18           IF CC JUMP 0x1566 <_putpkt_binary+0x20e>;
    1382:       06 60           R6 = 0x0 (X);           /*              R6=0x0(  0) */
    1384:       05 60           R5 = 0x0 (X);           /*              R5=0x0(  0) */
    1386:       28 e1 61 00     P0 = 0x61 (X);          /*              P0=0x61( 97) */
    138a:       30 e1 2a 00     I0 = 0x2a (X);          /*              I0=0x2a( 42) */

Outcomes