public inbox for insight@sourceware.org
 help / color / mirror / Atom feed
* How to connect to running program via a serial port
@ 2006-08-14 20:35 Nik Shaylor
  2006-08-14 20:41 ` Keith Seitz
  0 siblings, 1 reply; 7+ messages in thread
From: Nik Shaylor @ 2006-08-14 20:35 UTC (permalink / raw)
  To: insight

So with gdb I just type:

   target remote /dev/ttyS0

and I can start debugging the, already running, program via the serial port.

When I start Insight it thinks nothing is running and the only button
that works us the "Run" command. How can I start Insight ina mode
where it will thinks the program is already running?

Thanks,

Nik

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

* Re: How to connect to running program via a serial port
  2006-08-14 20:35 How to connect to running program via a serial port Nik Shaylor
@ 2006-08-14 20:41 ` Keith Seitz
  2006-08-14 21:01   ` Nik Shaylor
  0 siblings, 1 reply; 7+ messages in thread
From: Keith Seitz @ 2006-08-14 20:41 UTC (permalink / raw)
  To: Nik Shaylor; +Cc: insight

Nik Shaylor wrote:
> So with gdb I just type:
> 
>   target remote /dev/ttyS0
> 
> and I can start debugging the, already running, program via the serial 
> port.
> 
> When I start Insight it thinks nothing is running and the only button
> that works us the "Run" command. How can I start Insight ina mode
> where it will thinks the program is already running?

You have two options:

1) Open a console window and type your gdb command in
2) Open File->Target Settings..., and select "Remote/Serial", enter buad 
rate, com port. Use Run menu to attach to target. That should be all you 
need.

[The Run button is a little more elaborate. In the target settings 
dialog, you can specify what the run button does by clicking "More 
options". Currently the run button will ALWAYS either "run" or 
"continue" the target.]

Keith

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

* Re: How to connect to running program via a serial port
  2006-08-14 20:41 ` Keith Seitz
@ 2006-08-14 21:01   ` Nik Shaylor
  2006-08-14 21:04     ` Keith Seitz
  0 siblings, 1 reply; 7+ messages in thread
From: Nik Shaylor @ 2006-08-14 21:01 UTC (permalink / raw)
  To: Keith Seitz; +Cc: insight

Hi Keith, Thanks for your message. Neither of these techniques seem to
work for me. If I open the console window and type "target remote
/dev/ttyS0" the program seems to lock up. (The windows are present,
but not responding to any input). If I do Open File->Target Settings
etc. still have to use the "Run" command and this always continues the
execution of the program which is just what I don't want it to do.

The only way I seems to get it to work is to start Insight running
before the program wants to start talking to the debugger. This does
not really work for me because I'm using the serial port for program
trace information as well so I just want to start the debugger when I
can see from the trace that the program has got into trouble.

Thanks,

Nik

On 8/14/06, Keith Seitz <keiths@redhat.com> wrote:
> Nik Shaylor wrote:
> > So with gdb I just type:
> >
> >   target remote /dev/ttyS0
> >
> > and I can start debugging the, already running, program via the serial
> > port.
> >
> > When I start Insight it thinks nothing is running and the only button
> > that works us the "Run" command. How can I start Insight ina mode
> > where it will thinks the program is already running?
>
> You have two options:
>
> 1) Open a console window and type your gdb command in
> 2) Open File->Target Settings..., and select "Remote/Serial", enter buad
> rate, com port. Use Run menu to attach to target. That should be all you
> need.
>
> [The Run button is a little more elaborate. In the target settings
> dialog, you can specify what the run button does by clicking "More
> options". Currently the run button will ALWAYS either "run" or
> "continue" the target.]
>
> Keith
>
>

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

* Re: How to connect to running program via a serial port
  2006-08-14 21:01   ` Nik Shaylor
@ 2006-08-14 21:04     ` Keith Seitz
       [not found]       ` <20934fa50608141410g6ad3fbeep98905eaf34335c75@mail.gmail.com>
  2006-08-15  1:39       ` Dave Korn
  0 siblings, 2 replies; 7+ messages in thread
From: Keith Seitz @ 2006-08-14 21:04 UTC (permalink / raw)
  To: Nik Shaylor; +Cc: insight

Nik Shaylor wrote:
> If I do Open File->Target Settings
> etc. still have to use the "Run" command and this always continues the
> execution of the program which is just what I don't want it to do.

Don't use the run button. Use the Run menu. One of the items should 
allow you to attach to the target. That does the equivalent of the 
"target remote" command on the command line.

