Mirror of the gdb mailing list
 help / color / mirror / Atom feed
* RE: protocol question
@ 2005-03-22 15:45 Decker, Paul
  2005-03-22 15:46 ` Daniel Jacobowitz
  0 siblings, 1 reply; 4+ messages in thread
From: Decker, Paul @ 2005-03-22 15:45 UTC (permalink / raw)
  To: Daniel Jacobowitz, Decker, Paul; +Cc: gdb



Outstanding, my message showed up as soon as I changed the state to
running!  

Now, this means I have to change plans a little.  Is there a way to send
unsolicited messages to the gdb console (to be displayed) regardless of
the actually execution state?

Thanks,
Paul.




-----Original Message-----
From: gdb-owner@sources.redhat.com [mailto:gdb-owner@sources.redhat.com]
On Behalf Of Daniel Jacobowitz
Sent: Tuesday, March 22, 2005 10:33 AM
To: Decker, Paul
Cc: gdb@sources.redhat.com
Subject: Re: protocol question

On Tue, Mar 22, 2005 at 10:24:45AM -0500, Decker, Paul wrote:
>  
> Hello everyone!
> 
> 
> I apologize if this is the wrong news group for this question, if so; 
> just point me to the correct one.
> 
> I'm developing a target stub for a custom processor which will then be

> able to connect with GDB.  From what I understand, the stub can send 
> unsolicited messages to GDB, for example, if the stub encounters an 
> error of some sort, or wants to send other information to be displayed

> in the GDB console.  It seems this is done with the 'O' command being 
> sent by the stub, without the stub checking for an ack.

As you may have noticed, the 'O' packet is considerably different than
the rest of the protocol.  It doesn't fit in well with the normal
command/response model.

> Is there anything in GDB that needs to be 'turned on' to enable this 
> functionality, or do I have a conceptual problem and this is not how
it
> is designed to work?   I've tried to send a test command of:

O is actually a 'wait response'.  It's supposed to be output from the
inferior, not the stub, so GDB only expects it when the target is
running.  Try that instead.


--
Daniel Jacobowitz
CodeSourcery, LLC


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

* Re: protocol question
  2005-03-22 15:45 protocol question Decker, Paul
@ 2005-03-22 15:46 ` Daniel Jacobowitz
  0 siblings, 0 replies; 4+ messages in thread
From: Daniel Jacobowitz @ 2005-03-22 15:46 UTC (permalink / raw)
  To: Decker, Paul; +Cc: gdb

On Tue, Mar 22, 2005 at 10:44:32AM -0500, Decker, Paul wrote:
> 
> 
> Outstanding, my message showed up as soon as I changed the state to
> running!  
> 
> Now, this means I have to change plans a little.  Is there a way to send
> unsolicited messages to the gdb console (to be displayed) regardless of
> the actually execution state?

I don't believe so.


-- 
Daniel Jacobowitz
CodeSourcery, LLC


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

* Re: protocol question
  2005-03-22 15:25 Decker, Paul
@ 2005-03-22 15:32 ` Daniel Jacobowitz
  0 siblings, 0 replies; 4+ messages in thread
From: Daniel Jacobowitz @ 2005-03-22 15:32 UTC (permalink / raw)
  To: Decker, Paul; +Cc: gdb

On Tue, Mar 22, 2005 at 10:24:45AM -0500, Decker, Paul wrote:
>  
> Hello everyone!
> 
> 
> I apologize if this is the wrong news group for this question, if so;
> just point me to the correct one.
> 
> I'm developing a target stub for a custom processor which will then be
> able to connect with GDB.  From what I understand, the stub can send
> unsolicited messages to GDB, for example, if the stub encounters an
> error of some sort, or wants to send other information to be displayed
> in the GDB console.  It seems this is done with the 'O' command being
> sent by the stub, without the stub checking for an ack.  

As you may have noticed, the 'O' packet is considerably different than
the rest of the protocol.  It doesn't fit in well with the normal
command/response model.

> Is there anything in GDB that needs to be 'turned on' to enable this
> functionality, or do I have a conceptual problem and this is not how it
> is designed to work?   I've tried to send a test command of:

O is actually a 'wait response'.  It's supposed to be output from the
inferior, not the stub, so GDB only expects it when the target is
running.  Try that instead.


-- 
Daniel Jacobowitz
CodeSourcery, LLC


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

* protocol question
@ 2005-03-22 15:25 Decker, Paul
  2005-03-22 15:32 ` Daniel Jacobowitz
  0 siblings, 1 reply; 4+ messages in thread
From: Decker, Paul @ 2005-03-22 15:25 UTC (permalink / raw)
  To: gdb

 
Hello everyone!


I apologize if this is the wrong news group for this question, if so;
just point me to the correct one.

I'm developing a target stub for a custom processor which will then be
able to connect with GDB.  From what I understand, the stub can send
unsolicited messages to GDB, for example, if the stub encounters an
error of some sort, or wants to send other information to be displayed
in the GDB console.  It seems this is done with the 'O' command being
sent by the stub, without the stub checking for an ack.  

Is there anything in GDB that needs to be 'turned on' to enable this
functionality, or do I have a conceptual problem and this is not how it
is designed to work?   I've tried to send a test command of:

// output of send text function
$O0a54686973206973206120746573740a#32



Just for testing, I'm doing this in the main processing loop

//process gdb proxy commands
while( pSocketObject->Getpkt(m_Threadbuff) > 0 )
{
	nStatus = pSocketObject->ProcessCommand(m_Threadbuff);
	if(nStatus > 0) 
	{
		pSocketObject->Putpkt(m_Threadbuff);
	}

	pSocketObject->SendText("\nThis is a test\n");

	//test for kill command
	if(nStatus == -1) 
	{
		break;
	}
}

However, I don't get anything being printed in the gdb console.  Any
ideas?

Thanks for any help!

Regards,
Paul.


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

end of thread, other threads:[~2005-03-22 15:46 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-03-22 15:45 protocol question Decker, Paul
2005-03-22 15:46 ` Daniel Jacobowitz
  -- strict thread matches above, loose matches on Subject: below --
2005-03-22 15:25 Decker, Paul
2005-03-22 15:32 ` Daniel Jacobowitz

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