~pali/llvm/lldb-trunk

Viewing all changes in revision 18183.

  • Committer: lanza
  • Date: 2018-11-15 19:49:57 UTC
  • Revision ID: svn-v4:91177308-0d34-0410-b5e6-96231b3b80d8:lldb/trunk:346988
Add a check whether or not a str is utf8 prior to emplacing

Summary:
Highlighing junk data on VSCode can send a query for evaluate which
fails. In particular cases on Windows, this the error message can end
up as a c-string of [-35,-35,-35,-35,...]. Attempting to emplace this
as the error message causes an assert failure.

Prior to emplacing the error message, confirm that it is valid UTF8 to
eliminate errors such as mentione above.

Reviewers: xiaobai, clayborg

Reviewed By: clayborg

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

expand all expand all

Show diffs side-by-side

added added

removed removed

Lines of Context: