aboutsummaryrefslogtreecommitdiff
path: root/lldb/source/API/SBProcess.cpp
diff options
context:
space:
mode:
authorWalter Erquinigo <wallace@fb.com>2021-06-01 15:34:06 -0700
committerWalter Erquinigo <wallace@fb.com>2021-06-17 15:14:47 -0700
commitbf9f21a28be171dc500cc68b4cb1fcd3fc33f229 (patch)
tree15fe415b67514d3e546353eea9ed6b208bcf65ae /lldb/source/API/SBProcess.cpp
parentc1360fd5fced42ea45ce1eacbf1c5e1ed54fcac5 (diff)
downloadllvm-bf9f21a28be171dc500cc68b4cb1fcd3fc33f229.zip
llvm-bf9f21a28be171dc500cc68b4cb1fcd3fc33f229.tar.gz
llvm-bf9f21a28be171dc500cc68b4cb1fcd3fc33f229.tar.bz2
[trace][intel-pt] Create basic SB API
This adds a basic SB API for creating and stopping traces. Note: This doesn't add any APIs for inspecting individual instructions. That'd be a more complicated change and it might be better to enhande the dump functionality to output the data in binary format. I'll leave that for a later diff. This also enhances the existing tests so that they test the same flow using both the command interface and the SB API. I also did some cleanup of legacy code. Differential Revision: https://reviews.llvm.org/D103500
Diffstat (limited to 'lldb/source/API/SBProcess.cpp')
-rw-r--r--lldb/source/API/SBProcess.cpp23
1 files changed, 0 insertions, 23 deletions
diff --git a/lldb/source/API/SBProcess.cpp b/lldb/source/API/SBProcess.cpp
index be20e8f..58ed3d7 100644
--- a/lldb/source/API/SBProcess.cpp
+++ b/lldb/source/API/SBProcess.cpp
@@ -44,7 +44,6 @@
#include "lldb/API/SBThread.h"
#include "lldb/API/SBThreadCollection.h"
#include "lldb/API/SBTrace.h"
-#include "lldb/API/SBTraceOptions.h"
#include "lldb/API/SBUnixSignals.h"
using namespace lldb;
@@ -312,26 +311,6 @@ size_t SBProcess::GetAsyncProfileData(char *dst, size_t dst_len) const {
return bytes_read;
}
-lldb::SBTrace SBProcess::StartTrace(SBTraceOptions &options,
- lldb::SBError &error) {
- LLDB_RECORD_METHOD(lldb::SBTrace, SBProcess, StartTrace,
- (lldb::SBTraceOptions &, lldb::SBError &), options, error);
-
- ProcessSP process_sp(GetSP());
- error.Clear();
- SBTrace trace_instance;
- trace_instance.SetSP(process_sp);
- lldb::user_id_t uid = LLDB_INVALID_UID;
-
- if (!process_sp) {
- error.SetErrorString("invalid process");
- } else {
- uid = process_sp->StartTrace(*(options.m_traceoptions_sp), error.ref());
- trace_instance.SetTraceUID(uid);
- }
- return LLDB_RECORD_RESULT(trace_instance);
-}
-
void SBProcess::ReportEventState(const SBEvent &event, SBFile out) const {
LLDB_RECORD_METHOD_CONST(void, SBProcess, ReportEventState,
(const SBEvent &, SBFile), event, out);
@@ -1338,8 +1317,6 @@ void RegisterMethods<SBProcess>(Registry &R) {
(lldb::tid_t, lldb::addr_t));
LLDB_REGISTER_METHOD_CONST(lldb::SBTarget, SBProcess, GetTarget, ());
LLDB_REGISTER_METHOD(size_t, SBProcess, PutSTDIN, (const char *, size_t));
- LLDB_REGISTER_METHOD(lldb::SBTrace, SBProcess, StartTrace,
- (lldb::SBTraceOptions &, lldb::SBError &));
LLDB_REGISTER_METHOD_CONST(void, SBProcess, ReportEventState,
(const lldb::SBEvent &, FILE *));
LLDB_REGISTER_METHOD_CONST(void, SBProcess, ReportEventState,