From mboxrd@z Thu Jan 1 00:00:00 1970 From: Bill Gatliff To: gdb@sourceware.cygnus.com Subject: Re: Standard GDB Remote Protocol Date: Fri, 03 Dec 1999 05:41:00 -0000 Message-id: <3847C872.55287A40@haulpak.com> References: <199911090706.CAA13120@zwingli.cygnus.com> <199911102246.RAA01846@mescaline.gnu.org> <199911231303.IAA01523@mescaline.gnu.org> <199911251715.MAA09225@mescaline.gnu.org> <199912010821.DAA27130@mescaline.gnu.org> <3845AB0E.3795D99E@ozemail.com.au> <5md7sql00o.fsf@jtc.redbacknetworks.com> <3845F45A.38EA29CF@ozemail.com.au> <384685A7.15184EB1@haulpak.com> <38470CC1.1B0E5C27@ozemail.com.au> X-SW-Source: 1999-q4/msg00436.html Steven: [snip snip] Sounds like we agree more than we disagree. *whew*! :^) > Yes, here's the issue. The document is completely lacking in stub > implementation guidelines. IMHO, there needs to be a section of the > protocol (or comments throughout it) that give this sort of information > and advice to implementers of stubs. Here's where a good reference stub library might be of use. (As instructive as they are, I'm not sure the example stubs qualify in this department). I'm working on such a beast, mostly because I routinely work with more than one type of embedded processor. I have it done for the SH-2 (although I'm still adding some exception handling), someone is helping with an ARM port, and Dave Williams is looking at for a 68k port. If anyone else was interested in the code, I would be happy to see it placed on a Cygnus web/cvs site somewhere--- at the moment, however, I don't have the resources or time to set something up myself. > Again I agree with this. I was making the observation that Character > Escaping is likely to become more prevalent as the protocol evolves. To > define character escaping around one message could create a situation > where different messages that require it implement different mechanisms. Escaping seems to be most needed in messages with binary content, of which there are few. Hopefully this will continue to be the case, but since programs are getting bigger all the time, X and similar messages may become a necessity... :^( In that situation, standardized escaping would be a real bonus. > What would probably be more appropriate is to state how escaping is > performed where required as part of the base level protocol. Then in the > message put a statement like, "This message contains binary data and > must be Escaped using the standard escaping mechanism defined above". Right. If you've got to do it, at least make it consistent. > This way if you don't implement any of those messages, you don't need to > implement Escaping. But it advantageous in that it defines how escaping > will be used in any/all messages that require it. I think the same > should be said for RLE. Agreed. Maybe RLE and escaping go at the level that $#+- are at, instead of on a per-message basis, so the protocol will allow you to RLE or escape *any* message. I think that's what you're saying, anyway... > Maybe each message needs a check list that > states what features it may use like this: > > My new Message U My comments on this message Or maybe a new kind of query? I'm not sure I like that approach, but queries may have been created with stuff like this in mind. With only slightly more than a year of gdb under my belt, however, I don't have enough experience to say. Perhaps someone else does? b.g. -- William A. Gatliff Senior Design Engineer Komatsu Mining Systems