Skip to content

Commit c69872d

Browse files
committed
[lldb][lldb-dap] add review changes
Signed-off-by: Ebuka Ezike <yerimyah1@gmail.com>
1 parent ababee3 commit c69872d

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

lldb/source/Commands/CommandObjectDisassemble.cpp

+1
Original file line numberDiff line numberDiff line change
@@ -190,6 +190,7 @@ void CommandObjectDisassemble::CommandOptions::OptionParsingStarting(
190190
// architecture. For now GetDisassemblyFlavor is really only valid for x86
191191
// (and for the llvm assembler plugin, but I'm papering over that since that
192192
// is the only disassembler plugin we have...
193+
// this logic is also duplicated in `Handler/DisassembleRequestHandler`
193194
if (target->GetArchitecture().GetTriple().getArch() == llvm::Triple::x86 ||
194195
target->GetArchitecture().GetTriple().getArch() ==
195196
llvm::Triple::x86_64) {

lldb/tools/lldb-dap/Handler/DisassembleRequestHandler.cpp

+4-1
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,10 @@ void DisassembleRequestHandler::operator()(
119119

120120
std::string flavor_string{};
121121
const auto target_triple = llvm::StringRef(dap.target.GetTriple());
122-
if (target_triple.starts_with("x86_64") || target_triple.starts_with("x86")) {
122+
// this handles both 32 and 64bit x86 architecture.
123+
// this logic is also duplicated in
124+
// `CommandObjectDisassemble::CommandOptions::OptionParsingStarting`
125+
if (target_triple.starts_with("x86")) {
123126
const lldb::SBStructuredData flavor =
124127
dap.debugger.GetSetting("target.x86-disassembly-flavor");
125128

0 commit comments

Comments
 (0)