[Lldb-commits] [PATCH] D95686: [lldb/API] Expose Module::IsLoadedInTarget() to SB API (NFC)
Raphael Isemann via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Mon Feb 1 03:06:06 PST 2021
teemperor accepted this revision.
teemperor added a comment.
This revision is now accepted and ready to land.
some minor things in the comments, otherwise LGTM
================
Comment at: lldb/bindings/interface/SBTarget.i:946
+
+ :param module: `SBModule` that should be loaded in this `SBTarget`.
+ :rtype: bool
----------------
That sounds like the function loads the module. I think we can just leave this out as this function has only one parameter and the description makes it clear what this parameter is.
================
Comment at: lldb/test/API/python_api/target/TestTargetAPI.py:514
+ module = target.GetModuleAtIndex(i)
+ self.assertTrue(target.IsLoaded(module), "Module should be loaded "
+ "in target.")
----------------
"Running the target should have loaded its modules"
================
Comment at: lldb/test/API/python_api/target/TestTargetAPI.py:506
+ module = target.GetModuleAtIndex(i)
+ self.assertFalse(target.IsLoaded(module), "Module should not be "
+ "loaded in target.")
----------------
I think the assert message could describe why this is being checked (target that hasn't been launched doesn't have anything loaded)
`selft.assertFalse(..., "Target that isn't running shouldn't have any modules loaded"``
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D95686/new/
https://reviews.llvm.org/D95686
More information about the lldb-commits
mailing list