public inbox for insight@sourceware.org
 help / color / mirror / Atom feed
* Remote Debugging
@ 2000-06-07 13:30 Michael Crowe
  2000-06-08  9:53 ` Jim Ingham
  0 siblings, 1 reply; 8+ messages in thread
From: Michael Crowe @ 2000-06-07 13:30 UTC (permalink / raw)
  To: Insight

Hey All,
    I'm new to Insight and even fairly new to GDB.  I'm trying to do
some remote debugging of an embedded system.  I do have a monitor and
keyboard/mouse for the target, so I hvae access to it.  I have tryed
connecting to the target system, deathstar in this case, using a variety
of port numbers but to no avail.  Do I need to be running gdbserver on
the target.  I have Insight 5.0 running on the host.  The host is
running Redhat Linux 6.2 and the Embedded system is running TimeSys
Linux/RT 1.0.
    If I do need gdbserver, where do I get it or how do I invoke iit?


Thanks,
Michael E Crowe
Software Engineer
TimeSys Corporation
mike@timesys.com


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

* Re: Remote Debugging
  2000-06-07 13:30 Remote Debugging Michael Crowe
@ 2000-06-08  9:53 ` Jim Ingham
  0 siblings, 0 replies; 8+ messages in thread
From: Jim Ingham @ 2000-06-08  9:53 UTC (permalink / raw)
  To: Michael Crowe, Insight

Michael,

This is mostly a gdb question.  You need some kind of debugging monitor on
your target system - which as you rightly guessed is gdbserver.  Once you
have this built, you have to launch gdbserver on the target giving the
program for it to run, and a port to open (you also have to have an ethernet
connection on the board, by the way).  Then on the host gdb, you use "target
remote" to the embedded Linux box, using the port that you told gdbserver to
open.

Gdbserver is part of the standard gdb distribution in gdb/gdbserver; you
just need to build it for your target machine.  If you can build on your
target system, this is probably not too hard.  If you want to build it on
your development machine, that is a little harder, since host cross host
builds are not really supported with the Gnu tools right now.

There was a product from Red Hat (it's internal name was EL/IX but I don't
remember what the final product ended up being called) that does just what
you want, though not on the version of the target you are using.  It may
contain enough stuff to get you going, I don't know...  Anyway, it is going
in the same direction.

Hope this helps.

Jim

> Hey All,
> I'm new to Insight and even fairly new to GDB.  I'm trying to do
> some remote debugging of an embedded system.  I do have a monitor and
> keyboard/mouse for the target, so I hvae access to it.  I have tryed
> connecting to the target system, deathstar in this case, using a variety
> of port numbers but to no avail.  Do I need to be running gdbserver on
> the target.  I have Insight 5.0 running on the host.  The host is
> running Redhat Linux 6.2 and the Embedded system is running TimeSys
> Linux/RT 1.0.
> If I do need gdbserver, where do I get it or how do I invoke iit?
> 
> 
> Thanks,
> Michael E Crowe
> Software Engineer
> TimeSys Corporation
> mike@timesys.com
> 
> 
> 

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

* Re: remote debugging
  2002-12-12 10:00     ` Keith Seitz
@ 2002-12-12 10:20       ` Tim
  0 siblings, 0 replies; 8+ messages in thread
From: Tim @ 2002-12-12 10:20 UTC (permalink / raw)
  To: Keith Seitz; +Cc: insight

I am able to get everything going.  Thanx for your help.  

I tried a few things...

I used a gdbserver compiled statically against glibc from the insight
directory tree rather than the uClibc version I was using.

I changed the Run Method to Continue from Last Stop.

I rebuilt my application.

Once I changed the run method insight connected but gave a segmentation
fault immediately.  On the next try I changed both gdbserver and my
application so I suspect that one of the two were out of sync, (the host
version of my app and the remote version of my app more than likely).

Thanx again!.


