[Lldb-commits] [lldb] r228975 - I had recently added a new SBFrame::GetVariables() overload with yet another bool argument

Enrico Granata egranata at apple.com
Tue Feb 17 10:28:14 PST 2015


> On Feb 17, 2015, at 9:59 AM, Zachary Turner <zturner at google.com> wrote:
> 
> I reverted the revert

Thanks!

> because it caused other problems which I didn't see at first.  In the future please try to add new files to CMakeLists.txt. 

I think we had this same conversation a couple of times and we got to the point where people who use a specific build system would fix build problems specific to that build system
Sure, if it is as easy-peasy as adding a file to a list I can probably do it (provided I remember) but given the low low penalty bar for forgetting (a random bot somewhere may fail sometime in the future), it does seem a fairly error-prone process anyway
Anyway, if we want to change the consensus from what it was to “anyone has to fix any build system” that’s fine - but it should be changed explicitly

> We shoudln't be letting red bots linger for any significant amount of time

I really don’t think I got a failure notice for this one - with that said, your statement is a truism, so no objection there
Obviously, a non-trivial failure on Windows is going to be quite hard for me to diagnose without external help (I have access to exactly 0 Windows machines :-), so please do escalate these to my attention when they happen

> , because it masks other failures (such as the lldb-mi failure I now have to figure out independently which was masked by the already-red bot due to this change)
> 
> On Tue Feb 17 2015 at 9:45:33 AM Zachary Turner <zturner at google.com <mailto:zturner at google.com>> wrote:
> Hi Enrico,
> 
> I had to revert this as it has been causing linker errors on our Windows bots since last Thursday.
> 
> http://lab.llvm.org:8011/builders/lldb-x86-win7-msvc/builds/725 <http://lab.llvm.org:8011/builders/lldb-x86-win7-msvc/builds/725>
> 
> There was a merge conflict with the xcode workspace, I hope I resolved it correctly.  Sorry about this revert.  I believe the bots sent out failure messages, but please let me know if you did not receive one for whatever reason.
> 
> On Thu Feb 12 2015 at 3:24:04 PM Enrico Granata <egranata at apple.com <mailto:egranata at apple.com>> wrote:
> Author: enrico
> Date: Thu Feb 12 17:09:17 2015
> New Revision: 228975
> 
> URL: http://llvm.org/viewvc/llvm-project?rev=228975&view=rev <http://llvm.org/viewvc/llvm-project?rev=228975&view=rev>
> Log:
> I had recently added a new SBFrame::GetVariables() overload with yet another bool argument
> 
> We talked about it internally - and came to the conclusion that it's time to have an options class
> 
> This commit adds an SBVariablesOptions class and goes through all the required dance
> 
> Added:
>     lldb/trunk/include/lldb/API/SBVariablesOptions.h
>     lldb/trunk/scripts/Python/interface/SBVariablesOptions.i
>     lldb/trunk/source/API/SBVariablesOptions.cpp
> Removed:
>     lldb/trunk/test/functionalities/data-formatter/typedef_array/Makefile
> Modified:
>     lldb/trunk/include/lldb/API/LLDB.h
>     lldb/trunk/include/lldb/API/SBDefines.h
>     lldb/trunk/include/lldb/API/SBFrame.h
>     lldb/trunk/lldb.xcodeproj/project.pbxproj
>     lldb/trunk/scripts/Python/build-swig-Python.sh
>     lldb/trunk/scripts/Python/interface/SBFrame.i
>     lldb/trunk/scripts/lldb.swig
>     lldb/trunk/source/API/CMakeLists.txt
>     lldb/trunk/source/API/SBFrame.cpp
> 
> Modified: lldb/trunk/include/lldb/API/LLDB.h
> URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/API/LLDB.h?rev=228975&r1=228974&r2=228975&view=diff <http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/API/LLDB.h?rev=228975&r1=228974&r2=228975&view=diff>
> ==============================================================================
> --- lldb/trunk/include/lldb/API/LLDB.h (original)
> +++ lldb/trunk/include/lldb/API/LLDB.h Thu Feb 12 17:09:17 2015
> @@ -52,5 +52,6 @@
>  #include "lldb/API/SBType.h"
>  #include "lldb/API/SBValue.h"
>  #include "lldb/API/SBValueList.h"
> +#include "lldb/API/SBVariablesOptions.h"
> 
>  #endif  // LLDB_LLDB_h_
> 
> Modified: lldb/trunk/include/lldb/API/SBDefines.h
> URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/API/SBDefines.h?rev=228975&r1=228974&r2=228975&view=diff <http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/API/SBDefines.h?rev=228975&r1=228974&r2=228975&view=diff>
> ==============================================================================
> --- lldb/trunk/include/lldb/API/SBDefines.h (original)
> +++ lldb/trunk/include/lldb/API/SBDefines.h Thu Feb 12 17:09:17 2015
> @@ -90,6 +90,7 @@ class LLDB_API SBTypeSynthetic;
>  class LLDB_API SBTypeList;
>  class LLDB_API SBValue;
>  class LLDB_API SBValueList;
> +class LLDB_API SBVariablesOptions;
>  class LLDB_API SBWatchpoint;
>  class LLDB_API SBUnixSignals;
> 
> 
> Modified: lldb/trunk/include/lldb/API/SBFrame.h
> URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/API/SBFrame.h?rev=228975&r1=228974&r2=228975&view=diff <http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/API/SBFrame.h?rev=228975&r1=228974&r2=228975&view=diff>
> ==============================================================================
> --- lldb/trunk/include/lldb/API/SBFrame.h (original)
> +++ lldb/trunk/include/lldb/API/SBFrame.h Thu Feb 12 17:09:17 2015
> @@ -157,12 +157,7 @@ public:
>                    lldb::DynamicValueType  use_dynamic);
> 
>      lldb::SBValueList
> -    GetVariables (bool arguments,
> -                  bool locals,
> -                  bool statics,
> -                  bool in_scope_only,
> -                  bool include_runtime_support_values,
> -                  lldb::DynamicValueType  use_dynamic);
> +    GetVariables (const lldb::SBVariablesOptions& options);
> 
>      lldb::SBValueList
>      GetRegisters ();
> 
> Added: lldb/trunk/include/lldb/API/SBVariablesOptions.h
> URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/API/SBVariablesOptions.h?rev=228975&view=auto <http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/API/SBVariablesOptions.h?rev=228975&view=auto>
> ==============================================================================
> --- lldb/trunk/include/lldb/API/SBVariablesOptions.h (added)
> +++ lldb/trunk/include/lldb/API/SBVariablesOptions.h Thu Feb 12 17:09:17 2015
> @@ -0,0 +1,98 @@
> +//===-- SBVariablesOptions.h ------------------------------------------*- C++ -*-===//
> +//
> +//                     The LLVM Compiler Infrastructure
> +//
> +// This file is distributed under the University of Illinois Open Source
> +// License. See LICENSE.TXT for details.
> +//
> +//===----------------------------------------------------------------------===//
> +
> +#ifndef LLDB_SBVariablesOptions_h_
> +#define LLDB_SBVariablesOptions_h_
> +
> +#include "lldb/API/SBDefines.h"
> +
> +class VariablesOptionsImpl;
> +
> +namespace lldb {
> +
> +class SBVariablesOptions
> +{
> +public:
> +    SBVariablesOptions ();
> +
> +    SBVariablesOptions (const SBVariablesOptions& options);
> +
> +    SBVariablesOptions&
> +    operator = (const SBVariablesOptions& options);
> +
> +    ~SBVariablesOptions ();
> +
> +    bool
> +    IsValid () const;
> +
> +    bool
> +    GetIncludeArguments () const;
> +
> +    void
> +    SetIncludeArguments (bool);
> +
> +    bool
> +    GetIncludeLocals () const;
> +
> +    void
> +    SetIncludeLocals (bool);
> +
> +    bool
> +    GetIncludeStatics () const;
> +
> +    void
> +    SetIncludeStatics (bool);
> +
> +    bool
> +    GetInScopeOnly () const;
> +
> +    void
> +    SetInScopeOnly (bool);
> +
> +    bool
> +    GetIncludeRuntimeSupportValues () const;
> +
> +    void
> +    SetIncludeRuntimeSupportValues (bool);
> +
> +    lldb::DynamicValueType
> +    GetUseDynamic () const;
> +
> +    void
> +    SetUseDynamic (lldb::DynamicValueType);
> +
> +protected:
> +    VariablesOptionsImpl *
> +    operator->();
> +
> +    const VariablesOptionsImpl *
> +    operator->() const;
> +
> +    VariablesOptionsImpl *
> +    get ();
> +
> +    VariablesOptionsImpl &
> +    ref();
> +
> +    const VariablesOptionsImpl &
> +    ref() const;
> +
> +    SBVariablesOptions (VariablesOptionsImpl *lldb_object_ptr);
> +
> +    void
> +    SetOptions (VariablesOptionsImpl *lldb_object_ptr);
> +
> +private:
> +
> +    std::unique_ptr<VariablesOptionsImpl> m_opaque_ap;
> +};
> +
> +} // namespace lldb
> +
> +#endif  // LLDB_SBValue_h_
> 
> Modified: lldb/trunk/lldb.xcodeproj/project.pbxproj
> URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/lldb.xcodeproj/project.pbxproj?rev=228975&r1=228974&r2=228975&view=diff <http://llvm.org/viewvc/llvm-project/lldb/trunk/lldb.xcodeproj/project.pbxproj?rev=228975&r1=228974&r2=228975&view=diff>
> ==============================================================================
> --- lldb/trunk/lldb.xcodeproj/project.pbxproj (original)
> +++ lldb/trunk/lldb.xcodeproj/project.pbxproj Thu Feb 12 17:09:17 2015
> @@ -765,6 +765,8 @@
>                 941BCC8014E48C4000BB969C /* SBTypeFormat.h in Headers */ = {isa = PBXBuildFile; fileRef = 9461568714E355F2003A195C /* SBTypeFormat.h */; settings = {ATTRIBUTES = (Public, ); }; };
>                 941BCC8114E48C4000BB969C /* SBTypeSummary.h in Headers */ = {isa = PBXBuildFile; fileRef = 9461568814E355F2003A195C /* SBTypeSummary.h */; settings = {ATTRIBUTES = (Public, ); }; };
>                 941BCC8214E48C4000BB969C /* SBTypeSynthetic.h in Headers */ = {isa = PBXBuildFile; fileRef = 9461568914E355F2003A195C /* SBTypeSynthetic.h */; settings = {ATTRIBUTES = (Public, ); }; };
> +               94235B9E1A8D667400EB2EED /* SBVariablesOptions.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 94235B9B1A8D5FF300EB2EED /* SBVariablesOptions.cpp */; };
> +               94235B9F1A8D66D600EB2EED /* SBVariablesOptions.h in Headers */ = {isa = PBXBuildFile; fileRef = 94235B9A1A8D5FD800EB2EED /* SBVariablesOptions.h */; settings = {ATTRIBUTES = (Public, ); }; };
>                 942829561A89614C00521B30 /* JSON.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 942829551A89614C00521B30 /* JSON.cpp */; };
>                 942829CC1A89839300521B30 /* liblldb-core.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 2689FFCA13353D7A00698AC0 /* liblldb-core.a */; };
>                 942AFF0519F84ABF007B43B4 /* LibCxxVector.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 942AFF0419F84ABF007B43B4 /* LibCxxVector.cpp */; };
> @@ -2400,6 +2402,9 @@
>                 940B04DE1A8986070045D5F7 /* libncurses.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libncurses.dylib; path = Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/lib/libncurses.dylib; sourceTree = DEVELOPER_DIR; };
>                 940B04E01A89860E0045D5F7 /* libedit.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libedit.dylib; path = Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/lib/libedit.dylib; sourceTree = DEVELOPER_DIR; };
>                 94145430175D7FDE00284436 /* lldb-versioning.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "lldb-versioning.h"; path = "include/lldb/lldb-versioning.h"; sourceTree = "<group>"; };
> +               94235B9A1A8D5FD800EB2EED /* SBVariablesOptions.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = SBVariablesOptions.h; path = include/lldb/API/SBVariablesOptions.h; sourceTree = "<group>"; };
> +               94235B9B1A8D5FF300EB2EED /* SBVariablesOptions.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SBVariablesOptions.cpp; path = source/API/SBVariablesOptions.cpp; sourceTree = "<group>"; };
> +               94235B9D1A8D601A00EB2EED /* SBVariablesOptions.i */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c.preprocessed; path = SBVariablesOptions.i; sourceTree = "<group>"; };
>                 942829541A89614000521B30 /* JSON.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = JSON.h; path = include/lldb/Utility/JSON.h; sourceTree = "<group>"; };
>                 942829551A89614C00521B30 /* JSON.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = JSON.cpp; path = source/Utility/JSON.cpp; sourceTree = "<group>"; };
>                 942829C01A89835300521B30 /* argdumper */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = argdumper; sourceTree = BUILT_PRODUCTS_DIR; };
> @@ -3176,6 +3181,7 @@
>                                 9461569514E3567F003A195C /* SBTypeSynthetic.i */,
>                                 2611FF12142D83060017FEA3 /* SBValue.i */,
>                                 2611FF13142D83060017FEA3 /* SBValueList.i */,
> +                               94235B9D1A8D601A00EB2EED /* SBVariablesOptions.i */,
>                                 B2A5872514313B480092BFBA /* SBWatchpoint.i */,
>                         );
>                         name = interface;
> @@ -3194,8 +3200,6 @@
>                 262D3190111B4341004E6F88 /* API */ = {
>                         isa = PBXGroup;
>                         children = (
> -                               254FBB961A81B03100BD6378 /* SBLaunchInfo.h */,
> -                               254FBB941A81AA7F00BD6378 /* SBLaunchInfo.cpp */,
>                                 2611FEEE142D83060017FEA3 /* interface */,
>                                 26BC7C2510F1B3BC00F91463 /* lldb-defines.h */,
>                                 26BC7C2610F1B3BC00F91463 /* lldb-enumerations.h */,
> @@ -3251,6 +3255,8 @@
>                                 9AC703AE117675410086C050 /* SBInstruction.cpp */,
>                                 9AC7038F117675270086C050 /* SBInstructionList.h */,
>                                 9AC703B0117675490086C050 /* SBInstructionList.cpp */,
> +                               254FBB961A81B03100BD6378 /* SBLaunchInfo.h */,
> +                               254FBB941A81AA7F00BD6378 /* SBLaunchInfo.cpp */,
>                                 26DE205811618FE700A093E2 /* SBLineEntry.h */,
>                                 26DE20621161904200A093E2 /* SBLineEntry.cpp */,
>                                 9A9831021125FC5800A56CB0 /* SBListener.h */,
> @@ -3311,6 +3317,8 @@
>                                 9A19A6AD1163BB9800E0D453 /* SBValue.cpp */,
>                                 9A357582116CFDEE00E8ED2F /* SBValueList.h */,
>                                 9A35758D116CFE0F00E8ED2F /* SBValueList.cpp */,
> +                               94235B9A1A8D5FD800EB2EED /* SBVariablesOptions.h */,
> +                               94235B9B1A8D5FF300EB2EED /* SBVariablesOptions.cpp */,
>                                 B2A58721143119810092BFBA /* SBWatchpoint.h */,
>                                 B2A58723143119D50092BFBA /* SBWatchpoint.cpp */,
>                         );
> @@ -5214,6 +5222,7 @@
>                                 26D265A2136B40EE002EEE45 /* SharingPtr.h in Headers */,
>                                 26D265BC136B4269002EEE45 /* lldb-public.h in Headers */,
>                                 4CE4F673162C971A00F75CB3 /* SBExpressionOptions.h in Headers */,
> +                               94235B9F1A8D66D600EB2EED /* SBVariablesOptions.h in Headers */,
>                                 23EFE389193D1ABC00E54E54 /* SBTypeEnumMember.h in Headers */,
>                         );
>                         runOnlyForDeploymentPostprocessing = 0;
> @@ -5813,6 +5822,7 @@
>                                 9AC703AF117675410086C050 /* SBInstruction.cpp in Sources */,
>                                 9AC703B1117675490086C050 /* SBInstructionList.cpp in Sources */,
>                                 268F9D55123AA16600B91E9B /* SBSymbolContextList.cpp in Sources */,
> +                               94235B9E1A8D667400EB2EED /* SBVariablesOptions.cpp in Sources */,
>                                 26C72C961243229A0068DC16 /* SBStream.cpp in Sources */,
>                                 9443B122140C18C40013457C /* SBData.cpp in Sources */,
>                                 4CF52AF8142829390051E832 /* SBFileSpecList.cpp in Sources */,
> 
> Modified: lldb/trunk/scripts/Python/build-swig-Python.sh
> URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/scripts/Python/build-swig-Python.sh?rev=228975&r1=228974&r2=228975&view=diff <http://llvm.org/viewvc/llvm-project/lldb/trunk/scripts/Python/build-swig-Python.sh?rev=228975&r1=228974&r2=228975&view=diff>
> ==============================================================================
> --- lldb/trunk/scripts/Python/build-swig-Python.sh (original)
> +++ lldb/trunk/scripts/Python/build-swig-Python.sh Thu Feb 12 17:09:17 2015
> @@ -126,6 +126,7 @@ HEADER_FILES="${SRC_ROOT}/include/lldb/l
>  " ${SRC_ROOT}/include/lldb/API/SBTypeSynthetic.h"\
>  " ${SRC_ROOT}/include/lldb/API/SBValue.h"\
>  " ${SRC_ROOT}/include/lldb/API/SBValueList.h"\
> +" ${SRC_ROOT}/include/lldb/API/SBVariablesOptions.h"\
>  " ${SRC_ROOT}/include/lldb/API/SBWatchpoint.h"\
>  " ${SRC_ROOT}/include/lldb/API/SBUnixSignals.h"
> 
> @@ -178,6 +179,7 @@ INTERFACE_FILES="${SRC_ROOT}/scripts/Pyt
>  " ${SRC_ROOT}/scripts/Python/interface/SBTypeSynthetic.i"\
>  " ${SRC_ROOT}/scripts/Python/interface/SBValue.i"\
>  " ${SRC_ROOT}/scripts/Python/interface/SBValueList.i"\
> +" ${SRC_ROOT}/scripts/Python/interface/SBVariablesOptions.i"\
>  " ${SRC_ROOT}/scripts/Python/interface/SBWatchpoint.i"\
>  " ${SRC_ROOT}/scripts/Python/interface/SBUnixSignals.i"
> 
> 
> Modified: lldb/trunk/scripts/Python/interface/SBFrame.i
> URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/scripts/Python/interface/SBFrame.i?rev=228975&r1=228974&r2=228975&view=diff <http://llvm.org/viewvc/llvm-project/lldb/trunk/scripts/Python/interface/SBFrame.i?rev=228975&r1=228974&r2=228975&view=diff>
> ==============================================================================
> --- lldb/trunk/scripts/Python/interface/SBFrame.i (original)
> +++ lldb/trunk/scripts/Python/interface/SBFrame.i Thu Feb 12 17:09:17 2015
> @@ -199,12 +199,7 @@ public:
>                    lldb::DynamicValueType  use_dynamic);
> 
>      lldb::SBValueList
> -    GetVariables (bool arguments,
> -                  bool locals,
> -                  bool statics,
> -                  bool in_scope_only,
> -                  bool include_runtime_support_values,
> -                  lldb::DynamicValueType  use_dynamic);
> +    GetVariables (const lldb::SBVariablesOptions& options);
> 
>      lldb::SBValueList
>      GetRegisters ();
> 
> Added: lldb/trunk/scripts/Python/interface/SBVariablesOptions.i
> URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/scripts/Python/interface/SBVariablesOptions.i?rev=228975&view=auto <http://llvm.org/viewvc/llvm-project/lldb/trunk/scripts/Python/interface/SBVariablesOptions.i?rev=228975&view=auto>
> ==============================================================================
> --- lldb/trunk/scripts/Python/interface/SBVariablesOptions.i (added)
> +++ lldb/trunk/scripts/Python/interface/SBVariablesOptions.i Thu Feb 12 17:09:17 2015
> @@ -0,0 +1,61 @@
> +//===-- SWIG Interface for SBVariablesOptions ----------------------*- C++ -*-===//
> +//
> +//                     The LLVM Compiler Infrastructure
> +//
> +// This file is distributed under the University of Illinois Open Source
> +// License. See LICENSE.TXT for details.
> +//
> +//===----------------------------------------------------------------------===//
> +
> +namespace lldb {
> +
> +class SBVariablesOptions
> +{
> +public:
> +    SBVariablesOptions ();
> +
> +    SBVariablesOptions (const SBVariablesOptions& options);
> +
> +    ~SBVariablesOptions ();
> +
> +    bool
> +    IsValid () const;
> +
> +    bool
> +    GetIncludeArguments ()  const;
> +
> +    void
> +    SetIncludeArguments (bool);
> +
> +    bool
> +    GetIncludeLocals ()  const;
> +
> +    void
> +    SetIncludeLocals (bool);
> +
> +    bool
> +    GetIncludeStatics ()  const;
> +
> +    void
> +    SetIncludeStatics (bool);
> +
> +    bool
> +    GetInScopeOnly ()  const;
> +
> +    void
> +    SetInScopeOnly (bool);
> +
> +    bool
> +    GetIncludeRuntimeSupportValues () const;
> +
> +    void
> +    SetIncludeRuntimeSupportValues (bool);
> +
> +    lldb::DynamicValueType
> +    GetUseDynamic () const;
> +
> +    void
> +    SetUseDynamic (lldb::DynamicValueType);
> +};
> +
> +} // namespace lldb
> 
> Modified: lldb/trunk/scripts/lldb.swig
> URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/scripts/lldb.swig?rev=228975&r1=228974&r2=228975&view=diff <http://llvm.org/viewvc/llvm-project/lldb/trunk/scripts/lldb.swig?rev=228975&r1=228974&r2=228975&view=diff>
> ==============================================================================
> --- lldb/trunk/scripts/lldb.swig (original)
> +++ lldb/trunk/scripts/lldb.swig Thu Feb 12 17:09:17 2015
> @@ -105,6 +105,7 @@ import os
>  #include "lldb/API/SBTypeSynthetic.h"
>  #include "lldb/API/SBValue.h"
>  #include "lldb/API/SBValueList.h"
> +#include "lldb/API/SBVariablesOptions.h"
>  #include "lldb/API/SBWatchpoint.h"
>  #include "lldb/API/SBUnixSignals.h"
> 
> @@ -180,6 +181,7 @@ import os
>  %include "./Python/interface/SBTypeSynthetic.i"
>  %include "./Python/interface/SBValue.i"
>  %include "./Python/interface/SBValueList.i"
> +%include "./Python/interface/SBVariablesOptions.i"
>  %include "./Python/interface/SBWatchpoint.i"
>  %include "./Python/interface/SBUnixSignals.i"
> 
> 
> Modified: lldb/trunk/source/API/CMakeLists.txt
> URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/API/CMakeLists.txt?rev=228975&r1=228974&r2=228975&view=diff <http://llvm.org/viewvc/llvm-project/lldb/trunk/source/API/CMakeLists.txt?rev=228975&r1=228974&r2=228975&view=diff>
> ==============================================================================
> --- lldb/trunk/source/API/CMakeLists.txt (original)
> +++ lldb/trunk/source/API/CMakeLists.txt Thu Feb 12 17:09:17 2015
> @@ -57,6 +57,7 @@ add_lldb_library(lldbAPI
>    SBTypeSynthetic.cpp
>    SBValue.cpp
>    SBValueList.cpp
> +  SBVariablesOptions.cpp
>    SBWatchpoint.cpp
>    SBUnixSignals.cpp
>    )
> 
> Modified: lldb/trunk/source/API/SBFrame.cpp
> URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/API/SBFrame.cpp?rev=228975&r1=228974&r2=228975&view=diff <http://llvm.org/viewvc/llvm-project/lldb/trunk/source/API/SBFrame.cpp?rev=228975&r1=228974&r2=228975&view=diff>
> ==============================================================================
> --- lldb/trunk/source/API/SBFrame.cpp (original)
> +++ lldb/trunk/source/API/SBFrame.cpp Thu Feb 12 17:09:17 2015
> @@ -44,6 +44,7 @@
>  #include "lldb/API/SBStream.h"
>  #include "lldb/API/SBSymbolContext.h"
>  #include "lldb/API/SBThread.h"
> +#include "lldb/API/SBVariablesOptions.h"
> 
>  using namespace lldb;
>  using namespace lldb_private;
> @@ -1075,7 +1076,17 @@ SBFrame::GetVariables (bool arguments,
>      if (frame && target)
>      {
>          lldb::DynamicValueType use_dynamic = frame->CalculateTarget()->GetPreferDynamicValue();
> -        value_list = GetVariables (arguments, locals, statics, in_scope_only, use_dynamic);
> +        const bool include_runtime_support_values = target ? target->GetDisplayRuntimeSupportValues() : false;
> +
> +        SBVariablesOptions options;
> +        options.SetIncludeArguments(arguments);
> +        options.SetIncludeLocals(locals);
> +        options.SetIncludeStatics(statics);
> +        options.SetInScopeOnly(in_scope_only);
> +        options.SetIncludeRuntimeSupportValues(include_runtime_support_values);
> +        options.SetUseDynamic(use_dynamic);
> +
> +        value_list = GetVariables (options);
>      }
>      return value_list;
>  }
> @@ -1089,22 +1100,19 @@ SBFrame::GetVariables (bool arguments,
>  {
>      ExecutionContext exe_ctx(m_opaque_sp.get());
>      Target *target = exe_ctx.GetTargetPtr();
> -    bool include_runtime_support_values = target ? target->GetDisplayRuntimeSupportValues() : false;
> -    return GetVariables(arguments,
> -                        locals,
> -                        statics,
> -                        in_scope_only,
> -                        include_runtime_support_values,
> -                        use_dynamic);
> +    const bool include_runtime_support_values = target ? target->GetDisplayRuntimeSupportValues() : false;
> +    SBVariablesOptions options;
> +    options.SetIncludeArguments(arguments);
> +    options.SetIncludeLocals(locals);
> +    options.SetIncludeStatics(statics);
> +    options.SetInScopeOnly(in_scope_only);
> +    options.SetIncludeRuntimeSupportValues(include_runtime_support_values);
> +    options.SetUseDynamic(use_dynamic);
> +    return GetVariables(options);
>  }
> 
>  SBValueList
> -SBFrame::GetVariables (bool arguments,
> -                       bool locals,
> -                       bool statics,
> -                       bool in_scope_only,
> -                       bool include_runtime_support_values,
> -                       lldb::DynamicValueType  use_dynamic)
> +SBFrame::GetVariables (const lldb::SBVariablesOptions& options)
>  {
>      Log *log(GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
> 
> @@ -1115,10 +1123,19 @@ SBFrame::GetVariables (bool arguments,
>      StackFrame *frame = NULL;
>      Target *target = exe_ctx.GetTargetPtr();
> 
> +    const bool statics = options.GetIncludeStatics();
> +    const bool arguments = options.GetIncludeArguments();
> +    const bool locals = options.GetIncludeLocals();
> +    const bool in_scope_only = options.GetInScopeOnly();
> +    const bool include_runtime_support_values = options.GetIncludeRuntimeSupportValues();
> +    const lldb::DynamicValueType use_dynamic = options.GetUseDynamic();
> +
>      if (log)
> -        log->Printf ("SBFrame::GetVariables (arguments=%i, locals=%i, statics=%i, in_scope_only=%i)",
> -                     arguments, locals, statics, in_scope_only);
> -
> +        log->Printf ("SBFrame::GetVariables (arguments=%i, locals=%i, statics=%i, in_scope_only=%i runtime=%i dynamic=%i)",
> +                     arguments, locals,
> +                     statics, in_scope_only,
> +                     include_runtime_support_values, use_dynamic);
> +
>      Process *process = exe_ctx.GetProcessPtr();
>      if (target && process)
>      {
> 
> Added: lldb/trunk/source/API/SBVariablesOptions.cpp
> URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/API/SBVariablesOptions.cpp?rev=228975&view=auto <http://llvm.org/viewvc/llvm-project/lldb/trunk/source/API/SBVariablesOptions.cpp?rev=228975&view=auto>
> ==============================================================================
> --- lldb/trunk/source/API/SBVariablesOptions.cpp (added)
> +++ lldb/trunk/source/API/SBVariablesOptions.cpp Thu Feb 12 17:09:17 2015
> @@ -0,0 +1,254 @@
> +//===-- SBVariablesOptions.cpp --------------------------------------*- C++ -*-===//
> +//
> +//                     The LLVM Compiler Infrastructure
> +//
> +// This file is distributed under the University of Illinois Open Source
> +// License. See LICENSE.TXT for details.
> +//
> +//===----------------------------------------------------------------------===//
> +
> +
> +#include "lldb/API/SBVariablesOptions.h"
> +
> +using namespace lldb;
> +using namespace lldb_private;
> +
> +class VariablesOptionsImpl
> +{
> +public:
> +    VariablesOptionsImpl () :
> +    m_include_arguments(false),
> +    m_include_locals(false),
> +    m_include_statics(false),
> +    m_in_scope_only(false),
> +    m_include_runtime_support_values(false),
> +    m_use_dynamic(lldb::eNoDynamicValues)
> +    {}
> +
> +    VariablesOptionsImpl (const VariablesOptionsImpl&) = default;
> +
> +    ~VariablesOptionsImpl () = default;
> +
> +    VariablesOptionsImpl&
> +    operator = (const VariablesOptionsImpl&) = default;
> +
> +    bool
> +    GetIncludeArguments () const
> +    {
> +        return m_include_arguments;
> +    }
> +
> +    void
> +    SetIncludeArguments (bool b)
> +    {
> +        m_include_arguments = b;
> +    }
> +
> +    bool
> +    GetIncludeLocals () const
> +    {
> +        return m_include_locals;
> +    }
> +
> +    void
> +    SetIncludeLocals (bool b)
> +    {
> +        m_include_locals = b;
> +    }
> +
> +    bool
> +    GetIncludeStatics () const
> +    {
> +        return m_include_statics;
> +    }
> +
> +    void
> +    SetIncludeStatics (bool b)
> +    {
> +        m_include_statics = b;
> +    }
> +
> +    bool
> +    GetInScopeOnly () const
> +    {
> +        return m_in_scope_only;
> +    }
> +
> +    void
> +    SetInScopeOnly (bool b)
> +    {
> +        m_in_scope_only = b;
> +    }
> +
> +    bool
> +    GetIncludeRuntimeSupportValues () const
> +    {
> +        return m_include_runtime_support_values;
> +    }
> +
> +    void
> +    SetIncludeRuntimeSupportValues (bool b)
> +    {
> +        m_include_runtime_support_values = b;
> +    }
> +
> +    lldb::DynamicValueType
> +    GetUseDynamic () const
> +    {
> +        return m_use_dynamic;
> +    }
> +
> +    void
> +    SetUseDynamic (lldb::DynamicValueType d)
> +    {
> +        m_use_dynamic = d;
> +    }
> +
> +
> +private:
> +    bool m_include_arguments : 1;
> +    bool m_include_locals : 1;
> +    bool m_include_statics : 1;
> +    bool m_in_scope_only : 1;
> +    bool m_include_runtime_support_values : 1;
> +    lldb::DynamicValueType m_use_dynamic;
> +};
> +
> +SBVariablesOptions::SBVariablesOptions () :
> +m_opaque_ap(new VariablesOptionsImpl())
> +{
> +}
> +
> +SBVariablesOptions::SBVariablesOptions (const SBVariablesOptions& options) :
> +m_opaque_ap(new VariablesOptionsImpl(options.ref()))
> +{
> +}
> +
> +SBVariablesOptions&
> +SBVariablesOptions::operator = (const SBVariablesOptions& options)
> +{
> +    m_opaque_ap.reset(new VariablesOptionsImpl(options.ref()));
> +    return *this;
> +}
> +
> +SBVariablesOptions::~SBVariablesOptions () = default;
> +
> +bool
> +SBVariablesOptions::IsValid () const
> +{
> +    return m_opaque_ap.get() != nullptr;
> +}
> +
> +bool
> +SBVariablesOptions::GetIncludeArguments () const
> +{
> +    return m_opaque_ap->GetIncludeArguments();
> +}
> +
> +void
> +SBVariablesOptions::SetIncludeArguments (bool arguments)
> +{
> +    m_opaque_ap->SetIncludeArguments(arguments);
> +}
> +
> +bool
> +SBVariablesOptions::GetIncludeLocals () const
> +{
> +    return m_opaque_ap->GetIncludeLocals();
> +}
> +
> +void
> +SBVariablesOptions::SetIncludeLocals (bool locals)
> +{
> +    m_opaque_ap->SetIncludeLocals(locals);
> +}
> +
> +bool
> +SBVariablesOptions::GetIncludeStatics () const
> +{
> +    return m_opaque_ap->GetIncludeStatics();
> +}
> +
> +void
> +SBVariablesOptions::SetIncludeStatics (bool statics)
> +{
> +    m_opaque_ap->SetIncludeStatics(statics);
> +}
> +
> +bool
> +SBVariablesOptions::GetInScopeOnly () const
> +{
> +    return m_opaque_ap->GetInScopeOnly();
> +}
> +
> +void
> +SBVariablesOptions::SetInScopeOnly (bool in_scope_only)
> +{
> +    m_opaque_ap->SetInScopeOnly(in_scope_only);
> +}
> +
> +bool
> +SBVariablesOptions::GetIncludeRuntimeSupportValues () const
> +{
> +    return m_opaque_ap->GetIncludeRuntimeSupportValues();
> +}
> +
> +void
> +SBVariablesOptions::SetIncludeRuntimeSupportValues (bool runtime_support_values)
> +{
> +    m_opaque_ap->SetIncludeRuntimeSupportValues(runtime_support_values);
> +}
> +
> +lldb::DynamicValueType
> +SBVariablesOptions::GetUseDynamic () const
> +{
> +    return m_opaque_ap->GetUseDynamic();
> +}
> +
> +void
> +SBVariablesOptions::SetUseDynamic (lldb::DynamicValueType dynamic)
> +{
> +    m_opaque_ap->SetUseDynamic(dynamic);
> +}
> +
> +VariablesOptionsImpl *
> +SBVariablesOptions::operator->()
> +{
> +    return m_opaque_ap.operator->();
> +}
> +
> +const VariablesOptionsImpl *
> +SBVariablesOptions::operator->() const
> +{
> +    return m_opaque_ap.operator->();
> +}
> +
> +VariablesOptionsImpl *
> +SBVariablesOptions::get ()
> +{
> +    return m_opaque_ap.get();
> +}
> +
> +VariablesOptionsImpl &
> +SBVariablesOptions::ref()
> +{
> +    return *m_opaque_ap;
> +}
> +
> +const VariablesOptionsImpl &
> +SBVariablesOptions::ref() const
> +{
> +    return *m_opaque_ap;
> +}
> +
> +SBVariablesOptions::SBVariablesOptions (VariablesOptionsImpl *lldb_object_ptr) :
> +m_opaque_ap(std::move(lldb_object_ptr))
> +{
> +}
> +
> +void
> +SBVariablesOptions::SetOptions (VariablesOptionsImpl *lldb_object_ptr)
> +{
> +    m_opaque_ap.reset(std::move(lldb_object_ptr));
> +}
> +
> 
> Removed: lldb/trunk/test/functionalities/data-formatter/typedef_array/Makefile
> URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/functionalities/data-formatter/typedef_array/Makefile?rev=228974&view=auto <http://llvm.org/viewvc/llvm-project/lldb/trunk/test/functionalities/data-formatter/typedef_array/Makefile?rev=228974&view=auto>
> ==============================================================================
> --- lldb/trunk/test/functionalities/data-formatter/typedef_array/Makefile (original)
> +++ lldb/trunk/test/functionalities/data-formatter/typedef_array/Makefile (removed)
> @@ -1,4 +0,0 @@
> -LEVEL = ../../../make
> -CXX_SOURCES := main.cpp
> -CXXFLAGS += -std=c++11
> -include $(LEVEL)/Makefile.rules
> 
> 
> _______________________________________________
> lldb-commits mailing list
> lldb-commits at cs.uiuc.edu <mailto:lldb-commits at cs.uiuc.edu>
> http://lists.cs.uiuc.edu/mailman/listinfo/lldb-commits <http://lists.cs.uiuc.edu/mailman/listinfo/lldb-commits>

Thanks,
- Enrico
📩 egranata@.com ☎️ 27683




-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20150217/c627a127/attachment.html>


More information about the lldb-commits mailing list