[lldb] Reduce duplication in CommandObjectDisassemble
authorPavel Labath <pavel@labath.sk>
Tue, 3 Mar 2020 16:03:55 +0000 (17:03 +0100)
committerPavel Labath <pavel@labath.sk>
Wed, 4 Mar 2020 12:47:35 +0000 (13:47 +0100)
commit3245dd59b124cbfce8cdce1f2c90e843d57d8722
treebc8e2324dc9ecb06d95a64194584bd5e4350e345
parent7d2fdd3f6639731284dd8b6b274f01f04fd19215
[lldb] Reduce duplication in CommandObjectDisassemble

This command had nearly identical code for the "then" and "else"
branches of the "if (m_options.num_instructions != 0)" condition.

This patch factors out the common parts of the two blocks to reduce
duplication.
lldb/source/Commands/CommandObjectDisassemble.cpp
lldb/test/Shell/Commands/Inputs/command-disassemble-process.lldbinit
lldb/test/Shell/Commands/command-disassemble-process.yaml