Mirror of the gdb mailing list
 help / color / mirror / Atom feed
* Remote Stub operation.
@ 2002-05-29  9:15 Paul Breed
  2002-05-29 10:41 ` Quality Quorum
  2002-05-29 11:21 ` William A. Gatliff
  0 siblings, 2 replies; 3+ messages in thread
From: Paul Breed @ 2002-05-29  9:15 UTC (permalink / raw)
  To: gdb

I'm working with a remote serial stub.
I completely understand the protocol definition,
but I am looking for some input on the logical operation of the system.

When my stub starts up the stub setup code has a built in breakpoint
where it stops and waits for GDB, this works well.

However I would like to have the system start up and run normally while
it waits for GDB to connect.

How should the stub respond when the application is already running?

Is there anyway to have GDB try to stop the target if the normal target 
connect fails.



Paul





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

* Re: Remote Stub operation.
  2002-05-29  9:15 Remote Stub operation Paul Breed
@ 2002-05-29 10:41 ` Quality Quorum
  2002-05-29 11:21 ` William A. Gatliff
  1 sibling, 0 replies; 3+ messages in thread
From: Quality Quorum @ 2002-05-29 10:41 UTC (permalink / raw)
  To: Paul Breed; +Cc: gdb



On Wed, 29 May 2002, Paul Breed wrote:

> I'm working with a remote serial stub.
> I completely understand the protocol definition,
> but I am looking for some input on the logical operation of the system.
>
> When my stub starts up the stub setup code has a built in breakpoint
> where it stops and waits for GDB, this works well.
>
> However I would like to have the system start up and run normally while
> it waits for GDB to connect.


1. You have to use interrupt driven serial driver on the gdb connection,
   with simple logic:

       if(received_char == 0x3)
         {
            turn_on_tace_bit_in_saved_status_word();
         }

       return_from_interrupt();

2. You have to configure your gdb remote subsystem to send CTRL-C instead
   of BREAK(so you can debug through remote terminal servers).
   Remote used to send break when it starts, I suppose it is still true
   for newer versions of gdb, make sure that this is still the case for
   the version of gdb you are using.

3. Check RTEMS i386 BSP - it does exactly this.

>
> How should the stub respond when the application is already running?

Upon return from interrupt, the saved status word will be restored,
this word would contain trace bit, you will get a trace exception
which will be handled in normal way.

>
> Is there anyway to have GDB try to stop the target if the normal target
> connect fails.

???? Press reset button and try again ????

>
> Paul

Thanks,

Aleksey



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

* Re: Remote Stub operation.
  2002-05-29  9:15 Remote Stub operation Paul Breed
  2002-05-29 10:41 ` Quality Quorum
@ 2002-05-29 11:21 ` William A. Gatliff
  1 sibling, 0 replies; 3+ messages in thread
From: William A. Gatliff @ 2002-05-29 11:21 UTC (permalink / raw)
  To: Paul Breed; +Cc: gdb

Paul:


If your stub uses interrupt-driven receive, it could just interrupt
the main aplication when it gets the connect commands from gdb.

b.g.

On Wed, May 29, 2002 at 09:23:50AM -0400, Paul Breed wrote:
> I'm working with a remote serial stub.
> I completely understand the protocol definition,
> but I am looking for some input on the logical operation of the system.
> 
> When my stub starts up the stub setup code has a built in breakpoint
> where it stops and waits for GDB, this works well.
> 
> However I would like to have the system start up and run normally while
> it waits for GDB to connect.
> 
> How should the stub respond when the application is already running?
> 
> Is there anyway to have GDB try to stop the target if the normal target 
> connect fails.
> 
> 
> 
> Paul
> 
> 
> 
> 

-- 
Bill Gatliff
bgat@billgatliff.com


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

end of thread, other threads:[~2002-05-29 18:21 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-05-29  9:15 Remote Stub operation Paul Breed
2002-05-29 10:41 ` Quality Quorum
2002-05-29 11:21 ` William A. Gatliff

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox