diff options
author | Walter Erquinigo <wallace@fb.com> | 2022-10-19 00:18:01 -0700 |
---|---|---|
committer | Walter Erquinigo <wallace@fb.com> | 2022-10-19 00:44:48 -0700 |
commit | 1e58e3e1e96096f2d8db759555cf5132c5860519 (patch) | |
tree | 5f25c1277741175b9ac0b6bbb7db10de3897e6d4 /lldb/source/Commands/CommandObjectThread.cpp | |
parent | 6e85b8807fd473f58ac6a9a58a400a50c5c3c76e (diff) | |
download | llvm-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.cpp | 6 |
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) { |