public inbox for insight@sourceware.org
 help / color / mirror / Atom feed
* Remote debug using Insight
@ 2002-10-02 22:22 Masahide Tomita
  2002-10-03  8:40 ` Keith Seitz
  0 siblings, 1 reply; 6+ messages in thread
From: Masahide Tomita @ 2002-10-02 22:22 UTC (permalink / raw)
  To: insight

Hi everyone,

I am quite new here in this ML, and in using Insight(gdb too.).

My question is: How do I use Insight to debug program running on remote
host?

I have Intel CPU board and local host (just a regular PC with Intel CPU)
running RedHat Linux 7.2.
Target CPU board is almost headless, and telnet connection on ether net
available. Command line based gdb is, of cource, available, but for many
people to debug their own programs on the target board, debugger with GUI is
more desirable.

I've looked for documents on the web for insight and remote debugging, but I
only found one telling how to use insight, even how to remote debug on
Linux.

I figured, from the document, that I could setup "Target Selection" in the
"File" menu of Insight main window, but I don't know how to connect to the
remote host.
I don't even know if it't possible to do this.

Please somebody help me.

Even pointers to good Docs are appreciated.

Thank you.

--

Masahide Tomita

fsi_tomi@bcpc601.neec.abk.nec.co.jp



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

* Re: Remote debug using Insight
  2002-10-02 22:22 Remote debug using Insight Masahide Tomita
@ 2002-10-03  8:40 ` Keith Seitz
  2002-10-03  8:54   ` multi-threaded debugging " Bruce Korb
  0 siblings, 1 reply; 6+ messages in thread
From: Keith Seitz @ 2002-10-03  8:40 UTC (permalink / raw)
  To: Masahide Tomita; +Cc: insight

On Thu, 3 Oct 2002, Masahide Tomita wrote:

> I am quite new here in this ML, and in using Insight(gdb too.).

Welcome.

> My question is: How do I use Insight to debug program running on remote
> host?

Ok, there are a bunch of questions to which you must know the answer in 
order to debug a remote target: 

What's the communications protocol?
This is the actual hardware communications between the host (running 
gdb/insight) and the target. Is it a serial connection? Ethernet? JTAG? 
For serial, you'll need to know what serial port the target is attached to 
and the baud rate. For ethernet, you'll need a hostname/IP address and 
port number. If you're using a JTAG box, you'll obviously need to know 
these parameters for the interface, not for the board proper, since GDB 
will be talking to the JTAG interface.

What's the debug protocol?
This could be the tougher one. GDB understands how to talk a bunch of 
different debug protocols, its own "remote" protocol, many monitors, a 
couple of JTAG, etc.

On this one, I don't know how to help you out. You're going to have to 
find out what the board uses (if anything). Maybe you'll need to get a GDB 
debug stub/agent on the board? I don't know. You might ask on 
gdb@sources.redhat.com about your particular hardware if web searches 
don't turn anything up.

Anyway, once you have this information, you can use the File->Target 
Settings... dialog to specify these things.

Keith


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

* Re: multi-threaded debugging using Insight
  2002-10-03  8:40 ` Keith Seitz
@ 2002-10-03  8:54   ` Bruce Korb
  2002-10-03  9:01     ` Keith Seitz
  0 siblings, 1 reply; 6+ messages in thread
From: Bruce Korb @ 2002-10-03  8:54 UTC (permalink / raw)
  To: Keith Seitz, insight

Hi,

I'm still interested to know if it is supposed to be possible.
My use of popen seems to cause a problem, but there is no FAQ
and the folks on the gdb list did not even reply.  I solved my
immediate problem using printf debugging, but I would prefer
to use an interactive debugger.  Much easier.  Is multi-process
debugging new territory?

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

* Re: multi-threaded debugging using Insight
  2002-10-03  8:54   ` multi-threaded debugging " Bruce Korb
@ 2002-10-03  9:01     ` Keith Seitz
  2002-10-03 10:28       ` Bruce Korb
  0 siblings, 1 reply; 6+ messages in thread
From: Keith Seitz @ 2002-10-03  9:01 UTC (permalink / raw)
  To: Bruce Korb; +Cc: insight

On Thu, 3 Oct 2002, Bruce Korb wrote:

> I'm still interested to know if it is supposed to be possible.
> My use of popen seems to cause a problem, but there is no FAQ
> and the folks on the gdb list did not even reply.  I solved my
> immediate problem using printf debugging, but I would prefer
> to use an interactive debugger.  Much easier.  Is multi-process
> debugging new territory?

What's the problem again? Yes, Insight/gdb should be able to debug a 
multi-threaded application. Can you follow forks and stuff into the forked 
child? No, that was never implemented (in GDB) for anything but HP.

Keith


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

* Re: multi-threaded debugging using Insight
  2002-10-03  9:01     ` Keith Seitz
@ 2002-10-03 10:28       ` Bruce Korb
  2002-10-03 10:35         ` Keith Seitz
  0 siblings, 1 reply; 6+ messages in thread
From: Bruce Korb @ 2002-10-03 10:28 UTC (permalink / raw)
  To: Keith Seitz; +Cc: insight

Keith Seitz wrote:
> 
> On Thu, 3 Oct 2002, Bruce Korb wrote:
> 
> > I'm still interested to know if it is supposed to be possible.
> > My use of popen seems to cause a problem, but there is no FAQ
> > and the folks on the gdb list did not even reply.  I solved my
> > immediate problem using printf debugging, but I would prefer
> > to use an interactive debugger.  Much easier.  Is multi-process
> > debugging new territory?
> 
> What's the problem again? Yes, Insight/gdb should be able to debug a
> multi-threaded application. Can you follow forks and stuff into the forked
> child? No, that was never implemented (in GDB) for anything but HP.

The problem is that Insight is unable to follow anything after this.
The following is from the console window of Insight:

> This is version 5.2.1:
> 
> (gdb) set args man2html.cat1
> (gdb) r
> Starting program: /home/bkorb/tools/man2html/man2html man2html.cat1
> [New Thread 1024 (LWP 1930)]
> [New 
> Error: Cannot find thread 2049: invalid thread handle
> 
> (gdb)

See:
http://sources.redhat.com/ml/insight/2002-q3/msg00185.html

That message was copied to gdb@sources.redhat.com, but there
were no replies from anyone.  After this point in the debugging,
I cannot do anything at all.  If I avoid the popen call, then
I don't see this problem.  Pretty sure there must be a connection  :-)
The platform is Linux 2.4.18 on i686 using whatever GCC SuSE shipped
with 8.0.

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

* Re: multi-threaded debugging using Insight
  2002-10-03 10:28       ` Bruce Korb
@ 2002-10-03 10:35         ` Keith Seitz
  0 siblings, 0 replies; 6+ messages in thread
From: Keith Seitz @ 2002-10-03 10:35 UTC (permalink / raw)
  To: Bruce Korb; +Cc: insight

On Thu, 3 Oct 2002, Bruce Korb wrote:

> > This is version 5.2.1:
> > 
> > (gdb) set args man2html.cat1
> > (gdb) r
> > Starting program: /home/bkorb/tools/man2html/man2html man2html.cat1
> > [New Thread 1024 (LWP 1930)]
> > [New 
> > Error: Cannot find thread 2049: invalid thread handle
> > 
> > (gdb)

> 
> See:
> http://sources.redhat.com/ml/insight/2002-q3/msg00185.html
> 
> That message was copied to gdb@sources.redhat.com, but there
> were no replies from anyone.  After this point in the debugging,
> I cannot do anything at all.  If I avoid the popen call, then
> I don't see this problem.  Pretty sure there must be a connection  :-)
> The platform is Linux 2.4.18 on i686 using whatever GCC SuSE shipped
> with 8.0.

Ah, yes, I remember this now. You're going to have to keep pinging the GDB 
folks at gdb@sources.redhat.com. There are far more people there that can 
help you with this than there are here. (In case there's any doubt, this 
mailing list is essentially just me, with a tiny smattering of input 
from others.) The GDB list has dozens of active contributors/developers.

Have you tried 5.3 or CVS head?

Keith


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

end of thread, other threads:[~2002-10-03 17:35 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-10-02 22:22 Remote debug using Insight Masahide Tomita
2002-10-03  8:40 ` Keith Seitz
2002-10-03  8:54   ` multi-threaded debugging " Bruce Korb
2002-10-03  9:01     ` Keith Seitz
2002-10-03 10:28       ` Bruce Korb
2002-10-03 10:35         ` Keith Seitz

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 read-only IMAP folder(s) and NNTP newsgroup(s).