dony> Hello,
dony> Now I want to use gdbserver to debug my test app.
dony> Running "gdbserver :6666 ./mytest" on the target (Powerpc 860)
dony> show a message: Process ./mytest created :pid=8 But I don't know
dony> how to run gdb on the host (X86). The README doesn't seem to
dony> explain clearly . It says first running "gdb mytest" on the host
dony> and then "target remote mytarget:6666". But I don't understand
dony> something about "gdb mytest" . At this time should I run a x86
dony> "gdb" or something like "powerpc-linux-gdb"? And the "mytest"?
mytest is the same executable you run on the target. gdb you run on
the host would be powerpc-linux-gdb (i.e., cross-debugger), thus:
target:> gdbserver :6666 ./mytest
host:> powerpc-linux-gdb mytest
[...]
(gdb) target remote mytarget:6666
dony> Is it compiled with x86 gcc or cross-compiled with
dony> "powerpc-linux-gcc"? Really I am very confused at this point:-((
mytest is compiled with powerpc-linux-gcc.
dony> Do you have any experience to share with me about how to build
dony> and run gdbserver? Or do you have any other debug tools which
dony> can be used in embedded-linux environment? The README for
dony> gdbserver is written by Stu Grossman and Fred Fish. Does
dony> someone know their email address? Thank you very much:-) dony
Yes I know their email addresses. But you don't want to hassle them
with this. Trust me :)
Jesper
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
dony> Hello,
dony> Now I want to use gdbserver to debug my test app.
dony> Running "gdbserver :6666 ./mytest" on the target (Powerpc 860)
dony> show a message: Process ./mytest created :pid=8 But I don't know
dony> how to run gdb on the host (X86). The README doesn't seem to
dony> explain clearly . It says first running "gdb mytest" on the host
dony> and then "target remote mytarget:6666". But I don't understand
dony> something about "gdb mytest" . At this time should I run a x86
dony> "gdb" or something like "powerpc-linux-gdb"? And the "mytest"?
mytest is the same executable you run on the target. gdb you run on
the host would be powerpc-linux-gdb (i.e., cross-debugger), thus:
target:> gdbserver :6666 ./mytest
host:> powerpc-linux-gdb mytest
[...]
(gdb) target remote mytarget:6666
dony> Is it compiled with x86 gcc or cross-compiled with
dony> "powerpc-linux-gcc"? Really I am very confused at this point:-((
mytest is compiled with powerpc-linux-gcc.
"powerpc-linux-gdb" is compiled with gcc or powerpc-linux-gcc?
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
dony> Now I want to use gdbserver to debug my test app. Running
dony> "gdbserver :6666 ./mytest" on the target (Powerpc 860) show a
dony> message: Process ./mytest created :pid=8 But I don't know how to
dony> run gdb on the host (X86). The README doesn't seem to explain
dony> clearly . It says first running "gdb mytest" on the host and
dony> then "target remote mytarget:6666". But I don't understand
dony> something about "gdb mytest" . At this time should I run a x86
dony> "gdb" or something like "powerpc-linux-gdb"? And the "mytest"?
quoted
mytest is the same executable you run on the target. gdb you run
on the host would be powerpc-linux-gdb (i.e., cross-debugger),
thus:
target:> gdbserver :6666 ./mytest
host:> powerpc-linux-gdb mytest [...] (gdb) target remote
mytarget:6666
dony> Is it compiled with x86 gcc or cross-compiled with
dony> "powerpc-linux-gcc"? Really I am very confused at this point:-((
quoted
mytest is compiled with powerpc-linux-gcc.
dony> "powerpc-linux-gdb" is compiled with gcc or powerpc-linux-gcc?
gcc. You should look at one of the FAQ/HOWTO/READMEs/Home pages on the
sucject of embedded development. I think there was posted a small
howto on compiling the components a few days back. Check the archive.
One question: you are using an x86 host, right? If you use a PPC host,
you can just use the preinstalled GDB/GCC when building/debugging the
target binary.
dony>How do you build you powerpc-linux-gdb?
dony>I copy a gdb-4.17.tar.gz from LinuxPPC R4 CD.
dony>When I untar and decompress it, I type the following under gdb-4.17/gdb
dony>directory:
dony>
dony> ./configure --target=powerpc-linux
dony> make
dony>
dony> It fails to compile and say:
dony> make:*** No rule to make target `../bfd/bfd.h`, needed by `blockframe.o`.Stop.
dony>
dony>Yes, there is not bfd.h under gdb-4.17/bfd directory.
dony>Do you know why?
dony>Thank you very much.
I don't know why. It's an old debugger. I think we keep a more recent
version / CVS tree on sourceware.cygnus.com. It may work better. The
howto I mentioned before included links to the archives used, as far
as I remember.
Jesper
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
dony> Hello,
dony> Now I want to use gdbserver to debug my test app.
dony> Running "gdbserver :6666 ./mytest" on the target (Powerpc 860)
dony> show a message: Process ./mytest created :pid=8 But I don't know
dony> how to run gdb on the host (X86). The README doesn't seem to
dony> explain clearly . It says first running "gdb mytest" on the host
dony> and then "target remote mytarget:6666". But I don't understand
dony> something about "gdb mytest" . At this time should I run a x86
dony> "gdb" or something like "powerpc-linux-gdb"? And the "mytest"?
mytest is the same executable you run on the target. gdb you run on
the host would be powerpc-linux-gdb (i.e., cross-debugger), thus:
target:> gdbserver :6666 ./mytest
host:> powerpc-linux-gdb mytest
[...]
(gdb) target remote mytarget:6666
Hi, Jesper:
Following the above steps, now my host can connect with target.
Because I can see the following messages from host and target
respectively:
[target] IP=10.11.27.244
./gdbserver :6666 ./mytest
Process ./mytest created; pid=19
Remote debugging using :6666
[host] which is a x86 box
powerpc-linux-gdb --baud 9600 mytest
(gdb)target remote 10.11.27.244:6666
Remote debugging using 10.11.27.244:6666
0x30016a7c in ??()
(gdb)
Has the host and the target been connected via network yet?
If so, I type "run" after (gdb) at host side, then
(gdb)run
The program being debugged has been started already
Start it from the begging?(y or n) y
Starting program: /mytest/mytest
Don't know how to run. Try "help target".
I don't know why the program is running at this time.
type "list" can show my source code.
type "b main" can set breakpoint .
(gdb) b main
Breakpoint 1 at 0x10000328:file mytest.c, line 4.
(gdb) s
Cannot find bounds of current function
I don't know why I cannot run the program at host side. Am I missing
something?
I am pretty new with "GDB" debug.
Can some gurus give me some advices?
Thanks very much.
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
dony> Has the host and the target been connected via network yet? If
They have,
dony> so, I type "run" after (gdb) at host side, then (gdb)run The
dony> program being debugged has been started already Start it from
dony> the begging?(y or n) y Starting program: /mytest/mytest Don't
dony> know how to run. Try "help target".
You need to use 'continue'.
dony> I don't know why the program is running at this time. type
dony> "list" can show my source code. type "b main" can set
dony> breakpoint . (gdb) b main Breakpoint 1 at 0x10000328:file
dony> mytest.c, line 4. (gdb) s Cannot find bounds of current
dony> function
dony> I don't know why I cannot run the program at host side. Am I
dony> missing something? I am pretty new with "GDB" debug. Can some
dony> gurus give me some advices? Thanks very much.
info gdb
man gdb
Jesper
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
Hi,
Now I am looking for a friendly GUI debug tool for our
embed-linux-environment.
Do you know other debug tools which can be used in embed-environment?
The "gdbserver" and "powerpc-linux-gdb" are not friendly for debug,
especially in a large project.
Dony
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
dony> Hi, Now I am looking for a friendly GUI debug tool for our
dony> embed-linux-environment. Do you know other debug tools which
dony> can be used in embed-environment? The "gdbserver" and
dony> "powerpc-linux-gdb" are not friendly for debug, especially in a
dony> large project.
DDD or Insight are the ones I know of. I think Insight is now
available from sourceware.cygnus.com.
Jesper
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/