What we can't do is require the remote server to support the new protocol. lldb-server isn't the only thing we talk to, and failing because we didn't get a specific non-RSP conformant error packet would be bad.
I like Pavel's idea of enabling it via a Q packet, and after being enabled it should always be optional. -- Qualcomm Innovation Center, Inc. The Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a Linux Foundation Collaborative Project > -----Original Message----- > From: lldb-dev [mailto:lldb-dev-boun...@lists.llvm.org] On Behalf Of Pavel > Labath via lldb-dev > Sent: Wednesday, June 21, 2017 11:41 AM > To: Ravitheja Addepally <ravithejaw...@gmail.com> > Cc: LLDB <lldb-dev@lists.llvm.org> > Subject: Re: [lldb-dev] Support for Error Strings in remote protocol > > +1 one from me. I like the idea a lot. Specific details below. > > On 21 June 2017 at 16:31, Ravitheja Addepally via lldb-dev <lldb- > d...@lists.llvm.org> wrote: > > Hello all, > > Currently the remote protocol in LLDB does not allow sending > > Error Strings in response to remote packets, it only allows for "ENN" > > format where N is a hex integer. In our current ongoing work, we would > > like to have support for Sending Error Strings from lldb-server. I > > would like to invite any opinions or suggestions in this matter ? > > > > A very simple proposal would be to just attach an error string maybe > > as a Name:Value Pair ? like so -> > > > > EXX;"Error String" > > or > > EXX;M"Error String" > > I guess the decision here depends on how forward-compatible we want to > be. If we don't anticipate adding further fields here, then the format can > just > be EXX;message and no quoting is needed. If we want to add more fields in > the future (I don't really see what could they be though), then we should > stick to the standard semi-colon delimited list format. So, something like: > EXX;message:<message> > But then we need to decide how to encode <message>. I guess the most > "standard" approach would be to hex-encode it, although it will make them > hard to read manually. > > > > > I guess removing EXX would make it incompatible with gdb-server. Also > > adding new packets to query errors might not be desired ? > I think we should keep the numeric codes. Sometimes it may be useful to > programmatically switch on them, and that's hard to do with a string only. For > compatibility's sake, I'd only send the error messages if the client > explicitly > enables it via some packet. > > pl > _______________________________________________ > lldb-dev mailing list > lldb-dev@lists.llvm.org > http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-dev _______________________________________________ lldb-dev mailing list lldb-dev@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-dev