From: "M Letti" <m.letti@gmx.net>
To: 'OMAP' <linux-omap-open-source@linux.omap.com>
Subject: gdbserver hangs on target
Date: Fri, 6 Jan 2006 22:16:21 +0100 [thread overview]
Message-ID: <200601062116.k06LGSUM013218@frio.ext.ti.com> (raw)
In-Reply-To: <200601061347.k06Dl0JP006201@brazos.ext.ti.com>
Dear Sirs,
finally I managed to crosscompile my gdb and gdbserver. Though it would
still be interesting how to patch the according file (see mail below), it
works now with the newer gdb version 6.4.
Now that I would like to debug a simple hello world on my target, I
experience the problem, that gdbserver hangs on executing (on the host, I
get the error message "Ignoring packet error, continuing...")
Is there any hint you can give me?
Below my tasks to start debugging:
----------------------- target: OSK 5912 ------------------------------
> gdbserver hostip:port helloworld_arm
# following output appears:
Process helloworld_arm created; pid=49
Listening on port 6666
# After having connected via gdb on the host, this output appears:
Remote debugging from host 192.168.0.4
# After executing run, this appears:
Killing inferior
GDBserver restarting
Process helloworld_arm created; pid=50
# from now on, it just hangs
--------------------- host: fedora linux ------------------------------
> arm-linux-gdb helloworld_arm
# note, that I compiled the program with debug-option:
# arm-linux-gcc -g -o helloworld_arm helloworld.c
gdb starts...
> (gdb) target extended-remote targetip:port
Remote debugging using 192.168.0.6:6666
...
> (gdb) run
The program being debugged has been started already.
Start it from the beginning? (y or n) y
Starting program: ./helloworld_arm
# after a while, following appears:
Ignoring packet error, continuing...
Ignoring packet error, continuing...
Ignoring packet error, continuing...
# from now on, it just hangs
-----------------------------------------------------------------------
Therefore, on the host I get the errors "Ignoring packet error,
continuing..." - the network connection is okay, since the server responds
to my debug request.
Do you have any ideas what's wrong?
Maybe I should add, that after copying gdbserver on my target, it was not
able to start due to lack of a library called "libthread_db.so.1". I have
copied it from the host (from the same toolchain with which I compiled gdb)
to the target in the lib-directory, and then it worked.
Maybe it has something to do with this aspect. Otherwise I have no clue :-(
Any help is appreciated very much,
Thanks in advance,
Letti
-----Ursprüngliche Nachricht-----
Von: linux-omap-open-source-bounces@linux.omap.com
[mailto:linux-omap-open-source-bounces@linux.omap.com] Im Auftrag von M
Letti
Gesendet: Freitag, 06. Jänner 2006 14:47
An: 'Vineet Tuli'; 'OMAP'
Betreff: AW: where to find cross-compiled versions of gdbserver?
Dear Vineet,
thank you for your assistance. I think it can help me.
I just experience one problem: your friend mentioned, that the file
"/usr/src/debug/gdb-6.3/sim/arm/iwmmxt.c" has to be patched for successful
compilation of gdb.
My question:
- where do I get the patched file?
- once obtained, do I just need to replace this single file?
Thanks again,
Letti
-----Ursprüngliche Nachricht-----
Von: Vineet Tuli [mailto:vineet@cybernetra.com]
Gesendet: Freitag, 30. Dezember 2005 05:02
An: OMAP
Cc: M Letti
Betreff: Re: where to find cross-compiled versions of gdbserver?
Dear M Letti,
One of my friend, Meenakshi prepared the following howto for cross
compiling GDB for ARM. I am enclosing the same.
Thanks
Vineet
****************************************************************************
*******************
Howto build gdb for ARM
NOTE: The following compilation was done on Fedora Core 4 Linux.
Download the gdb pakage from the following site:
ftp://ftp.gnu.org/gnu/gdb wget -c
ftp://ftp.gnu.org/gnu/gdb/gdb-6.3.tar.bz2
Place the downloaded file in /usr/src directory of your system.
Under /usr/src, create a debug directory and extract the gdb package in this
(/usr/src/debug) directory.
[root@localhost]# cd /usr/src/debug
[root@localhost]# tar jxf ../gdb-6.3.tar.bz2
Build gdb debugger
The debugger must be built into directories separate from the source. Thus,
create a directory for gdb within the /usr/src/debug directory.
[root@localhost]# mkdir /usr/src/debug/build_gdb
NOTE: The following file of source code of gdb-6.3 needs to be patched for
successful compilation of gdb:
/usr/src/debug/gdb-6.3/sim/arm/iwmmxt.c
Chose the prefix for the new debugger. This is a directory where the binary
and other debugger files resides. This application report uses /opt/gdebug
for the new debugger. The directory is created by the installation of the
tools. Go to the /usr/src/debug/gdb-6.3 directory to configure and then
build the binary and other debugger files with the commands shown below.
[root@localhost]# cd /usr/src/debug/build_gdb
[root@localhost]# ../gdb-6.3/configure --target=arm-linux
--prefix=/opt/gdebug
[root@localhost]# make
[root@localhost]# make install
The binary generated resides in /opt/gdebug and is fairly large. This is why
the gdb binary can't be used as-is on the target and the gdbserver is used
instead.
Build gdb server
The gdb server wasn't built earlier because it has to be cross-compiled for
the target using the appropriate tools. To do so, create a directory to
build the gdb server, move to it and build the gdb server:
[root@localhost]# mkdir /usr/src/debug/build_gdbserver
[root@localhost]# cd /usr/src/debug/build_gdbserver
[root@localhost]# export PATH=/opt/arm/3.4.1/bin:$PATH
[root@localhost]# CC=arm-linux-gcc ../gdb-6.3/gdb/gdbserver/configure
--host=arm-linux --prefix=/opt/gdebug/arm-linux
[root@localhost]# make
[root@localhost]# make install
The gdb server binary, 'gdbserver', has now been installed in your
/opt/gdebug/arm-linux/bin directory.
Once built, copy gdbserver to the target's root file system.
On Thu, 2005-12-29 at 21:00 +0100, M Letti wrote:
> Dear Sirs,
>
>
>
> I use the precompiled toolchain (version 3.3.2) on my OSK5912, which is
> available from http://linux.omap.com/pub/toolchain/ .
>
> So far so good, I can use the arm-linux-gcc command to compile my own
> programs for my target.
>
>
>
> But now that I want to debug these apps remotely, I'm looking for the
> cross-compiled versions of gdb and gdbserver (that is, arm-linux-gdb and
> arm-linux-gdbserver.and wonder, if they shouldn't be included in the
> toolchain I downloaded already? I just can't find them.(they are not in
the
> 3.3.2/bin directory where for example the arm-linux-gcc resides)
>
>
>
> Could anyone please point me out where they normally would be located, or
if
> I have to cross-compile them on my own (in fact, I have already tried this
> step, but got mass of errors when executing "make").
>
>
>
>
>
> By the way, I would like to ask you if you by chance can recommend any
> graphical development and debugging tools for my target (besides DDD &
co)?
> Are there for example any special Eclipse plugins I could use, or should I
> use normal Eclipse environment and just set the remote debugging
> configuration appropriately to develop for my target?
>
>
>
>
>
> Thank you very much in advance,
>
>
>
> Michael
>
> _______________________________________________
> Linux-omap-open-source mailing list
> Linux-omap-open-source@linux.omap.com
> http://linux.omap.com/mailman/listinfo/linux-omap-open-source
_______________________________________________
Linux-omap-open-source mailing list
Linux-omap-open-source@linux.omap.com
http://linux.omap.com/mailman/listinfo/linux-omap-open-source
prev parent reply other threads:[~2006-01-06 21:16 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-12-29 20:00 where to find cross-compiled versions of gdbserver? M Letti
2005-12-30 4:01 ` Vineet Tuli
2006-01-06 13:46 ` AW: " M Letti
2006-01-06 21:16 ` M Letti [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200601062116.k06LGSUM013218@frio.ext.ti.com \
--to=m.letti@gmx.net \
--cc=linux-omap-open-source@linux.omap.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox