This is an archive of the discontinued LLVM Phabricator instance.

[lldb/Interpreter] Introduce ScriptedPlatform{,Python}Interface
ClosedPublic

Authored by mib on Dec 2 2022, 11:58 PM.

Details

Summary

This patch introduces both the ScriptedPlatformInterface and the
ScriptedPlatformPythonInterface. As the name suggests, these calls will
be used to call into the Scripted Platform python implementation from
the C++ Scripted Platform plugin instance.

Signed-off-by: Med Ismail Bennani <medismail.bennani@gmail.com>

Diff Detail

Event Timeline

mib created this revision.Dec 2 2022, 11:58 PM
Herald added a project: Restricted Project. · View Herald TranscriptDec 2 2022, 11:58 PM
mib requested review of this revision.Dec 2 2022, 11:58 PM
bulbazord added inline comments.Dec 6 2022, 2:52 PM
lldb/include/lldb/Interpreter/ScriptedPlatformInterface.h
15

What is MemoryRegionInfo.h for?

37–43

The status messages should probably refer to ScriptedPlatformInterface instead of ScriptedPlatform to be clearer.

lldb/source/Plugins/ScriptInterpreter/Python/ScriptedPlatformPythonInterface.cpp
2–3

This header is also broken.

lldb/source/Plugins/ScriptInterpreter/Python/ScriptedPlatformPythonInterface.h
2–3

The header is a little broken here.

mib updated this revision to Diff 481848.Dec 10 2022, 5:32 AM
mib marked 4 inline comments as done.

Address @bulbazord comments

bulbazord accepted this revision.Dec 12 2022, 4:08 PM

LGTM

lldb/source/Plugins/ScriptInterpreter/Python/ScriptedPlatformPythonInterface.cpp
98

nit: This #endif should have a // LLDB_ENABLE_PYTHON at the end of it to be consistent style-wise.

This revision is now accepted and ready to land.Dec 12 2022, 4:08 PM
JDevlieghere accepted this revision.Dec 13 2022, 1:28 PM
mib updated this revision to Diff 488006.Jan 10 2023, 3:04 PM
mib marked an inline comment as done.
mib updated this revision to Diff 488488.Jan 11 2023, 11:29 PM

Add AttachToProcess method to interface