RE: async operation

Newman, Mark (N-Superior Technical Resource Inc)
2003-11-18T15:50:38Z

[-- Attachment #1: Type: text/plain, Size: 1962 bytes --]

IMHO async is not an invention of the client but the manner in which gdb
controls the client. ;-)

I am attaching a gdb output with remote_debug set. In this instance the
sequence

> interrupt
> cont &

worked once but did not work the second time.

However I am going to suspend asking what happened since my version of
GDB has been modified to accept commands on a socket rather than
directly from the keyboard by substituting the FD for the socket for
stdin. I added (among other things) the following to main:

gdb_stdout = marks_stdout;
gdb_stderr = marks_stdout;
dr_fd = fdopen(dr_in,"rw" );
instream = dr_fd;
reinitialize_event_loop ();

where dr_in is a socket. Among other things I had to add a reinit to
the event loop to update rl_instream. These changes will not go into
gdb before they are fully discussed on this forum.

It may be my changes that are causing the problem.

Mark Newman

> -----Original Message-----
> From: gdb-owner@sources.redhat.com
> [mailto:gdb-owner@sources.redhat.com]On Behalf Of Daniel Jacobowitz
> Sent: Tuesday, November 18, 2003 2:13 AM
> To: Mark Newman
> Cc: Andrew Cagney; Newman, Mark (N-Superior Technical Resource Inc);
> gdb@sources.redhat.com
> Subject: Re: async operation
>
>
> On Mon, Nov 17, 2003 at 09:33:05PM -0800, Mark Newman wrote:
> > I don't mean to sound dumb but could you clarify what
> > "you can set a hook on `stop'" means?
>
> Search for hooks in the manual.
>
> > I see that and am working it now in conjunction with
> > the interrupt command - unless the stop command(?)
> > will do what I am looking for. GDBserver does not
> > properly respond when in async and an "interrupt" is
> > issued.
>
> What goes wrong? It should. Remember, async is an invention of the
> client - the remote protocol is the same.
>
> --
> Daniel Jacobowitz
> MontaVista Software Debian GNU/Linux Developer
>

[-- Attachment #2: temp.txt --]
[-- Type: text/plain, Size: 2769 bytes --]

00000000007f03000000000000ffff000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000801f0000ffffffff

Sending packet: $m804953c,4#6d...Ack
Packet received: 00200000
Sending packet: $mbffff81c,4#93...Ack
Packet received: 0e000000
Sending packet: $mbffff818,4#68...Ack
Packet received: 78563412
Sending packet: $mbffff7c0,50#c2...Ack
Packet received: 0d0000004a6f686e20536d69746800429f6d0040b8240140426f6973652c20496461686f00a000407c280140882e014001000000000000001e5801420100000074f8ffbf7cf8ffbf1db2024234120000

remote_stop called
Packet received: T0205:98f7ffbf;04:bcf5ffbf;08:61e50a42;
Sending packet: $g#67...Ack
Packet received: 1cf8ffbfb572fbb72f850408d0a21242b0f7ffbf28f8ffbf2020014074f8ffbff783040802020000230000002b0000002b0000002b000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000007f03000000000000ffff000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000801f0000ffffffff

Program received signal SIGINT, Interrupt.
Sending packet: $M4000acb0,1:55#68...Ack
Packet received: ENN
Sending packet: $M4000acb0,1:55#68...Ack
Packet received: ENN
Sending packet: $mbffff830,4#62...Ack
Packet received: 55320000
Sending packet: $mbffff834,4#66...Ack
Packet received: 55320000
0x080483f7 in main (argc=12885, argv=0x3255) at main.c:52
52 while (j < 1000000) {

Sending packet: $c#63...Ack

remote_stop called

Sending packet: $c#63...Packet instead of Ack, ignoring it
Packet instead of Ack, ignoring it
Packet instead of Ack, ignoring it
Packet instead of Ack, ignoring it
Packet instead of Ack, ignoring it
Packet instead of Ack, ignoring it
Sending packet: $c#63...Packet instead of Ack, ignoring it
Packet instead of Ack, ignoring it
Packet instead of Ack, ignoring it
Packet instead of Ack, ignoring it
Packet instead of Ack, ignoring it
Sending packet: $c#63...Packet instead of Ack, ignoring it
Packet instead of Ack, ignoring it
Packet instead of Ack, ignoring it
Packet instead of Ack, ignoring it
Packet instead of Ack, ignoring it
Sending packet: $c#63...Packet instead of Ack, ignoring it
Packet instead of Ack, ignoring it
Packet instead of Ack, ignoring it
Packet instead of Ack, ignoring it
Packet instead of Ack, ignoring it