~ubuntu-branches/ubuntu/trusty/llvm-toolchain-snapshot/trusty-201310232150

« back to all changes in this revision

Viewing changes to lldb/include/lldb/API/SBValue.h

  • Committer: Package Import Robot
  • Author(s): Sylvestre Ledru
  • Date: 2013-05-27 15:01:57 UTC
  • mfrom: (0.10.1) (0.9.1) (0.8.1) (0.7.1) (0.6.1) (0.5.2)
  • Revision ID: package-import@ubuntu.com-20130527150157-tdkrsjpuvht7v0qx
Tags: 1:3.4~svn182733-1~exp1
* New snapshot release (3.4 release)
* Add a symlink of libLLVM-3.4.so.1 to usr/lib/llvm-3.4/lib/libLLVM-3.4.so
    to fix make the llvm-config-3.4 --libdir work (Closes: #708677)
  * Various packages rename to allow co installations:
    * libclang1 => libclang1-3.4
    * libclang1-dbg => libclang1-3.4-dbg
    * libclang-dev => libclang-3.4-dev
    * libclang-common-dev => libclang-common-3.4-dev

Show diffs side-by-side

added added

removed removed

Lines of Context:
14
14
#include "lldb/API/SBDefines.h"
15
15
#include "lldb/API/SBType.h"
16
16
 
17
 
namespace {
18
 
    class ValueImpl;
19
 
}
 
17
class ValueImpl;
 
18
class ValueLocker;
20
19
 
21
20
namespace lldb {
22
21
 
23
22
class SBValue
24
23
{
 
24
friend class ValueLocker;
 
25
 
25
26
public:
26
27
    SBValue ();
27
28
 
416
417
    lldb::SBWatchpoint
417
418
    WatchPointee (bool resolve_location, bool read, bool write, SBError &error);
418
419
 
 
420
    //------------------------------------------------------------------
 
421
    /// Same as the protected version of GetSP that takes a locker, except that we make the
 
422
    /// locker locally in the function.  Since the Target API mutex is recursive, and the
 
423
    /// StopLocker is a read lock, you can call this function even if you are already
 
424
    /// holding the two above-mentioned locks.
 
425
    ///
 
426
    /// @return
 
427
    ///     A ValueObjectSP of the best kind (static, dynamic or synthetic) we
 
428
    ///     can cons up, in accordance with the SBValue's settings.
 
429
    //------------------------------------------------------------------
419
430
    lldb::ValueObjectSP
420
431
    GetSP () const;
421
432
 
426
437
    friend class SBThread;
427
438
    friend class SBValueList;
428
439
 
 
440
    //------------------------------------------------------------------
 
441
    /// Get the appropriate ValueObjectSP from this SBValue, consulting the
 
442
    /// use_dynamic and use_synthetic options passed in to SetSP when the
 
443
    /// SBValue's contents were set.  Since this often requires examining memory,
 
444
    /// and maybe even running code, it needs to acquire the Target API and Process StopLock.
 
445
    /// Those are held in an opaque class ValueLocker which is currently local to SBValue.cpp.
 
446
    /// So you don't have to get these yourself just default construct a ValueLocker, and pass it into this.
 
447
    /// If we need to make a ValueLocker and use it in some other .cpp file, we'll have to move it to
 
448
    /// ValueObject.h/cpp or somewhere else convenient.  We haven't needed to so far.
 
449
    ///
 
450
    /// @param[in] value_locker
 
451
    ///     An object that will hold the Target API, and Process RunLocks, and
 
452
    ///     auto-destroy them when it goes out of scope.  Currently this is only useful in
 
453
    ///     SBValue.cpp.
 
454
    ///
 
455
    /// @return
 
456
    ///     A ValueObjectSP of the best kind (static, dynamic or synthetic) we
 
457
    ///     can cons up, in accordance with the SBValue's settings.
 
458
    //------------------------------------------------------------------
 
459
    lldb::ValueObjectSP
 
460
    GetSP (ValueLocker &value_locker) const;
 
461
    
429
462
    // these calls do the right thing WRT adjusting their settings according to the target's preferences
430
463
    void
431
464
    SetSP (const lldb::ValueObjectSP &sp);
439
472
    void
440
473
    SetSP (const lldb::ValueObjectSP &sp, lldb::DynamicValueType use_dynamic, bool use_synthetic);
441
474
    
 
475
    void
 
476
    SetSP (const lldb::ValueObjectSP &sp, lldb::DynamicValueType use_dynamic, bool use_synthetic, const char *name);
 
477
    
442
478
private:
443
479
    typedef std::shared_ptr<ValueImpl> ValueImplSP;
444
480
    ValueImplSP m_opaque_sp;