summaryrefslogtreecommitdiff
path: root/lldb/source/API
diff options
context:
space:
mode:
Diffstat (limited to 'lldb/source/API')
-rw-r--r--lldb/source/API/SBInstruction.cpp7
-rw-r--r--lldb/source/API/SBInstructionList.cpp5
-rw-r--r--lldb/source/API/SBSection.cpp9
-rw-r--r--lldb/source/API/SBTrace.cpp18
4 files changed, 34 insertions, 5 deletions
diff --git a/lldb/source/API/SBInstruction.cpp b/lldb/source/API/SBInstruction.cpp
index 6cb9e5dbc1af..ced22628a297 100644
--- a/lldb/source/API/SBInstruction.cpp
+++ b/lldb/source/API/SBInstruction.cpp
@@ -241,7 +241,8 @@ bool SBInstruction::GetDescription(lldb::SBStream &s) {
// didn't have a stream already created, one will get created...
FormatEntity::Entry format;
FormatEntity::Parse("${addr}: ", format);
- inst_sp->Dump(&s.ref(), 0, true, false, nullptr, &sc, nullptr, &format, 0);
+ inst_sp->Dump(&s.ref(), 0, true, false, /*show_control_flow_kind=*/false,
+ nullptr, &sc, nullptr, &format, 0);
return true;
}
return false;
@@ -275,8 +276,8 @@ void SBInstruction::Print(FileSP out_sp) {
StreamFile out_stream(out_sp);
FormatEntity::Entry format;
FormatEntity::Parse("${addr}: ", format);
- inst_sp->Dump(&out_stream, 0, true, false, nullptr, &sc, nullptr, &format,
- 0);
+ inst_sp->Dump(&out_stream, 0, true, false, /*show_control_flow_kind=*/false,
+ nullptr, &sc, nullptr, &format, 0);
}
}
diff --git a/lldb/source/API/SBInstructionList.cpp b/lldb/source/API/SBInstructionList.cpp
index e289e8e9343d..ae87d7965766 100644
--- a/lldb/source/API/SBInstructionList.cpp
+++ b/lldb/source/API/SBInstructionList.cpp
@@ -165,8 +165,9 @@ bool SBInstructionList::GetDescription(Stream &sref) {
addr, eSymbolContextEverything, sc);
}
- inst->Dump(&sref, max_opcode_byte_size, true, false, nullptr, &sc,
- &prev_sc, &format, 0);
+ inst->Dump(&sref, max_opcode_byte_size, true, false,
+ /*show_control_flow_kind=*/false, nullptr, &sc, &prev_sc,
+ &format, 0);
sref.EOL();
}
return true;
diff --git a/lldb/source/API/SBSection.cpp b/lldb/source/API/SBSection.cpp
index 733e0db0b5ba..3a9cf20e484a 100644
--- a/lldb/source/API/SBSection.cpp
+++ b/lldb/source/API/SBSection.cpp
@@ -242,6 +242,15 @@ uint32_t SBSection::GetTargetByteSize() {
return 0;
}
+uint32_t SBSection::GetAlignment() {
+ LLDB_INSTRUMENT_VA(this);
+
+ SectionSP section_sp(GetSP());
+ if (section_sp.get())
+ return (1 << section_sp->GetLog2Align());
+ return 0;
+}
+
bool SBSection::operator==(const SBSection &rhs) {
LLDB_INSTRUMENT_VA(this, rhs);
diff --git a/lldb/source/API/SBTrace.cpp b/lldb/source/API/SBTrace.cpp
index fe9003237073..2b1f140161b6 100644
--- a/lldb/source/API/SBTrace.cpp
+++ b/lldb/source/API/SBTrace.cpp
@@ -43,6 +43,24 @@ SBTrace SBTrace::LoadTraceFromFile(SBError &error, SBDebugger &debugger,
return SBTrace(trace_or_err.get());
}
+SBFileSpec SBTrace::SaveToDisk(SBError &error, const SBFileSpec &bundle_dir,
+ bool compact) {
+ LLDB_INSTRUMENT_VA(this, error, bundle_dir, compact);
+
+ error.Clear();
+ SBFileSpec file_spec;
+
+ if (!m_opaque_sp)
+ error.SetErrorString("error: invalid trace");
+ else if (Expected<FileSpec> desc_file =
+ m_opaque_sp->SaveToDisk(bundle_dir.ref(), compact))
+ file_spec.SetFileSpec(*desc_file);
+ else
+ error.SetErrorString(llvm::toString(desc_file.takeError()).c_str());
+
+ return file_spec;
+}
+
const char *SBTrace::GetStartConfigurationHelp() {
LLDB_INSTRUMENT_VA(this);
return m_opaque_sp ? m_opaque_sp->GetStartConfigurationHelp() : nullptr;