This is an archive of the discontinued LLVM Phabricator instance.

[lldb] Add OperatingSystem base class to the lldb python module
ClosedPublic

Authored by mib on Aug 31 2023, 3:06 PM.

Details

Summary

This patch introduce an OperatingSystem base implementation in the lldb
python module to make it easier to lldb users to write their own
implementation.

The OperatingSystem base implementation is derived itself from the
ScriptedThread base implementation since they share some common grounds.

To achieve that, this patch makes changes to the ScriptedThread
initializer since it gets called by the OperatingSystem initializer.

I also took the opportunity to document the OperatingSystem base
class and methods.

Signed-off-by: Med Ismail Bennani <ismail@bennani.ma>

Diff Detail

Event Timeline

mib created this revision.Aug 31 2023, 3:06 PM
Herald added a project: Restricted Project. · View Herald TranscriptAug 31 2023, 3:06 PM
mib requested review of this revision.Aug 31 2023, 3:06 PM

I hope that some comments are helpful! The documentation that you added is tremendously helpful -- I know how documentation is sometimes a thankless task, so I will say what everyone is thinking: "THANK YOU".

lldb/examples/python/templates/operating_system.py
11
27
31
32
33
73
80

I am sorry but I do not quite understand the meaning of this description. It is probably because I am dense, but maybe you can look at rewording it slightly?

89
mib added a comment.Sep 1 2023, 8:44 AM

I hope that some comments are helpful! The documentation that you added is tremendously helpful -- I know how documentation is sometimes a thankless task, so I will say what everyone is thinking: "THANK YOU".

Thanks @hawkinsw ! I really appreciate it :)

mib updated this revision to Diff 555397.Sep 1 2023, 8:48 AM
mib marked 8 inline comments as done.
mib added a reviewer: hawkinsw.

Address @hawkinsw feedbacks.

JDevlieghere accepted this revision.Sep 1 2023, 9:26 AM

Looks great. LGTM!

This revision is now accepted and ready to land.Sep 1 2023, 9:26 AM