2009-06-26 10:32:47     remote debugging

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

2009-06-26 10:32:47     remote debugging

Filip Vanalme (BELGIUM)

Message: 76391   

 

- board with BF561

- kernel version 2006R1

- program compiled with -g option

 

(I'm a newbie in Linux and debugging with gdb...)

 

I have a small program with a main routine containing just a number of printf commands. When I run it on the board, it works OK (I get the outputs I expect) and exits normally. Now, I want to remote debug that program.

 

On the target board, I start the gdbserver with "gdbserver :2000 xtg2". I get :

Process xtg2 created; pid = 41

Listening on port 2000

 

On my host computer, I start the gdb service with "bfin-uclinux-gdb xtg2.gdb". I get the gdb prompt. I connect to the target board with "target remote 10.0.48.62:2000". Then I set a breakpoint for the main routine with "break main". It replies with something like "Breakpoint 1 at..." .

 

On the target board side,I now see "Remote debugging from host x.x.x.x".

 

Back to the host side. I enter "c" to continue. I get :

Continuing.

warning: Unable to find dynamic linker breakpoint function.

GDB will be unable to debug shared library initializers

and track explicitly loaded dynamic code.

Error while mapping shared library sections:

/lib/libm.so.0: Bestand of map bestaat niet.

Error while mapping shared library sections:

/lib/libc.so.0: Bestand of map bestaat niet.

Error while mapping shared library sections:

/lib/ld-uClibc-0.9.27.so: Bestand of map bestaat niet.

Error while reading shared library symbols:

/lib/libm.so.0: Bestand of map bestaat niet.

Error while reading shared library symbols:

/lib/libc.so.0: Bestand of map bestaat niet.

Error while reading shared library symbols:

/lib/ld-uClibc-0.9.27.so: Bestand of map bestaat niet.

 

Breakpoint 1, main (argc=1, argv=0x77fed4) at xt100/system/src/root.c:216

216       t = 1;

 

When I now try to step with "s"  or "n" the board crashes with a Kernel Panic. However, when I do a continue instead of a step, the program continues normally and exits normally.

 

What do I do wrong ?

 

Filip

TranslateQuoteReplyEditDelete

 

 

2009-06-26 10:40:52     Re: remote debugging

Mike Frysinger (UNITED STATES)

Message: 76392   

 

there have been a significant number of fixes in the toolchain/gdb/kernel support that would affect gdbserver.  we know it is much more stable with 2008R1.5 than any 2006 or older release.  you really really should upgrade than try to fight a known flakey gdbserver.

QuoteReplyEditDelete

Attachments

    Outcomes