From mboxrd@z Thu Jan 1 00:00:00 1970 From: Daniel Jacobowitz To: Andrew Cagney Cc: Robert Picco , gdb-patches@sources.redhat.com Subject: Re: new gdb remote packet type Date: Wed, 12 May 2004 18:31:00 -0000 Message-id: <20040512183055.GA32460@nevyn.them.org> References: <407F2BAB.4060408@hp.com> <40802711.3040104@gnu.org> <4087E8C0.30806@hp.com> <4087EE4B.4010805@gnu.org> <40912015.7070902@hp.com> <40928D64.8010209@gnu.org> <4097D9DE.2030004@hp.com> <40993C21.1040500@gnu.org> <409A95AB.6020101@hp.com> <40A26AF4.4050001@gnu.org> X-SW-Source: 2004-05/msg00375.html On Wed, May 12, 2004 at 02:20:36PM -0400, Andrew Cagney wrote: > Yes, this is the key, use it conditionally, nice. > > >+ switch (remote_protocol_p.support) > >+ { > >+ case PACKET_DISABLE: > >+ break; > >+ case PACKET_ENABLE: > >+ if (fetch_register_using_p (regnum)) > >+ return; > >+ else > >+ error ("Protocol error: p packet not recognized by stub"); > >+ case PACKET_SUPPORT_UNKNOWN: > >+ if (fetch_register_using_p (regnum)) > >+ { > >+ /* The stub recognized the 'p' packet. Remember this. */ > >+ remote_protocol_p.support = PACKET_ENABLE; > >+ return; > >+ } > >+ else > >+ { > >+ /* The stub does not support the 'P' packet. Use 'G' > >+ instead, and don't try using 'P' in the future (it > >+ will just waste our time). */ > >+ remote_protocol_p.support = PACKET_DISABLE; > >+ break; > >+ } > >+ } > > > > sprintf (buf, "g"); This patch (if 'p' were implemented for gdbserver; I have this lying around, as it happens) would make register fetches default to using individual 'p' packets for every register; this would hurt latency, a lot. Robert, wouldn't it be good enough for you to work with !reg->in_g_packet? -- Daniel Jacobowitz