From bcd80b47234b48e42ed9f8d557faef554034c47a Mon Sep 17 00:00:00 2001 From: Enrico Granata Date: Wed, 16 Jan 2013 18:53:52 +0000 Subject: Adding FindFirstGlobalVariable to SBModule and SBTarget These calls work like FindGlobalVariables but they only return the first match found and so they can return an SBValue instead of an SBValueList for added convenience of use llvm-svn: 172636 --- lldb/scripts/Python/interface/SBModule.i | 18 ++++++++++++++++++ lldb/scripts/Python/interface/SBTarget.i | 15 +++++++++++++++ 2 files changed, 33 insertions(+) (limited to 'lldb/scripts') diff --git a/lldb/scripts/Python/interface/SBModule.i b/lldb/scripts/Python/interface/SBModule.i index ee2d3b42c44..6142c39dfb9 100644 --- a/lldb/scripts/Python/interface/SBModule.i +++ b/lldb/scripts/Python/interface/SBModule.i @@ -248,6 +248,24 @@ public: const char *name, uint32_t max_matches); + %feature("docstring", " + //------------------------------------------------------------------ + /// Find the first global (or static) variable by name. + /// + /// @param[in] target + /// A valid SBTarget instance representing the debuggee. + /// + /// @param[in] name + /// The name of the global or static variable we are looking + /// for. + /// + /// @return + /// An SBValue that gets filled in with the found variable (if any). + //------------------------------------------------------------------ + ") FindFirstGlobalVariable; + lldb::SBValue + FindFirstGlobalVariable (lldb::SBTarget &target, const char *name); + lldb::ByteOrder GetByteOrder (); diff --git a/lldb/scripts/Python/interface/SBTarget.i b/lldb/scripts/Python/interface/SBTarget.i index 88fcf036ee1..8d681e80653 100644 --- a/lldb/scripts/Python/interface/SBTarget.i +++ b/lldb/scripts/Python/interface/SBTarget.i @@ -586,6 +586,21 @@ public: FindGlobalVariables (const char *name, uint32_t max_matches); + %feature("docstring", " + //------------------------------------------------------------------ + /// Find the first global (or static) variable by name. + /// + /// @param[in] name + /// The name of the global or static variable we are looking + /// for. + /// + /// @return + /// An SBValue that gets filled in with the found variable (if any). + //------------------------------------------------------------------ + ") FindFirstGlobalVariable; + lldb::SBValue + FindFirstGlobalVariable (const char* name); + void Clear (); -- cgit v1.2.1