[lldb-vscode ]Add Syntax Highlighting to Disassembly View
authorYifan Shen <aelitashen@fb.com>
Tue, 4 Aug 2020 20:31:44 +0000 (13:31 -0700)
committerWalter Erquinigo <waltermelon@fb.com>
Tue, 4 Aug 2020 20:31:44 +0000 (13:31 -0700)
commite7af98680ad52ffc6d308ef63667ac6fb4bb16a7
tree4d9efc107479d03b52c4d0a05f9fda18d21f17df
parent95efea4b9310bb204a42fbf29abd4efa65647000
[lldb-vscode ]Add Syntax Highlighting to Disassembly View

When lldb cannot find source file thus IDE renders a disassembly view, add syntax highlighting for constants, registers and final line comments for better debugging experience.
The original plain disassembly view looks like:
{F12401687}
An ideal view is like the screenshot attached.
{F12401515}

In this diff, the mimeType is a kind of media type for formatting the content in the response to a source request. Elements in the disassembly view, like constants, registers and final line comments are colored for highlighting.
A built-in support in the VSCode IDE for syntax highlighting will identify the which mimeType to apply and render the disassembly view as expected.

Reviewed By: wallace, clayborg

Differential Revision: https://reviews.llvm.org/D84555
lldb/tools/lldb-vscode/lldb-vscode.cpp
lldb/tools/lldb-vscode/package.json
lldb/tools/lldb-vscode/syntaxes/arm.disasm [new file with mode: 0644]
lldb/tools/lldb-vscode/syntaxes/arm64.disasm [new file with mode: 0644]
lldb/tools/lldb-vscode/syntaxes/disassembly.json [new file with mode: 0644]
lldb/tools/lldb-vscode/syntaxes/x86.disasm [new file with mode: 0644]