[lldb] Add detailed tests for the "disassemble" command
authorPavel Labath <pavel@labath.sk>
Tue, 3 Mar 2020 15:23:00 +0000 (16:23 +0100)
committerPavel Labath <pavel@labath.sk>
Tue, 3 Mar 2020 15:40:27 +0000 (16:40 +0100)
commit573e0776996425dd0567448d4a1f805a1f613e6d
tree07ae9527d56e990f345a9cec7ea38d0c1567c196
parent779e2c7a1a2638092fcb33f488ce51a50d140ea0
[lldb] Add detailed tests for the "disassemble" command

While we have some tests for this command already, they are very vague.
This is not surprising -- it's hard to make strict assertions about the
assembly if your input is a c++ source file. This means that the tests
can more-or-less only detect when the command breaks completely, and not
when there is a subtle change in meaning due to e.g. a code refactor --
which is something that I am getting ready to do.

This tests in this patch create binaries with well known data (via assembler
and yaml2obj). This means that we are able to make precise assertions
about the text that lldb is supposed to print. As some of the features
of this command are only available with a real process, I use a minidump
core file to create a sufficiently realistic process object.
lldb/test/Shell/Commands/Inputs/command-disassemble-process.lldbinit [new file with mode: 0644]
lldb/test/Shell/Commands/Inputs/command-disassemble.lldbinit [new file with mode: 0644]
lldb/test/Shell/Commands/command-disassemble-process.yaml [new file with mode: 0644]
lldb/test/Shell/Commands/command-disassemble.s [new file with mode: 0644]
lldb/test/Shell/Commands/lit.local.cfg [new file with mode: 0644]