linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* gdbserver
@ 2000-01-22  3:20 dony
  2000-01-22 10:27 ` gdbserver Jesper Skov
  0 siblings, 1 reply; 9+ messages in thread
From: dony @ 2000-01-22  3:20 UTC (permalink / raw)
  To: linuxppc-embed


Hello,

       Now I want to use gdbserver to debug my test app.
      Running "gdbserver :6666 ./mytest" on the target (Powerpc 860)
show a message:
                    Process ./mytest created :pid=8
      But I don't know how to run gdb on the host (X86). The README
doesn't seem to explain
clearly . It says first running "gdb mytest" on the host and then
"target remote mytarget:6666".
But I don't understand something about "gdb mytest" . At this time
should I run a x86 "gdb" or something like "powerpc-linux-gdb"? And the
"mytest"? Is it compiled with x86 gcc or cross-compiled with
"powerpc-linux-gcc"? Really I am very confused at this point:-((
       Do you have any experience to share with me about how to build
and run gdbserver?
Or do you have any other debug tools which can be used in embedded-linux
environment?
        The README for gdbserver is written by Stu Grossman and Fred
Fish.
        Does someone know their email address?
Thank you very much:-)
dony


** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: gdbserver
  2000-01-22  3:20 gdbserver dony
@ 2000-01-22 10:27 ` Jesper Skov
  2000-01-24  1:51   ` gdbserver dony
  2000-01-27  2:48   ` How to gdbserver dony
  0 siblings, 2 replies; 9+ messages in thread
From: Jesper Skov @ 2000-01-22 10:27 UTC (permalink / raw)
  To: dony; +Cc: linuxppc-embed


>>>>> "dony" == dony  <dony.he@huawei.com.cn> writes:

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/

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: gdbserver
  2000-01-22 10:27 ` gdbserver Jesper Skov
@ 2000-01-24  1:51   ` dony
  2000-01-24  8:20     ` gdbserver Jesper Skov
  2000-01-27  2:48   ` How to gdbserver dony
  1 sibling, 1 reply; 9+ messages in thread
From: dony @ 2000-01-24  1:51 UTC (permalink / raw)
  To: Jesper Skov, linuxppc-embed




Jesper Skov wrote:

> >>>>> "dony" == dony  <dony.he@huawei.com.cn> writes:
>
> 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/

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: gdbserver
  2000-01-24  1:51   ` gdbserver dony
@ 2000-01-24  8:20     ` Jesper Skov
  0 siblings, 0 replies; 9+ messages in thread
From: Jesper Skov @ 2000-01-24  8:20 UTC (permalink / raw)
  To: dony; +Cc: Jesper Skov, linuxppc-embed


>>>>> "dony" == dony  <dony.he@huawei.com.cn> writes:

dony> Jesper Skov wrote:

>> >>>>> "dony" == dony <dony.he@huawei.com.cn> writes:
>>
dony> Hello,
>>
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"?
>>  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> "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/

^ permalink raw reply	[flat|nested] 9+ messages in thread

* How to gdbserver...
  2000-01-22 10:27 ` gdbserver Jesper Skov
  2000-01-24  1:51   ` gdbserver dony
@ 2000-01-27  2:48   ` dony
  2000-01-27 10:46     ` Jesper Skov
  1 sibling, 1 reply; 9+ messages in thread
From: dony @ 2000-01-27  2:48 UTC (permalink / raw)
  To: Jesper Skov, Brendan John Simon, linuxppc-embed




Jesper Skov wrote:

> >>>>> "dony" == dony  <dony.he@huawei.com.cn> writes:
>
> 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/

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: How to gdbserver...
  2000-01-27  2:48   ` How to gdbserver dony
@ 2000-01-27 10:46     ` Jesper Skov
  2000-01-27 11:27       ` Looking for a better debug tool for embed-environment dony
  0 siblings, 1 reply; 9+ messages in thread
From: Jesper Skov @ 2000-01-27 10:46 UTC (permalink / raw)
  To: dony; +Cc: Jesper Skov, Brendan John Simon, linuxppc-embed


>>>>> "dony" == dony  <dony.he@huawei.com.cn> writes:

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/

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Looking for a better debug tool for embed-environment...
  2000-01-27 10:46     ` Jesper Skov
@ 2000-01-27 11:27       ` dony
  2000-01-27 11:35         ` Jesper Skov
  0 siblings, 1 reply; 9+ messages in thread
From: dony @ 2000-01-27 11:27 UTC (permalink / raw)
  To: Jesper Skov, linuxppc-embed


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/

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Looking for a better debug tool for embed-environment...
  2000-01-27 11:27       ` Looking for a better debug tool for embed-environment dony
@ 2000-01-27 11:35         ` Jesper Skov
  0 siblings, 0 replies; 9+ messages in thread
From: Jesper Skov @ 2000-01-27 11:35 UTC (permalink / raw)
  To: dony; +Cc: linuxppc-embed


>>>>> "dony" == dony  <dony.he@huawei.com.cn> writes:

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/

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Looking for a better debug tool for embed-environment...
@ 2000-01-30  6:37 Wang Yong
  0 siblings, 0 replies; 9+ messages in thread
From: Wang Yong @ 2000-01-30  6:37 UTC (permalink / raw)
  To: dony, Jesper Skov, linuxppc-embed



why not try DDD(data display debugger). the debuger
engine is gdb but it has a friendly GUI and easier to
use. remember to configure it to use the xgdb.

w.y.

--- dony <dony.he@huawei.com.cn> wrote:
>
> 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/

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2000-01-30  6:37 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2000-01-22  3:20 gdbserver dony
2000-01-22 10:27 ` gdbserver Jesper Skov
2000-01-24  1:51   ` gdbserver dony
2000-01-24  8:20     ` gdbserver Jesper Skov
2000-01-27  2:48   ` How to gdbserver dony
2000-01-27 10:46     ` Jesper Skov
2000-01-27 11:27       ` Looking for a better debug tool for embed-environment dony
2000-01-27 11:35         ` Jesper Skov
  -- strict thread matches above, loose matches on Subject: below --
2000-01-30  6:37 Wang Yong

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).