2010-07-22 09:25:19     gdbserver exits when I try to run program on BF533 Stamp board

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

2010-07-22 09:25:19     gdbserver exits when I try to run program on BF533 Stamp board

Norman Yee (UNITED STATES)

Message: 91583   

 

I am running gdbserver on my BF533 Stamp board.  When I try to run a progam on it, I get this output: "Child exited with retcode = 1.  Child exited with status 1" and gdbserver exits unexpectedly.

 

Here are the details:

 

I'm building a simple hello world app with gcc 4.1.2:

 

bfin-uclinux-gcc -g -o test test.c

 

On my target:

 

root:/tmp> chmod 777 test

root:/tmp> ./test

hello world

root:/tmp> gdbserver localhost:3456 test

Process test created; pid = 165

Listening on port 3456

 

Remote debugging from host 192.168.0.1

 

Child exited with retcode = 1

 

Child exited with status 1

GDBserver exiting

 

root:/tmp> version

kernel:    Linux release 2.6.34.1-ADI-2010R1-pre, build #2 Tue Jul 20 17:49:40 E

DT 2010

toolchain: bfin-uclinux-gcc release gcc version 4.1.2 (ADI svn)

user-dist: release 2009R1, build #1 Tue Jul 20 17:48:32 EDT 2010

 

On my host:

 

me@my-desktop:~/test$ bfin-uclinux-gdb test.gdb

GNU gdb 6.6

Copyright (C) 2006 Free Software Foundation, Inc.

GDB is free software, covered by the GNU General Public License, and you are

welcome to change it and/or distribute copies of it under certain conditions.

Type "show copying" to see the conditions.

There is absolutely no warranty for GDB.  Type "show warranty" for details.

This GDB was configured as "--host=i686-pc-linux-gnu --target=bfin-uclinux"...

(gdb) target remote 192.168.0.2:3456

Remote debugging using 192.168.0.2:3456

0x02a80044 in _stext ()

(gdb) b main

Breakpoint 1 at 0x2a80140: file test.c, line 5.

(gdb) c

Continuing.

 

Program exited with code 01.

 

I did a search on this site and it sounds like it could be a bug in the kernel:

 

  blackfin.uclinux.org/gf/project/toolchain/tracker/?action=TrackerItemEdit&tracker_item_id=5706

 

The above bug was fixed for the BF537 stamp board but I'm using a BF533 stamp board.  I tried different versions of the kernel and I see the same problem.  Is this a bug or am I doing something wrong?

QuoteReplyEditDelete

 

 

2010-07-22 12:26:00     Re: gdbserver exits when I try to run program on BF533 Stamp board

Mike Frysinger (UNITED STATES)

Message: 91597   

 

the bug in question was fixed a while ago and is processor independent

 

what version of the toolchain exactly are you using ?  you should be using a trunk toolchain with gcc-4.3.

QuoteReplyEditDelete

 

 

2010-07-22 14:55:41     Re: gdbserver exits when I try to run program on BF533 Stamp board

Norman Yee (UNITED STATES)

Message: 91608   

 

I was using gcc 4.1.2.  I rebuilt everything with gcc 4.3.5 from the trunk and I still see the same problem.

 

On my target:

 

root:/> version

kernel:    Linux release 2.6.34.1-ADI-2010R1-pre, build #4 Thu Jul 22 10:33:14 E

DT 2010

toolchain: bfin-uclinux-gcc release gcc version 4.3.5 (ADI-trunk/git-08d8861)

user-dist: release 2009R1, build #2 Thu Jul 22 10:32:20 EDT 2010

 

On my host:

 

me@my-desktop:~/test$ bfin-uclinux-gcc --version

bfin-uclinux-gcc (ADI-trunk/git-08d8861) 4.3.5

Copyright (C) 2008 Free Software Foundation, Inc.

This is free software; see the source for copying conditions.  There is NO

warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

QuoteReplyEditDelete

 

 

2010-07-23 05:09:01     Re: gdbserver exits when I try to run program on BF533 Stamp board

Sonic Zhang (CHINA)

Message: 91654   

 

Which uClinux-dist release do you use? 2009R1.1 or SVN trunk?

 

And what's your simple application?

QuoteReplyEditDelete

 

 

2010-07-23 09:28:27     Re: gdbserver exits when I try to run program on BF533 Stamp board

Norman Yee (UNITED STATES)

Message: 91661   

 

I'm using the SVN trunk one:

 

  blackfin.uclinux.org/gf/download/frsrelease/345/3632/uclinux-dist-trunk-svn.src.tar.bz2

 

and a simple hello world app:

 

#include <stdio.h>

 

int main()

{

    printf("hello world\n");

    return 0;

}

QuoteReplyEditDelete

 

 

2010-07-26 01:16:04     Re: gdbserver exits when I try to run program on BF533 Stamp board

Sonic Zhang (CHINA)

Message: 91712   

 

Then, do you also use the SVN trunk toolchain?

QuoteReplyEditDelete

 

 

2010-07-26 08:46:34     Re: gdbserver exits when I try to run program on BF533 Stamp board

Norman Yee (UNITED STATES)

Message: 91727   

 

Yes, I'm using gcc 4.3.5 from the trunk.

QuoteReplyEditDelete

 

 

2010-07-26 11:12:40     Re: gdbserver exits when I try to run program on BF533 Stamp board

Norman Yee (UNITED STATES)

Message: 91733   

 

I re-downloaded the toolchain and uclinux sources from the trunk, rebuilt the kernel, and debugging works now.  I'm not sure what changed.  I compared the gcc and uclinux versions from my previous post and they match.

Attachments

    Outcomes