Commit Graph

11 Commits

Author SHA1 Message Date
Walter Erquinigo bf9f21a28b [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
2021-06-17 15:14:47 -07:00
Jonas Devlieghere 4b35403942 [lldb/API] Move SBCommandInterpreterRunOption in its own header. (NFC)
Currently, `SBCommandInterpreterRunOptions` is defined in
`SBCommandInterpreter.h`. Given that the options are always passed by
reference, a forward declaration is sufficient.

That's not the case for `SBCommandInterpreterRunResults`, which we need
for a new overload for `RunCommandInterpreter` and that returns this new
class by value. We can't include `SBCommandInterpreter.h` because
`SBCommandInterpreter::GetDebugger()` returns SBDebugger by value and
therefore needs a full definition.

This patch moves the definition of `SBCommandInterpreterRunOptions` into
a new header. In a later patch,  `SBCommandInterpreterRunResults` will
be defined in there as well, solving the aforementioned problem.

Differential revision: https://reviews.llvm.org/D79115
2020-04-30 13:41:21 -07:00
Jonas Devlieghere fc41013893 [lldb/Reproducers] Capture reproducers from the API test suite.
Make it possible to capture reproducers from the API test suite. Given
the symmetry between capture and replay, this patch also adds the
necessary code for replay. For now this is a NO-OP until the
corresponding reproducer instrumentation changes land.

For more info please refer to the RFC on lldb-dev:
http://lists.llvm.org/pipermail/lldb-dev/2020-April/016100.html

Differential revision: https://reviews.llvm.org/D77588
2020-04-14 09:24:23 -07:00
Walter Erquinigo ca69be218c Create basic SBEnvironment class 2020-03-23 19:23:33 -07:00
Walter Erquinigo 318a0caf9a Revert "Create basic SBEnvironment class"
This reverts commit fd868f517d.
2020-03-23 18:20:10 -07:00
Walter Erquinigo fd868f517d Create basic SBEnvironment class 2020-03-23 17:59:06 -07:00
Walter Erquinigo 7ece7c0faa Revert "Create basic SBEnvironment class"
This reverts commit 34c0759f84.
2020-03-20 19:25:27 -07:00
Walter Erquinigo 34c0759f84 Create basic SBEnvironment class
Summary: Inspired by https://reviews.llvm.org/D74636, I'm introducing a basic version of Environment in the API. More functionalities can be added as needed.

Reviewers: labath, clayborg

Subscribers: mgorny, lldb-commits, diazhector98

Tags: #lldb

Differential Revision: https://reviews.llvm.org/D76111
2020-03-20 18:51:25 -07:00
Adrian Prantl 0a5fbf3093 Temporarily Revert "Create basic SBEnvironment class"
while investigating bot breakage.

This reverts commit 2dec82652e.
2020-03-20 16:47:50 -07:00
Walter Erquinigo 2dec82652e Create basic SBEnvironment class
Summary: Inspired by https://reviews.llvm.org/D74636, I'm introducing a basic version of Environment in the API. More functionalities can be added as needed.

Reviewers: labath, clayborg

Subscribers: mgorny, lldb-commits, diazhector98

Tags: #lldb

Differential Revision: https://reviews.llvm.org/D76111
2020-03-20 14:38:50 -07:00
Jonas Devlieghere 6498aff249 [lldb/Bindings] Move bindings into their own subdirectory
All the code required to generate the language bindings for Python and
Lua lives under scripts, even though the majority of this code aren't
scripts at all, and surrounded by scripts that are totally unrelated.

I've reorganized these files and moved everything related to the
language bindings into a new top-level directory named bindings. This
makes the corresponding files self contained and much more discoverable.

Differential revision: https://reviews.llvm.org/D72437
2020-01-09 08:44:34 -08:00