> The only way I seems to get it to work is to start Insight running
> before the program wants to start talking to the debugger. This does
> not really work for me because I'm using the serial port for program
> trace information as well so I just want to start the debugger when I
> can see from the trace that the program has got into trouble.

This should work. Of course, now that I don't have access to a serial 
board of any type, problems are difficult to diagnose...

Keith

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

* Re: How to connect to running program via a serial port
       [not found]       ` <20934fa50608141410g6ad3fbeep98905eaf34335c75@mail.gmail.com>
@ 2006-08-14 22:19         ` Keith Seitz
       [not found]           ` <20934fa50608141533g36faf06aq8e724c256495eb69@mail.gmail.com>
  0 siblings, 1 reply; 7+ messages in thread
From: Keith Seitz @ 2006-08-14 22:19 UTC (permalink / raw)
  To: Nik Shaylor; +Cc: insight

[add list to recipients]

Nik Shaylor wrote:
> On 8/14/06, Keith Seitz <keiths@redhat.com> wrote:
 >>
>> Don't use the run button. Use the Run menu. One of the items should
>> allow you to attach to the target. That does the equivalent of the
>> "target remote" command on the command line.
> 
> The Run menu has "Attach to Process" and "Run". If I do the former it
> presents a list of processes to attact to. But this is not want I need
> to do, I neet to attach (if that is the right verb) to the serial
> port.

Something is amiss. If you open a console window and type "show 
version", what does it output? Your Run menu should definitely have a 
"Connect to target" option for a non-native debugger.

Keith

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

* Re: How to connect to running program via a serial port
       [not found]           ` <20934fa50608141533g36faf06aq8e724c256495eb69@mail.gmail.com>
@ 2006-08-14 22:41             ` Keith Seitz
  0 siblings, 0 replies; 7+ messages in thread
From: Keith Seitz @ 2006-08-14 22:41 UTC (permalink / raw)
  To: Nik Shaylor; +Cc: insight

[CC'ing mailing list]

Nik Shaylor wrote:

> (gdb) show version
> GNU gdb 6.5.0.20060626-cvs
> Copyright (C) 2006 Free Software Foundation, Inc.
> GDB is free software, covered by the GNU General Public License, and you 
> are
> welcome to change it and/or distribute copies of it under certain 
> conditions.
> Type "show copying" to see the conditions.
> There is absolutely no warranty for GDB.  Type "show warranty" for details.
> This GDB was configured as "x86_64-unknown-linux-gnu".

Oh, okay, I see the problem... You're using something like gdbserver (or 
similar type thing). Insight thinks you're using a native target (which 
is true), but you are not using the local system.

So the mis-feature is that the Run menu should change if the target 
settings are set to use anything but a native target (e.g., "exec").

In that case, it looks like you're out of luck until this is mess gets 
straightened out. I won't make any guarantees, but I'll put it on my 
ever-growing TODO list.

Keith

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

* RE: How to connect to running program via a serial port
  2006-08-14 21:04     ` Keith Seitz
       [not found]       ` <20934fa50608141410g6ad3fbeep98905eaf34335c75@mail.gmail.com>
@ 2006-08-15  1:39       ` Dave Korn
  1 sibling, 0 replies; 7+ messages in thread
From: Dave Korn @ 2006-08-15  1:39 UTC (permalink / raw)
  To: 'Keith Seitz', 'Nik Shaylor'; +Cc: insight

On 14 August 2006 22:04, Keith Seitz wrote:

> Nik Shaylor wrote:

>> The only way I seems to get it to work is to start Insight running
>> before the program wants to start talking to the debugger. This does
>> not really work for me because I'm using the serial port for program
>> trace information as well so I just want to start the debugger when I
>> can see from the trace that the program has got into trouble.
> 
> This should work. Of course, now that I don't have access to a serial
> board of any type, problems are difficult to diagnose...

  Wouldn't it work better if Nik could wrapper all his program trace output in
the remote protocol's 'O' console output packet?


    cheers,
      DaveK
-- 
Can't think of a witty .sigline today....

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

end of thread, other threads:[~2006-08-15  1:39 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-08-14 20:35 How to connect to running program via a serial port Nik Shaylor
2006-08-14 20:41 ` Keith Seitz
2006-08-14 21:01   ` Nik Shaylor
2006-08-14 21:04     ` Keith Seitz
     [not found]       ` <20934fa50608141410g6ad3fbeep98905eaf34335c75@mail.gmail.com>
2006-08-14 22:19         ` Keith Seitz
     [not found]           ` <20934fa50608141533g36faf06aq8e724c256495eb69@mail.gmail.com>
2006-08-14 22:41             ` Keith Seitz
2006-08-15  1:39       ` Dave Korn

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