aboutsummaryrefslogtreecommitdiff
path: root/lldb/source/Utility/StringExtractorGDBRemote.cpp
diff options
context:
space:
mode:
authorWalter Erquinigo <a20012251@gmail.com>2020-10-29 12:44:13 -0700
committerWalter Erquinigo <a20012251@gmail.com>2020-11-11 10:35:58 -0800
commit21555fff4de811309ea7935f9cb65578c957d77f (patch)
tree64bfd67d9742f1198ed6f66bac8426157c10edbe /lldb/source/Utility/StringExtractorGDBRemote.cpp
parent16f8142b11598d6d4a4c26333bd3cb9b9f4898f0 (diff)
downloadllvm-21555fff4de811309ea7935f9cb65578c957d77f.zip
llvm-21555fff4de811309ea7935f9cb65578c957d77f.tar.gz
llvm-21555fff4de811309ea7935f9cb65578c957d77f.tar.bz2
[intel-pt][trace] Implement a "get supported trace type" packet
Depends on D89283. The goal of this packet (jTraceGetSupportedType) is to be able to query the gdb-server for the tracing technology that can work for the current debuggeer, which can make the user experience simpler but allowing the user to simply type thread trace start to start tracing the current thread without even telling the debugger to use "intel-pt", for example. Similarly, `thread trace start [args...]` would accept args beloging to the working trace type. Also, if the user typed help thread trace start We could directly show the help information of the trace type that is supported for the target, or mention instead that no tracing is supported, if that's the case. I added some simple tests, besides, when I ran this on my machine with intel-pt support, I got $ process plugin packet send "jTraceSupportedType" packet: jTraceSupportedType response: {"description":"Intel Processor Trace","pluginName":"intel-pt"} On a machine without intel-pt support, I got $ process plugin packet send "jTraceSupportedType" packet: jTraceSupportedType response: E00; Reviewed By: clayborg, labath Differential Revision: https://reviews.llvm.org/D90490
Diffstat (limited to 'lldb/source/Utility/StringExtractorGDBRemote.cpp')
-rw-r--r--lldb/source/Utility/StringExtractorGDBRemote.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/lldb/source/Utility/StringExtractorGDBRemote.cpp b/lldb/source/Utility/StringExtractorGDBRemote.cpp
index 2901500..def0968 100644
--- a/lldb/source/Utility/StringExtractorGDBRemote.cpp
+++ b/lldb/source/Utility/StringExtractorGDBRemote.cpp
@@ -310,6 +310,8 @@ StringExtractorGDBRemote::GetServerPacketType() const {
return eServerPacketType_jTraceStart;
if (PACKET_STARTS_WITH("jTraceStop:"))
return eServerPacketType_jTraceStop;
+ if (PACKET_MATCHES("jLLDBTraceSupportedType"))
+ return eServerPacketType_jLLDBTraceSupportedType;
break;
case 'v':