Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Quality Quorum <qqi@theworld.com>
To: Paul Breed <Paul@Netburner.com>
Cc: gdb@sources.redhat.com
Subject: Re: Remote Stub operation.
Date: Wed, 29 May 2002 10:41:00 -0000	[thread overview]
Message-ID: <Pine.SGI.4.40.0205291329560.4160584-100000@shell01.TheWorld.com> (raw)
In-Reply-To: <4.2.0.58.20020529085110.020bb1e0@mail.netburner.com>



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



  reply	other threads:[~2002-05-29 17:41 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-05-29  9:15 Paul Breed
2002-05-29 10:41 ` Quality Quorum [this message]
2002-05-29 11:21 ` William A. Gatliff

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Pine.SGI.4.40.0205291329560.4160584-100000@shell01.TheWorld.com \
    --to=qqi@theworld.com \
    --cc=Paul@Netburner.com \
    --cc=gdb@sources.redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox