Quote error string from qLaunchSuccess
authorJason Molenda <jason@molenda.com>
Tue, 12 May 2020 03:01:54 +0000 (20:01 -0700)
committerJason Molenda <jason@molenda.com>
Tue, 12 May 2020 03:05:57 +0000 (20:05 -0700)
commit2b8b783b1ab4a2388d5d80136221729871f65a32
tree2e7c344d1fd7a3e6ffe854f10915d8978da0a126
parent59a299cbb303b23fb26992bcae0b32294b1d45f2
Quote error string from qLaunchSuccess

If the error message from qLaunchSucess included a gdb RSP
metacharacter, it could crash lldb.  Apply the binary
escaping to the string before sending it to lldb; lldb
promiscuously applies the binary escaping protocol on
packets it receives.

Also fix a small bug in cstring_to_asciihex_string where
a high bit character (eg utf-8 chars) would not be
quoted correctly due to signed char fun.

Differential Revision: https://reviews.llvm.org/D79614

rdar://problem/62873581
lldb/tools/debugserver/source/RNBRemote.cpp