Skip to content

Commit 3e3b00b

Browse files
committed
Honor the setting in the SBAPI
1 parent 390624d commit 3e3b00b

File tree

3 files changed

+13
-9
lines changed

3 files changed

+13
-9
lines changed

lldb/source/API/SBFunction.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,8 @@ SBInstructionList SBFunction::GetInstructions(SBTarget target,
125125
lock = std::unique_lock<std::recursive_mutex>(target_sp->GetAPIMutex());
126126
const bool force_live_memory = true;
127127
sb_instructions.SetDisassembler(Disassembler::DisassembleRange(
128-
module_sp->GetArchitecture(), nullptr, flavor, nullptr, nullptr,
128+
module_sp->GetArchitecture(), nullptr, flavor,
129+
target_sp->GetDisassemblyCPU(), target_sp->GetDisassemblyFeatures(),
129130
*target_sp, m_opaque_ptr->GetAddressRange(), force_live_memory));
130131
}
131132
}

lldb/source/API/SBSymbol.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -126,8 +126,9 @@ SBInstructionList SBSymbol::GetInstructions(SBTarget target,
126126
AddressRange symbol_range(symbol_addr, m_opaque_ptr->GetByteSize());
127127
const bool force_live_memory = true;
128128
sb_instructions.SetDisassembler(Disassembler::DisassembleRange(
129-
module_sp->GetArchitecture(), nullptr, flavor_string, nullptr,
130-
nullptr, *target_sp, symbol_range, force_live_memory));
129+
module_sp->GetArchitecture(), nullptr, flavor_string,
130+
target_sp->GetDisassemblyCPU(), target_sp->GetDisassemblyFeatures(),
131+
*target_sp, symbol_range, force_live_memory));
131132
}
132133
}
133134
}

lldb/source/API/SBTarget.cpp

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2013,9 +2013,9 @@ lldb::SBInstructionList SBTarget::ReadInstructions(lldb::SBAddress base_addr,
20132013
error, force_live_memory, &load_addr);
20142014
const bool data_from_file = load_addr == LLDB_INVALID_ADDRESS;
20152015
sb_instructions.SetDisassembler(Disassembler::DisassembleBytes(
2016-
target_sp->GetArchitecture(), nullptr, nullptr, nullptr,
2017-
flavor_string, *addr_ptr, data.GetBytes(), bytes_read, count,
2018-
data_from_file));
2016+
target_sp->GetArchitecture(), nullptr, target_sp->GetDisassemblyCPU(),
2017+
target_sp->GetDisassemblyFeatures(), flavor_string, *addr_ptr,
2018+
data.GetBytes(), bytes_read, count, data_from_file));
20192019
}
20202020
}
20212021

@@ -2039,8 +2039,9 @@ lldb::SBInstructionList SBTarget::ReadInstructions(lldb::SBAddress start_addr,
20392039
AddressRange range(start_load_addr, size);
20402040
const bool force_live_memory = true;
20412041
sb_instructions.SetDisassembler(Disassembler::DisassembleRange(
2042-
target_sp->GetArchitecture(), nullptr, flavor_string, nullptr,
2043-
nullptr, *target_sp, range, force_live_memory));
2042+
target_sp->GetArchitecture(), nullptr, flavor_string,
2043+
target_sp->GetDisassemblyCPU(), target_sp->GetDisassemblyFeatures(),
2044+
*target_sp, range, force_live_memory));
20442045
}
20452046
}
20462047
return sb_instructions;
@@ -2072,7 +2073,8 @@ SBTarget::GetInstructionsWithFlavor(lldb::SBAddress base_addr,
20722073
const bool data_from_file = true;
20732074

20742075
sb_instructions.SetDisassembler(Disassembler::DisassembleBytes(
2075-
target_sp->GetArchitecture(), nullptr, flavor_string, nullptr, nullptr,
2076+
target_sp->GetArchitecture(), nullptr, flavor_string,
2077+
target_sp->GetDisassemblyCPU(), target_sp->GetDisassemblyFeatures(),
20762078
addr, buf, size, UINT32_MAX, data_from_file));
20772079
}
20782080

0 commit comments

Comments
 (0)