aboutsummaryrefslogtreecommitdiff
path: root/lldb/source/Commands/CommandObjectThread.cpp
diff options
context:
space:
mode:
authorWalter Erquinigo <wallace@fb.com>2022-10-19 00:18:01 -0700
committerWalter Erquinigo <wallace@fb.com>2022-10-19 00:44:48 -0700
commit1e58e3e1e96096f2d8db759555cf5132c5860519 (patch)
tree5f25c1277741175b9ac0b6bbb7db10de3897e6d4 /lldb/source/Commands/CommandObjectThread.cpp
parent6e85b8807fd473f58ac6a9a58a400a50c5c3c76e (diff)
downloadllvm-1e58e3e1e96096f2d8db759555cf5132c5860519.zip
llvm-1e58e3e1e96096f2d8db759555cf5132c5860519.tar.gz
llvm-1e58e3e1e96096f2d8db759555cf5132c5860519.tar.bz2
[lldb][trace] Fix some minor bugs in the call tree
- We weren't truncating the output files - We weren't considering the case in which we couldn't disassembly an instruction.
Diffstat (limited to 'lldb/source/Commands/CommandObjectThread.cpp')
-rw-r--r--lldb/source/Commands/CommandObjectThread.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/lldb/source/Commands/CommandObjectThread.cpp b/lldb/source/Commands/CommandObjectThread.cpp
index 414acfb..bfe8504 100644
--- a/lldb/source/Commands/CommandObjectThread.cpp
+++ b/lldb/source/Commands/CommandObjectThread.cpp
@@ -2199,7 +2199,8 @@ protected:
llvm::Optional<StreamFile> out_file;
if (m_options.m_output_file) {
out_file.emplace(m_options.m_output_file->GetPath().c_str(),
- File::eOpenOptionWriteOnly | File::eOpenOptionCanCreate);
+ File::eOpenOptionWriteOnly | File::eOpenOptionCanCreate |
+ File::eOpenOptionTruncate);
}
m_options.m_dumper_options.forwards = true;
@@ -2395,7 +2396,8 @@ protected:
llvm::Optional<StreamFile> out_file;
if (m_options.m_output_file) {
out_file.emplace(m_options.m_output_file->GetPath().c_str(),
- File::eOpenOptionWriteOnly | File::eOpenOptionCanCreate);
+ File::eOpenOptionWriteOnly | File::eOpenOptionCanCreate |
+ File::eOpenOptionTruncate);
}
if (m_options.m_continue && !m_last_id) {