From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3633 invoked by alias); 29 May 2002 17:41:38 -0000 Mailing-List: contact gdb-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sources.redhat.com Received: (qmail 3621 invoked from network); 29 May 2002 17:41:34 -0000 Received: from unknown (HELO TheWorld.com) (199.172.62.105) by sources.redhat.com with SMTP; 29 May 2002 17:41:34 -0000 Received: from shell.TheWorld.com (doyle@shell01.TheWorld.com [199.172.62.241]) by TheWorld.com (8.9.3/8.9.3) with ESMTP id NAB21176; Wed, 29 May 2002 13:41:33 -0400 Received: from localhost (qqi@localhost) by shell.TheWorld.com (8.9.3/8.9.3) with ESMTP id NAA4292291; Wed, 29 May 2002 13:41:33 -0400 (EDT) X-Authentication-Warning: shell01.TheWorld.com: qqi owned process doing -bs Date: Wed, 29 May 2002 10:41:00 -0000 From: Quality Quorum To: Paul Breed cc: gdb@sources.redhat.com Subject: Re: Remote Stub operation. In-Reply-To: <4.2.0.58.20020529085110.020bb1e0@mail.netburner.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-SW-Source: 2002-05/txt/msg00319.txt.bz2 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