On Thu, 2002-12-12 at 10:00, Keith Seitz wrote:
> On 12 Dec 2002, Tim wrote:
> 
> > I understand using the open menu option, and that is what I tried.  When
> > 'run' the app after opening the local executable, there is no connection
> > message on the remote device.  What appears to be happening is that
> > insight is running the application locally and not connecting to the
> > remote device.
> 
> That's probably a long-standing bug... :-( It should never try to run 
> locally when cross-debugging.
>  
> > I'm assuming that I'm doing something wrong and insight is not
> > attempting to connect to the remote device.
> 
> I don't think you're doing anything wrong, but let's see if we can't get 
> you going.
> 
> > I set the target settings to:
> > 	Target: Remote/TCP
> > 	Hostname: 192.168.0.29
> > 	Port: 2345
> > 	Run Options: Attach To Target
> > 	Run Method: Run Program
> > 
> > when I run a console gdb it will connect, but insigt does not...  Any
> > help is appreciated.  Thanx!
> 
> Couple of bits of info will help us direct the investigation, so:
> 
> What's the output of "gdb -v" (or "insight -v" if you've got a newer 
> version of insight)?
> 
> What are the commands you use in the console to get this working? ("file 
> FOO", "break main", "target remote 192.168.0.29:2345", "continue", etc)
> 
> Keith
> 
> 
> 


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

* RE: remote debugging
@ 2002-12-12 10:01 Rod Boyce
  0 siblings, 0 replies; 8+ messages in thread
From: Rod Boyce @ 2002-12-12 10:01 UTC (permalink / raw)
  To: 'Tim'; +Cc: insight

All,

This is how I do it.

1. run gdbserver of the target
2. Start insight 
3. load the application you want to debug
4. set the target selection to remote TCP the host IP address and port you
want to use.  Make sure you download program is deselected and attach to
target is selected.  I also make sure there are not breakpoints set for me.
Set breakpoint and main and at exit are deselected.
5. using the function browser under the view command place the breakpoint
where you want to.  I normall add one at the beginning of main here (I have
control of where the breakpoint gets set some time not the beginning of main
but before main or in a specific function to debug a specific feature.
6. Then I hit the run button.  The program starts and continues until it
hits my breakpoint.

This works fine for me.  I use a similar functionality with my BDI2000 or
with gdbserver it depends on what I'm debugging.

I have even used this kind of setup to debug the kernel, application and
drivers all at the same time with source code level debugging.  I love
Insight it was the easiest for me to get going an while I'm getting to know
the GDB command line Insight is a great way for us windows converts to get
used to Linux.

The Insight guys have done a great job.  Keep up the good work.


Regards,
Rod Boyce.

 -----Original Message-----
From: 	Tim [mailto:Tim@deltacompsys.com] 
Sent:	Thursday, December 12, 2002 9:39 AM
To:	Keith Seitz
Cc:	insight@sources.redhat.com
Subject:	Re: remote debugging

I understand using the open menu option, and that is what I tried.  When
'run' the app after opening the local executable, there is no connection
message on the remote device.  What appears to be happening is that
insight is running the application locally and not connecting to the
remote device.

I'm assuming that I'm doing something wrong and insight is not
attempting to connect to the remote device.

I set the target settings to:
	Target: Remote/TCP
	Hostname: 192.168.0.29
	Port: 2345
	Run Options: Attach To Target
	Run Method: Run Program

when I run a console gdb it will connect, but insigt does not...  Any
help is appreciated.  Thanx!

On Thu, 2002-12-12 at 09:29, Keith Seitz wrote:
> On 12 Dec 2002, Tim wrote:
> 
> > Do I need to "Open" the executable in Insight?  Once I do it executes
> > locally and not remotely and the remote app often terminates with an
> > error "Killing inferior".
> 
> The Run button will always do whatever it needs (or thinks it needs) to 
> start the application "running" on your target. This includes:
> 
> 1) opening an executable/debug file
> 2) gathering target communications information (debug protocol/transport)
> 3) loading executable into target memory (if needed)
> 4) "running" the target
> 
> If you don't "Open" an executable, how is the debugger to know what you 
> are debugging? It still needs debug symbols (or at least minimal symbols 
> from the executable).
> 
> Keith
> 
> 
> 

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

* Re: remote debugging
  2002-12-12  9:38   ` Tim
@ 2002-12-12 10:00     ` Keith Seitz
  2002-12-12 10:20       ` Tim
  0 siblings, 1 reply; 8+ messages in thread
From: Keith Seitz @ 2002-12-12 10:00 UTC (permalink / raw)
  To: Tim; +Cc: insight

On 12 Dec 2002, Tim wrote:

> I understand using the open menu option, and that is what I tried.  When
> 'run' the app after opening the local executable, there is no connection
> message on the remote device.  What appears to be happening is that
> insight is running the application locally and not connecting to the
> remote device.

That's probably a long-standing bug... :-( It should never try to run 
locally when cross-debugging.
 
> I'm assuming that I'm doing something wrong and insight is not
> attempting to connect to the remote device.

I don't think you're doing anything wrong, but let's see if we can't get 
you going.

> I set the target settings to:
> 	Target: Remote/TCP
> 	Hostname: 192.168.0.29
> 	Port: 2345
> 	Run Options: Attach To Target
> 	Run Method: Run Program
> 
> when I run a console gdb it will connect, but insigt does not...  Any
> help is appreciated.  Thanx!

Couple of bits of info will help us direct the investigation, so:

What's the output of "gdb -v" (or "insight -v" if you've got a newer 
version of insight)?

What are the commands you use in the console to get this working? ("file 
FOO", "break main", "target remote 192.168.0.29:2345", "continue", etc)

Keith


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

* Re: remote debugging
  2002-12-12  9:29 ` Keith Seitz
@ 2002-12-12  9:38   ` Tim
  2002-12-12 10:00     ` Keith Seitz
  0 siblings, 1 reply; 8+ messages in thread
From: Tim @ 2002-12-12  9:38 UTC (permalink / raw)
  To: Keith Seitz; +Cc: insight

I understand using the open menu option, and that is what I tried.  When
'run' the app after opening the local executable, there is no connection
message on the remote device.  What appears to be happening is that
insight is running the application locally and not connecting to the
remote device.

I'm assuming that I'm doing something wrong and insight is not
attempting to connect to the remote device.

I set the target settings to:
	Target: Remote/TCP
	Hostname: 192.168.0.29
	Port: 2345
	Run Options: Attach To Target
	Run Method: Run Program

when I run a console gdb it will connect, but insigt does not...  Any
help is appreciated.  Thanx!

On Thu, 2002-12-12 at 09:29, Keith Seitz wrote:
> On 12 Dec 2002, Tim wrote:
> 
> > Do I need to "Open" the executable in Insight?  Once I do it executes
> > locally and not remotely and the remote app often terminates with an
> > error "Killing inferior".
> 
> The Run button will always do whatever it needs (or thinks it needs) to 
> start the application "running" on your target. This includes:
> 
> 1) opening an executable/debug file
> 2) gathering target communications information (debug protocol/transport)
> 3) loading executable into target memory (if needed)
> 4) "running" the target
> 
> If you don't "Open" an executable, how is the debugger to know what you 
> are debugging? It still needs debug symbols (or at least minimal symbols 
> from the executable).
> 
> Keith
> 
> 
> 


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

* Re: remote debugging
  2002-12-12  9:10 remote debugging Tim
@ 2002-12-12  9:29 ` Keith Seitz
  2002-12-12  9:38   ` Tim
  0 siblings, 1 reply; 8+ messages in thread
From: Keith Seitz @ 2002-12-12  9:29 UTC (permalink / raw)
  To: Tim; +Cc: insight

On 12 Dec 2002, Tim wrote:

> Do I need to "Open" the executable in Insight?  Once I do it executes
> locally and not remotely and the remote app often terminates with an
> error "Killing inferior".

The Run button will always do whatever it needs (or thinks it needs) to 
start the application "running" on your target. This includes:

1) opening an executable/debug file
2) gathering target communications information (debug protocol/transport)
3) loading executable into target memory (if needed)
4) "running" the target

If you don't "Open" an executable, how is the debugger to know what you 
are debugging? It still needs debug symbols (or at least minimal symbols 
from the executable).

Keith


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

* remote debugging
@ 2002-12-12  9:10 Tim
  2002-12-12  9:29 ` Keith Seitz
  0 siblings, 1 reply; 8+ messages in thread
From: Tim @ 2002-12-12  9:10 UTC (permalink / raw)
  To: insight

I am trying to debug a remote app using ethernet and not having much
luck.

I am trying to use a gdbserver which I built with uClibc.  I start
gdbserver on the remote device as in
	
	gdbserver 192.168.0.1:2345 myapp -options

After starting Insight I enter the target settings for the remote device
and click Ok.

Do I need to "Open" the executable in Insight?  Once I do it executes
locally and not remotely and the remote app often terminates with an
error "Killing inferior".

Am I doing something wrong?

Thanx!

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

end of thread, other threads:[~2002-12-12 18:20 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-06-07 13:30 Remote Debugging Michael Crowe
2000-06-08  9:53 ` Jim Ingham
2002-12-12  9:10 remote debugging Tim
2002-12-12  9:29 ` Keith Seitz
2002-12-12  9:38   ` Tim
2002-12-12 10:00     ` Keith Seitz
2002-12-12 10:20       ` Tim
2002-12-12 10:01 Rod Boyce

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).