aboutsummaryrefslogtreecommitdiff
path: root/lldb/source/Commands/CommandObjectThread.cpp
diff options
context:
space:
mode:
authorWalter Erquinigo <wallace@fb.com>2022-10-15 18:52:22 -0700
committerWalter Erquinigo <wallace@fb.com>2022-10-18 13:57:53 -0700
commitf1e63855b08e366dc9d3bf1d3394a8f5c77ab3a6 (patch)
tree146f982e091cae27b1319648103bea74ca357fbf /lldb/source/Commands/CommandObjectThread.cpp
parent840d861d6e524637a96fe9b7f6d2d77091521167 (diff)
downloadllvm-f1e63855b08e366dc9d3bf1d3394a8f5c77ab3a6.zip
llvm-f1e63855b08e366dc9d3bf1d3394a8f5c77ab3a6.tar.gz
llvm-f1e63855b08e366dc9d3bf1d3394a8f5c77ab3a6.tar.bz2
[lldb][trace] Add a basic function call dump [3] - Add a JSON dumper
The JSON dumper is very minimalistic. It pretty much only shows the delimiting instruction IDs of every segment, so that further queries to the SBCursor can be used to make sense of the data. It's main purpose is to be serialized somewhat cheaply. I also renamed untracedSegment to untracedPrefixSegment, in case in the future we add an untracedSuffixSegment. In any case, this new name is more explicit, which I like. Differential Revision: https://reviews.llvm.org/D136034
Diffstat (limited to 'lldb/source/Commands/CommandObjectThread.cpp')
-rw-r--r--lldb/source/Commands/CommandObjectThread.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/lldb/source/Commands/CommandObjectThread.cpp b/lldb/source/Commands/CommandObjectThread.cpp
index f7a571d..414acfb 100644
--- a/lldb/source/Commands/CommandObjectThread.cpp
+++ b/lldb/source/Commands/CommandObjectThread.cpp
@@ -2132,6 +2132,7 @@ public:
break;
}
case 'J': {
+ m_dumper_options.json = true;
m_dumper_options.pretty_print_json = true;
break;
}
@@ -2198,8 +2199,7 @@ 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,
- lldb::eFilePermissionsFileDefault);
+ File::eOpenOptionWriteOnly | File::eOpenOptionCanCreate);
}
m_options.m_dumper_options.forwards = true;
@@ -2395,8 +2395,7 @@ 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,
- lldb::eFilePermissionsFileDefault);
+ File::eOpenOptionWriteOnly | File::eOpenOptionCanCreate);
}
if (m_options.m_continue && !m_last_id) {