[Lldb-commits] [lldb] r141876 - in /lldb/trunk: include/lldb/API/ lldb.xcodeproj/ lldb.xcodeproj/xcshareddata/xcschemes/ scripts/ scripts/Python/ scripts/Python/interface/ source/API/
Greg Clayton
gclayton at apple.com
Thu Oct 13 11:08:26 PDT 2011
Author: gclayton
Date: Thu Oct 13 13:08:26 2011
New Revision: 141876
URL: http://llvm.org/viewvc/llvm-project?rev=141876&view=rev
Log:
Cleaned up the SBWatchpoint public API.
Added:
lldb/trunk/include/lldb/API/SBWatchpoint.h
- copied, changed from r141866, lldb/trunk/include/lldb/API/SBWatchpointLocation.h
lldb/trunk/scripts/Python/interface/SBWatchpoint.i
- copied, changed from r141866, lldb/trunk/scripts/Python/interface/SBWatchpointLocation.i
lldb/trunk/source/API/SBWatchpoint.cpp
- copied, changed from r141866, lldb/trunk/source/API/SBWatchpointLocation.cpp
Removed:
lldb/trunk/include/lldb/API/SBWatchpointLocation.h
lldb/trunk/scripts/Python/interface/SBWatchpointLocation.i
lldb/trunk/source/API/SBWatchpointLocation.cpp
Modified:
lldb/trunk/include/lldb/API/SBDefines.h
lldb/trunk/include/lldb/API/SBError.h
lldb/trunk/include/lldb/API/SBStream.h
lldb/trunk/include/lldb/API/SBTarget.h
lldb/trunk/include/lldb/API/SBValue.h
lldb/trunk/lldb.xcodeproj/project.pbxproj
lldb/trunk/lldb.xcodeproj/xcshareddata/xcschemes/lldb-tool.xcscheme
lldb/trunk/scripts/Python/build-swig-Python.sh
lldb/trunk/scripts/Python/interface/SBTarget.i
lldb/trunk/scripts/Python/interface/SBValue.i
lldb/trunk/scripts/Python/modify-python-lldb.py
lldb/trunk/scripts/Python/python-extensions.swig
lldb/trunk/scripts/lldb.swig
lldb/trunk/source/API/SBTarget.cpp
lldb/trunk/source/API/SBValue.cpp
Modified: lldb/trunk/include/lldb/API/SBDefines.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/API/SBDefines.h?rev=141876&r1=141875&r2=141876&view=diff
==============================================================================
--- lldb/trunk/include/lldb/API/SBDefines.h (original)
+++ lldb/trunk/include/lldb/API/SBDefines.h Thu Oct 13 13:08:26 2011
@@ -63,7 +63,7 @@
class SBTypeList;
class SBValue;
class SBValueList;
-class SBWatchpointLocation;
+class SBWatchpoint;
}
Modified: lldb/trunk/include/lldb/API/SBError.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/API/SBError.h?rev=141876&r1=141875&r2=141876&view=diff
==============================================================================
--- lldb/trunk/include/lldb/API/SBError.h (original)
+++ lldb/trunk/include/lldb/API/SBError.h Thu Oct 13 13:08:26 2011
@@ -81,6 +81,7 @@
friend class SBThread;
friend class SBTarget;
friend class SBValue;
+ friend class SBWatchpoint;
lldb_private::Error *
get();
Modified: lldb/trunk/include/lldb/API/SBStream.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/API/SBStream.h?rev=141876&r1=141875&r2=141876&view=diff
==============================================================================
--- lldb/trunk/include/lldb/API/SBStream.h (original)
+++ lldb/trunk/include/lldb/API/SBStream.h Thu Oct 13 13:08:26 2011
@@ -77,7 +77,7 @@
friend class SBTarget;
friend class SBThread;
friend class SBValue;
- friend class SBWatchpointLocation;
+ friend class SBWatchpoint;
#ifndef SWIG
Modified: lldb/trunk/include/lldb/API/SBTarget.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/API/SBTarget.h?rev=141876&r1=141875&r2=141876&view=diff
==============================================================================
--- lldb/trunk/include/lldb/API/SBTarget.h (original)
+++ lldb/trunk/include/lldb/API/SBTarget.h Thu Oct 13 13:08:26 2011
@@ -16,7 +16,7 @@
#include "lldb/API/SBFileSpec.h"
#include "lldb/API/SBFileSpecList.h"
#include "lldb/API/SBType.h"
-#include "lldb/API/SBWatchpointLocation.h"
+#include "lldb/API/SBWatchpoint.h"
namespace lldb {
@@ -452,28 +452,28 @@
DeleteAllBreakpoints ();
uint32_t
- GetNumWatchpointLocations () const;
+ GetNumWatchpoints () const;
- lldb::SBWatchpointLocation
- GetLastCreatedWatchpointLocation ();
-
- lldb::SBWatchpointLocation
- GetWatchpointLocationAtIndex (uint32_t idx) const;
+ lldb::SBWatchpoint
+ GetWatchpointAtIndex (uint32_t idx) const;
bool
- WatchpointLocationDelete (watch_id_t watch_id);
+ DeleteWatchpoint (lldb::watch_id_t watch_id);
+
+ lldb::SBWatchpoint
+ FindWatchpointByID (lldb::watch_id_t watch_id);
- lldb::SBWatchpointLocation
- FindWatchpointLocationByID (watch_id_t watch_id);
+ lldb::SBWatchpoint
+ WatchAddress (lldb::addr_t addr, size_t size, bool read, bool write);
bool
- EnableAllWatchpointLocations ();
+ EnableAllWatchpoints ();
bool
- DisableAllWatchpointLocations ();
+ DisableAllWatchpoints ();
bool
- DeleteAllWatchpointLocations ();
+ DeleteAllWatchpoints ();
lldb::SBBroadcaster
GetBroadcaster () const;
Modified: lldb/trunk/include/lldb/API/SBValue.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/API/SBValue.h?rev=141876&r1=141875&r2=141876&view=diff
==============================================================================
--- lldb/trunk/include/lldb/API/SBValue.h (original)
+++ lldb/trunk/include/lldb/API/SBValue.h Thu Oct 13 13:08:26 2011
@@ -275,6 +275,58 @@
SBValue (const lldb::ValueObjectSP &value_sp);
+ //------------------------------------------------------------------
+ /// Watch this value if it resides in memory.
+ ///
+ /// Sets a watchpoint on the value.
+ ///
+ /// @param[in] resolve_location
+ /// Resolve the location of this value once and watch its address.
+ /// This value must currently be set to \b true as watching all
+ /// locations of a variable or a variable path is not yet supported,
+ /// though we plan to support it in the future.
+ ///
+ /// @param[in] read
+ /// Stop when this value is accessed.
+ ///
+ /// @param[in] write
+ /// Stop when this value is modified
+ ///
+ /// @return
+ /// An SBWatchpoint object. This object might not be valid upon
+ /// return due to a value not being contained in memory, too
+ /// large, or watchpoint resources are not available or all in
+ /// use.
+ //------------------------------------------------------------------
+ lldb::SBWatchpoint
+ Watch (bool resolve_location, bool read, bool write);
+
+ //------------------------------------------------------------------
+ /// Watch this value that this value points to in memory
+ ///
+ /// Sets a watchpoint on the value.
+ ///
+ /// @param[in] resolve_location
+ /// Resolve the location of this value once and watch its address.
+ /// This value must currently be set to \b true as watching all
+ /// locations of a variable or a variable path is not yet supported,
+ /// though we plan to support it in the future.
+ ///
+ /// @param[in] read
+ /// Stop when this value is accessed.
+ ///
+ /// @param[in] write
+ /// Stop when this value is modified
+ ///
+ /// @return
+ /// An SBWatchpoint object. This object might not be valid upon
+ /// return due to a value not being contained in memory, too
+ /// large, or watchpoint resources are not available or all in
+ /// use.
+ //------------------------------------------------------------------
+ lldb::SBWatchpoint
+ WatchPointee (bool resolve_location, bool read, bool write);
+
#ifndef SWIG
// this must be defined in the .h file because synthetic children as implemented in the core
// currently rely on being able to extract the SharedPointer out of an SBValue. if the implementation
Copied: lldb/trunk/include/lldb/API/SBWatchpoint.h (from r141866, lldb/trunk/include/lldb/API/SBWatchpointLocation.h)
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/API/SBWatchpoint.h?p2=lldb/trunk/include/lldb/API/SBWatchpoint.h&p1=lldb/trunk/include/lldb/API/SBWatchpointLocation.h&r1=141866&r2=141876&rev=141876&view=diff
==============================================================================
--- lldb/trunk/include/lldb/API/SBWatchpointLocation.h (original)
+++ lldb/trunk/include/lldb/API/SBWatchpoint.h Thu Oct 13 13:08:26 2011
@@ -1,4 +1,4 @@
-//===-- SBWatchpointLocation.h ----------------------------------*- C++ -*-===//
+//===-- SBWatchpoint.h ----------------------------------*- C++ -*-===//
//
// The LLVM Compiler Infrastructure
//
@@ -7,43 +7,46 @@
//
//===----------------------------------------------------------------------===//
-#ifndef LLDB_SBWatchpointLocation_h_
-#define LLDB_SBWatchpointLocation_h_
+#ifndef LLDB_SBWatchpoint_h_
+#define LLDB_SBWatchpoint_h_
#include "lldb/API/SBDefines.h"
namespace lldb {
-class SBWatchpointLocation
+class SBWatchpoint
{
public:
- SBWatchpointLocation ();
+ SBWatchpoint ();
- SBWatchpointLocation (const lldb::SBWatchpointLocation &rhs);
+ SBWatchpoint (const lldb::SBWatchpoint &rhs);
- ~SBWatchpointLocation ();
+ ~SBWatchpoint ();
#ifndef SWIG
- const lldb::SBWatchpointLocation &
- operator = (const lldb::SBWatchpointLocation &rhs);
+ const lldb::SBWatchpoint &
+ operator = (const lldb::SBWatchpoint &rhs);
#endif
+ lldb::SBError
+ GetError ();
+
watch_id_t
- GetID () const;
+ GetID ();
bool
IsValid() const;
/// With -1 representing an invalid hardware index.
int32_t
- GetHardwareIndex () const;
+ GetHardwareIndex ();
lldb::addr_t
- GetWatchAddress () const;
+ GetWatchAddress ();
size_t
- GetWatchSize() const;
+ GetWatchSize();
void
SetEnabled(bool enabled);
@@ -52,7 +55,7 @@
IsEnabled ();
uint32_t
- GetHitCount () const;
+ GetHitCount ();
uint32_t
GetIgnoreCount ();
@@ -64,7 +67,7 @@
GetDescription (lldb::SBStream &description, DescriptionLevel level);
#ifndef SWIG
- SBWatchpointLocation (const lldb::WatchpointLocationSP &watch_loc_sp);
+ SBWatchpoint (const lldb::WatchpointLocationSP &watch_loc_sp);
#endif
private:
@@ -73,17 +76,14 @@
#ifndef SWIG
lldb_private::WatchpointLocation *
- operator->() const;
+ operator->();
lldb_private::WatchpointLocation *
- get() const;
+ get();
lldb::WatchpointLocationSP &
operator *();
- const lldb::WatchpointLocationSP &
- operator *() const;
-
#endif
lldb::WatchpointLocationSP m_opaque_sp;
@@ -92,4 +92,4 @@
} // namespace lldb
-#endif // LLDB_SBWatchpointLocation_h_
+#endif // LLDB_SBWatchpoint_h_
Removed: lldb/trunk/include/lldb/API/SBWatchpointLocation.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/API/SBWatchpointLocation.h?rev=141875&view=auto
==============================================================================
--- lldb/trunk/include/lldb/API/SBWatchpointLocation.h (original)
+++ lldb/trunk/include/lldb/API/SBWatchpointLocation.h (removed)
@@ -1,95 +0,0 @@
-//===-- SBWatchpointLocation.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_SBWatchpointLocation_h_
-#define LLDB_SBWatchpointLocation_h_
-
-#include "lldb/API/SBDefines.h"
-
-namespace lldb {
-
-class SBWatchpointLocation
-{
-public:
-
- SBWatchpointLocation ();
-
- SBWatchpointLocation (const lldb::SBWatchpointLocation &rhs);
-
- ~SBWatchpointLocation ();
-
-#ifndef SWIG
- const lldb::SBWatchpointLocation &
- operator = (const lldb::SBWatchpointLocation &rhs);
-#endif
-
- watch_id_t
- GetID () const;
-
- bool
- IsValid() const;
-
- /// With -1 representing an invalid hardware index.
- int32_t
- GetHardwareIndex () const;
-
- lldb::addr_t
- GetWatchAddress () const;
-
- size_t
- GetWatchSize() const;
-
- void
- SetEnabled(bool enabled);
-
- bool
- IsEnabled ();
-
- uint32_t
- GetHitCount () const;
-
- uint32_t
- GetIgnoreCount ();
-
- void
- SetIgnoreCount (uint32_t n);
-
- bool
- GetDescription (lldb::SBStream &description, DescriptionLevel level);
-
-#ifndef SWIG
- SBWatchpointLocation (const lldb::WatchpointLocationSP &watch_loc_sp);
-#endif
-
-private:
- friend class SBTarget;
-
-#ifndef SWIG
-
- lldb_private::WatchpointLocation *
- operator->() const;
-
- lldb_private::WatchpointLocation *
- get() const;
-
- lldb::WatchpointLocationSP &
- operator *();
-
- const lldb::WatchpointLocationSP &
- operator *() const;
-
-#endif
-
- lldb::WatchpointLocationSP m_opaque_sp;
-
-};
-
-} // namespace lldb
-
-#endif // LLDB_SBWatchpointLocation_h_
Modified: lldb/trunk/lldb.xcodeproj/project.pbxproj
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/lldb.xcodeproj/project.pbxproj?rev=141876&r1=141875&r2=141876&view=diff
==============================================================================
--- lldb/trunk/lldb.xcodeproj/project.pbxproj (original)
+++ lldb/trunk/lldb.xcodeproj/project.pbxproj Thu Oct 13 13:08:26 2011
@@ -452,8 +452,8 @@
B271B11413D6139300C3FEDB /* FormatClasses.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 94A9112D13D5DF210046D8A6 /* FormatClasses.cpp */; };
B27318421416AC12006039C8 /* WatchpointLocationList.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B27318411416AC12006039C8 /* WatchpointLocationList.cpp */; };
B28058A1139988B0002D96D0 /* InferiorCallPOSIX.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B28058A0139988B0002D96D0 /* InferiorCallPOSIX.cpp */; };
- B2A58722143119810092BFBA /* SBWatchpointLocation.h in Headers */ = {isa = PBXBuildFile; fileRef = B2A58721143119810092BFBA /* SBWatchpointLocation.h */; settings = {ATTRIBUTES = (Public, ); }; };
- B2A58724143119D50092BFBA /* SBWatchpointLocation.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B2A58723143119D50092BFBA /* SBWatchpointLocation.cpp */; };
+ B2A58722143119810092BFBA /* SBWatchpoint.h in Headers */ = {isa = PBXBuildFile; fileRef = B2A58721143119810092BFBA /* SBWatchpoint.h */; settings = {ATTRIBUTES = (Public, ); }; };
+ B2A58724143119D50092BFBA /* SBWatchpoint.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B2A58723143119D50092BFBA /* SBWatchpoint.cpp */; };
/* End PBXBuildFile section */
/* Begin PBXContainerItemProxy section */
@@ -1368,9 +1368,9 @@
B287E63E12EFAE2C00C9BEFE /* ARMDefines.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ARMDefines.h; path = Utility/ARMDefines.h; sourceTree = "<group>"; };
B296983412C2FB2B002D92C3 /* CommandObjectVersion.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CommandObjectVersion.cpp; path = source/Commands/CommandObjectVersion.cpp; sourceTree = "<group>"; };
B296983512C2FB2B002D92C3 /* CommandObjectVersion.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CommandObjectVersion.h; path = source/Commands/CommandObjectVersion.h; sourceTree = "<group>"; };
- B2A58721143119810092BFBA /* SBWatchpointLocation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SBWatchpointLocation.h; path = include/lldb/API/SBWatchpointLocation.h; sourceTree = "<group>"; };
- B2A58723143119D50092BFBA /* SBWatchpointLocation.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SBWatchpointLocation.cpp; path = source/API/SBWatchpointLocation.cpp; sourceTree = "<group>"; };
- B2A5872514313B480092BFBA /* SBWatchpointLocation.i */ = {isa = PBXFileReference; explicitFileType = sourcecode.cpp.h; path = SBWatchpointLocation.i; sourceTree = "<group>"; };
+ B2A58721143119810092BFBA /* SBWatchpoint.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SBWatchpoint.h; path = include/lldb/API/SBWatchpoint.h; sourceTree = "<group>"; };
+ B2A58723143119D50092BFBA /* SBWatchpoint.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SBWatchpoint.cpp; path = source/API/SBWatchpoint.cpp; sourceTree = "<group>"; };
+ B2A5872514313B480092BFBA /* SBWatchpoint.i */ = {isa = PBXFileReference; explicitFileType = sourcecode.cpp.h; path = SBWatchpoint.i; sourceTree = "<group>"; };
B2D3033612EFA5C500F84EB3 /* InstructionUtils.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = InstructionUtils.h; path = Utility/InstructionUtils.h; sourceTree = "<group>"; };
/* End PBXFileReference section */
@@ -1732,7 +1732,7 @@
2611FF11142D83060017FEA3 /* SBType.i */,
2611FF12142D83060017FEA3 /* SBValue.i */,
2611FF13142D83060017FEA3 /* SBValueList.i */,
- B2A5872514313B480092BFBA /* SBWatchpointLocation.i */,
+ B2A5872514313B480092BFBA /* SBWatchpoint.i */,
);
name = interface;
path = scripts/Python/interface;
@@ -1842,8 +1842,8 @@
9A19A6AD1163BB9800E0D453 /* SBValue.cpp */,
9A357582116CFDEE00E8ED2F /* SBValueList.h */,
9A35758D116CFE0F00E8ED2F /* SBValueList.cpp */,
- B2A58723143119D50092BFBA /* SBWatchpointLocation.cpp */,
- B2A58721143119810092BFBA /* SBWatchpointLocation.h */,
+ B2A58723143119D50092BFBA /* SBWatchpoint.cpp */,
+ B2A58721143119810092BFBA /* SBWatchpoint.h */,
);
name = API;
sourceTree = "<group>";
@@ -2882,7 +2882,7 @@
4CF52AF51428291E0051E832 /* SBFileSpecList.h in Headers */,
4CAA56131422D96A001FFA01 /* BreakpointResolverFileRegex.h in Headers */,
26B8283D142D01E9002DBC64 /* SBSection.h in Headers */,
- B2A58722143119810092BFBA /* SBWatchpointLocation.h in Headers */,
+ B2A58722143119810092BFBA /* SBWatchpoint.h in Headers */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -3171,7 +3171,7 @@
4CAA56151422D986001FFA01 /* BreakpointResolverFileRegex.cpp in Sources */,
4CF52AF8142829390051E832 /* SBFileSpecList.cpp in Sources */,
26B82840142D020F002DBC64 /* SBSection.cpp in Sources */,
- B2A58724143119D50092BFBA /* SBWatchpointLocation.cpp in Sources */,
+ B2A58724143119D50092BFBA /* SBWatchpoint.cpp in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -3577,6 +3577,7 @@
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
ARCHS = "$(ARCHS_STANDARD_64_BIT)";
+ DEBUG_INFORMATION_FORMAT = dwarf;
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_OPTIMIZATION_LEVEL = 0;
GCC_PREPROCESSOR_DEFINITIONS = (
@@ -3613,6 +3614,7 @@
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
ARCHS = "$(ARCHS_STANDARD_64_BIT)";
+ DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_PREPROCESSOR_DEFINITIONS = (
__STDC_CONSTANT_MACROS,
@@ -3646,7 +3648,6 @@
isa = XCBuildConfiguration;
buildSettings = {
COPY_PHASE_STRIP = NO;
- DEBUG_INFORMATION_FORMAT = dwarf;
FRAMEWORK_SEARCH_PATHS = /System/Library/PrivateFrameworks;
GCC_DYNAMIC_NO_PIC = NO;
GCC_OPTIMIZATION_LEVEL = 0;
@@ -3661,7 +3662,6 @@
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
COPY_PHASE_STRIP = YES;
- DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
FRAMEWORK_SEARCH_PATHS = /System/Library/PrivateFrameworks;
INSTALL_PATH = /Developer/usr/bin;
ONLY_ACTIVE_ARCH = NO;
@@ -3673,7 +3673,6 @@
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
- DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
FRAMEWORK_SEARCH_PATHS = /System/Library/PrivateFrameworks;
INSTALL_PATH = /Developer/usr/bin;
ONLY_ACTIVE_ARCH = NO;
@@ -3687,7 +3686,6 @@
ALWAYS_SEARCH_USER_PATHS = NO;
COPY_PHASE_STRIP = NO;
CURRENT_PROJECT_VERSION = 80;
- DEBUG_INFORMATION_FORMAT = dwarf;
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 80;
EXPORTED_SYMBOLS_FILE = "resources/lldb-framework-exports";
@@ -3739,7 +3737,6 @@
COPY_PHASE_STRIP = NO;
CURRENT_PROJECT_VERSION = 80;
DEAD_CODE_STRIPPING = YES;
- DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 80;
EXPORTED_SYMBOLS_FILE = "resources/lldb-framework-exports";
@@ -3826,7 +3823,6 @@
buildSettings = {
COPY_PHASE_STRIP = NO;
CURRENT_PROJECT_VERSION = 80;
- DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
DYLIB_CURRENT_VERSION = 80;
EXECUTABLE_EXTENSION = a;
FRAMEWORK_SEARCH_PATHS = (
@@ -3865,7 +3861,6 @@
buildSettings = {
COPY_PHASE_STRIP = NO;
CURRENT_PROJECT_VERSION = 80;
- DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
DYLIB_CURRENT_VERSION = 80;
EXECUTABLE_EXTENSION = a;
FRAMEWORK_SEARCH_PATHS = (
@@ -3904,6 +3899,7 @@
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
ARCHS = "$(ARCHS_STANDARD_64_BIT)";
+ DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_PREPROCESSOR_DEFINITIONS = (
__STDC_CONSTANT_MACROS,
@@ -3938,7 +3934,6 @@
buildSettings = {
COPY_PHASE_STRIP = YES;
CURRENT_PROJECT_VERSION = 80;
- DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",
"\"$(SYSTEM_LIBRARY_DIR)/PrivateFrameworks\"",
@@ -3969,7 +3964,6 @@
COPY_PHASE_STRIP = YES;
CURRENT_PROJECT_VERSION = 80;
DEAD_CODE_STRIPPING = YES;
- DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 80;
EXPORTED_SYMBOLS_FILE = "resources/lldb-framework-exports";
@@ -4047,7 +4041,6 @@
CODE_SIGN_IDENTITY = lldb_codesign;
COPY_PHASE_STRIP = YES;
DEAD_CODE_STRIPPING = YES;
- DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",
"\"$(SYSTEM_LIBRARY_DIR)/PrivateFrameworks\"",
@@ -4096,7 +4089,6 @@
buildSettings = {
COPY_PHASE_STRIP = NO;
CURRENT_PROJECT_VERSION = 80;
- DEBUG_INFORMATION_FORMAT = dwarf;
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",
"\"$(SYSTEM_LIBRARY_DIR)/PrivateFrameworks\"",
@@ -4127,7 +4119,6 @@
buildSettings = {
COPY_PHASE_STRIP = YES;
CURRENT_PROJECT_VERSION = 80;
- DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",
"\"$(SYSTEM_LIBRARY_DIR)/PrivateFrameworks\"",
Modified: lldb/trunk/lldb.xcodeproj/xcshareddata/xcschemes/lldb-tool.xcscheme
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/lldb.xcodeproj/xcshareddata/xcschemes/lldb-tool.xcscheme?rev=141876&r1=141875&r2=141876&view=diff
==============================================================================
--- lldb/trunk/lldb.xcodeproj/xcshareddata/xcschemes/lldb-tool.xcscheme (original)
+++ lldb/trunk/lldb.xcodeproj/xcshareddata/xcschemes/lldb-tool.xcscheme Thu Oct 13 13:08:26 2011
@@ -86,7 +86,7 @@
launchStyle = "0"
useCustomWorkingDirectory = "NO"
customWorkingDirectory = "/Volumes/work/gclayton/Documents/devb/attach"
- buildConfiguration = "Debug"
+ buildConfiguration = "Release"
ignoresPersistentStateOnLaunch = "YES"
debugDocumentVersioning = "YES"
allowLocationSimulation = "YES">
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=141876&r1=141875&r2=141876&view=diff
==============================================================================
--- lldb/trunk/scripts/Python/build-swig-Python.sh (original)
+++ lldb/trunk/scripts/Python/build-swig-Python.sh Thu Oct 13 13:08:26 2011
@@ -72,7 +72,7 @@
" ${SRC_ROOT}/include/lldb/API/SBType.h"\
" ${SRC_ROOT}/include/lldb/API/SBValue.h"\
" ${SRC_ROOT}/include/lldb/API/SBValueList.h"\
-" ${SRC_ROOT}/include/lldb/API/SBWatchpointLocation.h"\
+" ${SRC_ROOT}/include/lldb/API/SBWatchpoint.h"\
INTERFACE_FILES="${SRC_ROOT}/scripts/Python/interface/SBAddress.i"\
" ${SRC_ROOT}/scripts/Python/interface/SBBlock.i"\
@@ -108,7 +108,7 @@
" ${SRC_ROOT}/scripts/Python/interface/SBType.i"\
" ${SRC_ROOT}/scripts/Python/interface/SBValue.i"\
" ${SRC_ROOT}/scripts/Python/interface/SBValueList.i"\
-" ${SRC_ROOT}/scripts/Python/interface/SBWatchpointLocation.i"
+" ${SRC_ROOT}/scripts/Python/interface/SBWatchpoint.i"
if [ $Debug == 1 ]
then
Modified: lldb/trunk/scripts/Python/interface/SBTarget.i
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/scripts/Python/interface/SBTarget.i?rev=141876&r1=141875&r2=141876&view=diff
==============================================================================
--- lldb/trunk/scripts/Python/interface/SBTarget.i (original)
+++ lldb/trunk/scripts/Python/interface/SBTarget.i Thu Oct 13 13:08:26 2011
@@ -442,28 +442,32 @@
DeleteAllBreakpoints ();
uint32_t
- GetNumWatchpointLocations () const;
-
- lldb::SBWatchpointLocation
- GetLastCreatedWatchpointLocation ();
-
- lldb::SBWatchpointLocation
- GetWatchpointLocationAtIndex (uint32_t idx) const;
-
+ GetNumWatchpoints () const;
+
+ lldb::SBWatchpoint
+ GetWatchpointAtIndex (uint32_t idx) const;
+
bool
- WatchpointLocationDelete (watch_id_t watch_id);
-
- lldb::SBWatchpointLocation
- FindWatchpointLocationByID (watch_id_t watch_id);
-
+ DeleteWatchpoint (lldb::watch_id_t watch_id);
+
+ lldb::SBWatchpoint
+ FindWatchpointByID (lldb::watch_id_t watch_id);
+
bool
- EnableAllWatchpointLocations ();
-
+ EnableAllWatchpoints ();
+
bool
- DisableAllWatchpointLocations ();
-
+ DisableAllWatchpoints ();
+
bool
- DeleteAllWatchpointLocations ();
+ DeleteAllWatchpoints ();
+
+ lldb::SBWatchpoint
+ WatchAddress (lldb::addr_t addr,
+ size_t size,
+ bool read,
+ bool write);
+
lldb::SBBroadcaster
GetBroadcaster () const;
Modified: lldb/trunk/scripts/Python/interface/SBValue.i
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/scripts/Python/interface/SBValue.i?rev=141876&r1=141875&r2=141876&view=diff
==============================================================================
--- lldb/trunk/scripts/Python/interface/SBValue.i (original)
+++ lldb/trunk/scripts/Python/interface/SBValue.i Thu Oct 13 13:08:26 2011
@@ -278,6 +278,12 @@
lldb::SBFrame
GetFrame();
+ lldb::SBWatchpoint
+ Watch (bool resolve_location, bool read, bool write);
+
+ lldb::SBWatchpoint
+ WatchPointee (bool resolve_location, bool read, bool write);
+
bool
GetDescription (lldb::SBStream &description);
Copied: lldb/trunk/scripts/Python/interface/SBWatchpoint.i (from r141866, lldb/trunk/scripts/Python/interface/SBWatchpointLocation.i)
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/scripts/Python/interface/SBWatchpoint.i?p2=lldb/trunk/scripts/Python/interface/SBWatchpoint.i&p1=lldb/trunk/scripts/Python/interface/SBWatchpointLocation.i&r1=141866&r2=141876&rev=141876&view=diff
==============================================================================
--- lldb/trunk/scripts/Python/interface/SBWatchpointLocation.i (original)
+++ lldb/trunk/scripts/Python/interface/SBWatchpoint.i Thu Oct 13 13:08:26 2011
@@ -1,4 +1,4 @@
-//===-- SWIG Interface for SBWatchpointLocation -----------------*- C++ -*-===//
+//===-- SWIG Interface for SBWatchpoint -----------------*- C++ -*-===//
//
// The LLVM Compiler Infrastructure
//
@@ -18,22 +18,22 @@
See also SBTarget.watchpoint_location_iter() for for example usage of iterating
through the watchpoint locations of the target."
-) SBWatchpointLocation;
-class SBWatchpointLocation
+) SBWatchpoint;
+class SBWatchpoint
{
public:
- SBWatchpointLocation ();
+ SBWatchpoint ();
- SBWatchpointLocation (const lldb::SBWatchpointLocation &rhs);
+ SBWatchpoint (const lldb::SBWatchpoint &rhs);
- ~SBWatchpointLocation ();
+ ~SBWatchpoint ();
watch_id_t
- GetID () const;
+ GetID ();
bool
- IsValid() const;
+ IsValid();
%feature("docstring", "
//------------------------------------------------------------------
@@ -41,13 +41,13 @@
//------------------------------------------------------------------
") GetHardwareIndex;
int32_t
- GetHardwareIndex () const;
+ GetHardwareIndex ();
lldb::addr_t
- GetWatchAddress () const;
+ GetWatchAddress ();
size_t
- GetWatchSize() const;
+ GetWatchSize();
void
SetEnabled(bool enabled);
@@ -56,7 +56,7 @@
IsEnabled ();
uint32_t
- GetHitCount () const;
+ GetHitCount ();
uint32_t
GetIgnoreCount ();
Removed: lldb/trunk/scripts/Python/interface/SBWatchpointLocation.i
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/scripts/Python/interface/SBWatchpointLocation.i?rev=141875&view=auto
==============================================================================
--- lldb/trunk/scripts/Python/interface/SBWatchpointLocation.i (original)
+++ lldb/trunk/scripts/Python/interface/SBWatchpointLocation.i (removed)
@@ -1,71 +0,0 @@
-//===-- SWIG Interface for SBWatchpointLocation -----------------*- C++ -*-===//
-//
-// The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
-//
-//===----------------------------------------------------------------------===//
-
-namespace lldb {
-
-%feature("docstring",
-"Represents an instance of watchpoint location for a specific target program.
-
-A watchpoint location is determined by the address and the byte size that
-resulted in this particular instantiation. Each watchpoint location has its
-settable options.
-
-See also SBTarget.watchpoint_location_iter() for for example usage of iterating
-through the watchpoint locations of the target."
-) SBWatchpointLocation;
-class SBWatchpointLocation
-{
-public:
-
- SBWatchpointLocation ();
-
- SBWatchpointLocation (const lldb::SBWatchpointLocation &rhs);
-
- ~SBWatchpointLocation ();
-
- watch_id_t
- GetID () const;
-
- bool
- IsValid() const;
-
- %feature("docstring", "
- //------------------------------------------------------------------
- /// With -1 representing an invalid hardware index.
- //------------------------------------------------------------------
- ") GetHardwareIndex;
- int32_t
- GetHardwareIndex () const;
-
- lldb::addr_t
- GetWatchAddress () const;
-
- size_t
- GetWatchSize() const;
-
- void
- SetEnabled(bool enabled);
-
- bool
- IsEnabled ();
-
- uint32_t
- GetHitCount () const;
-
- uint32_t
- GetIgnoreCount ();
-
- void
- SetIgnoreCount (uint32_t n);
-
- bool
- GetDescription (lldb::SBStream &description, DescriptionLevel level);
-};
-
-} // namespace lldb
Modified: lldb/trunk/scripts/Python/modify-python-lldb.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/scripts/Python/modify-python-lldb.py?rev=141876&r1=141875&r2=141876&view=diff
==============================================================================
--- lldb/trunk/scripts/Python/modify-python-lldb.py (original)
+++ lldb/trunk/scripts/Python/modify-python-lldb.py Thu Oct 13 13:08:26 2011
@@ -236,7 +236,7 @@
#
e = { 'SBAddress': ['GetFileAddress', 'GetModule'],
'SBBreakpoint': ['GetID'],
- 'SBWatchpointLocation': ['GetID'],
+ 'SBWatchpoint': ['GetID'],
'SBFileSpec': ['GetFilename', 'GetDirectory'],
'SBModule': ['GetFileSpec', 'GetUUIDString'],
'SBType': ['GetByteSize', 'GetName']
Modified: lldb/trunk/scripts/Python/python-extensions.swig
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/scripts/Python/python-extensions.swig?rev=141876&r1=141875&r2=141876&view=diff
==============================================================================
--- lldb/trunk/scripts/Python/python-extensions.swig (original)
+++ lldb/trunk/scripts/Python/python-extensions.swig Thu Oct 13 13:08:26 2011
@@ -160,8 +160,8 @@
return PyString_FromString (description.GetData());
}
}
-%extend lldb::SBWatchpointLocation {
- PyObject *lldb::SBWatchpointLocation::__repr__ (){
+%extend lldb::SBWatchpoint {
+ PyObject *lldb::SBWatchpoint::__repr__ (){
lldb::SBStream description;
$self->GetDescription (description, lldb::eDescriptionLevelVerbose);
return PyString_FromString (description.GetData());
Modified: lldb/trunk/scripts/lldb.swig
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/scripts/lldb.swig?rev=141876&r1=141875&r2=141876&view=diff
==============================================================================
--- lldb/trunk/scripts/lldb.swig (original)
+++ lldb/trunk/scripts/lldb.swig Thu Oct 13 13:08:26 2011
@@ -79,7 +79,7 @@
#include "lldb/API/SBType.h"
#include "lldb/API/SBValue.h"
#include "lldb/API/SBValueList.h"
-#include "lldb/API/SBWatchpointLocation.h"
+#include "lldb/API/SBWatchpoint.h"
%}
/* Various liblldb typedefs that SWIG needs to know about. */
@@ -132,7 +132,7 @@
%include "./Python/interface/SBType.i"
%include "./Python/interface/SBValue.i"
%include "./Python/interface/SBValueList.i"
-%include "./Python/interface/SBWatchpointLocation.i"
+%include "./Python/interface/SBWatchpoint.i"
%include "./Python/python-extensions.swig"
Modified: lldb/trunk/source/API/SBTarget.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/API/SBTarget.cpp?rev=141876&r1=141875&r2=141876&view=diff
==============================================================================
--- lldb/trunk/source/API/SBTarget.cpp (original)
+++ lldb/trunk/source/API/SBTarget.cpp Thu Oct 13 13:08:26 2011
@@ -883,7 +883,7 @@
}
uint32_t
-SBTarget::GetNumWatchpointLocations () const
+SBTarget::GetNumWatchpoints () const
{
if (m_opaque_sp)
{
@@ -893,31 +893,10 @@
return 0;
}
-SBWatchpointLocation
-SBTarget::GetLastCreatedWatchpointLocation ()
+SBWatchpoint
+SBTarget::GetWatchpointAtIndex (uint32_t idx) const
{
- LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
-
- SBWatchpointLocation sb_watchpoint_location;
- if (m_opaque_sp)
- {
- Mutex::Locker api_locker (m_opaque_sp->GetAPIMutex());
- sb_watchpoint_location = m_opaque_sp->GetLastCreatedWatchpointLocation();
- }
-
- if (log)
- {
- log->Printf ("SBTarget(%p)::GetLastCreateWatchpointLocation () => SBWatchpointLocation(%p)",
- m_opaque_sp.get(), sb_watchpoint_location.get());
- }
-
- return sb_watchpoint_location;
-}
-
-SBWatchpointLocation
-SBTarget::GetWatchpointLocationAtIndex (uint32_t idx) const
-{
- SBWatchpointLocation sb_watchpoint_location;
+ SBWatchpoint sb_watchpoint_location;
if (m_opaque_sp)
{
// The watchpoint location list is thread safe, no need to lock
@@ -927,7 +906,7 @@
}
bool
-SBTarget::WatchpointLocationDelete (watch_id_t wp_id)
+SBTarget::DeleteWatchpoint (watch_id_t wp_id)
{
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
@@ -946,29 +925,51 @@
return result;
}
-SBWatchpointLocation
-SBTarget::FindWatchpointLocationByID (watch_id_t wp_id)
+SBWatchpoint
+SBTarget::FindWatchpointByID (lldb::watch_id_t wp_id)
{
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
- SBWatchpointLocation sb_watchpoint_location;
+ SBWatchpoint sb_watchpoint;
if (m_opaque_sp && wp_id != LLDB_INVALID_WATCH_ID)
{
Mutex::Locker api_locker (m_opaque_sp->GetAPIMutex());
- *sb_watchpoint_location = m_opaque_sp->GetWatchpointLocationList().FindByID(wp_id);
+ *sb_watchpoint = m_opaque_sp->GetWatchpointLocationList().FindByID(wp_id);
}
if (log)
{
- log->Printf ("SBTarget(%p)::FindWatchpointLocationByID (bp_id=%d) => SBWatchpointLocation(%p)",
- m_opaque_sp.get(), (uint32_t) wp_id, sb_watchpoint_location.get());
+ log->Printf ("SBTarget(%p)::FindWatchpointLocationByID (bp_id=%d) => SBWatchpoint(%p)",
+ m_opaque_sp.get(), (uint32_t) wp_id, sb_watchpoint.get());
}
- return sb_watchpoint_location;
+ return sb_watchpoint;
+}
+
+lldb::SBWatchpoint
+SBTarget::WatchAddress (lldb::addr_t addr, size_t size, bool read, bool write)
+{
+ LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
+
+ SBWatchpoint sb_watchpoint;
+ if (m_opaque_sp)
+ {
+ Mutex::Locker api_locker (m_opaque_sp->GetAPIMutex());
+ // TODO: Johnny fill this in
+ //*sb_watchpoint = m_opaque_sp->GetWatchpointLocationList().FindByID(wp_id);
+ }
+
+ if (log)
+ {
+ log->Printf ("SBTarget(%p)::WatchAddress (addr=0x%llx, 0x%u) => SBWatchpoint(%p)",
+ m_opaque_sp.get(), addr, (uint32_t) size, sb_watchpoint.get());
+ }
+
+ return sb_watchpoint;
}
bool
-SBTarget::EnableAllWatchpointLocations ()
+SBTarget::EnableAllWatchpoints ()
{
if (m_opaque_sp)
{
@@ -980,7 +981,7 @@
}
bool
-SBTarget::DisableAllWatchpointLocations ()
+SBTarget::DisableAllWatchpoints ()
{
if (m_opaque_sp)
{
@@ -992,7 +993,7 @@
}
bool
-SBTarget::DeleteAllWatchpointLocations ()
+SBTarget::DeleteAllWatchpoints ()
{
if (m_opaque_sp)
{
Modified: lldb/trunk/source/API/SBValue.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/API/SBValue.cpp?rev=141876&r1=141875&r2=141876&view=diff
==============================================================================
--- lldb/trunk/source/API/SBValue.cpp (original)
+++ lldb/trunk/source/API/SBValue.cpp Thu Oct 13 13:08:26 2011
@@ -1097,3 +1097,31 @@
return sb_data;
}
+
+lldb::SBWatchpoint
+SBValue::Watch (bool resolve_location, bool read, bool write)
+{
+ lldb::SBWatchpoint sb_watchpoint;
+ Target* target = m_opaque_sp->GetUpdatePoint().GetTargetSP().get();
+ if (target)
+ {
+ Mutex::Locker api_locker (target->GetAPIMutex());
+ // TODO: Johnny fill this in
+ }
+ return sb_watchpoint;
+}
+
+lldb::SBWatchpoint
+SBValue::WatchPointee (bool resolve_location, bool read, bool write)
+{
+ lldb::SBWatchpoint sb_watchpoint;
+ Target* target = m_opaque_sp->GetUpdatePoint().GetTargetSP().get();
+ if (target)
+ {
+ Mutex::Locker api_locker (target->GetAPIMutex());
+ // TODO: Johnny fill this in
+ }
+ return sb_watchpoint;
+}
+
+
Copied: lldb/trunk/source/API/SBWatchpoint.cpp (from r141866, lldb/trunk/source/API/SBWatchpointLocation.cpp)
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/API/SBWatchpoint.cpp?p2=lldb/trunk/source/API/SBWatchpoint.cpp&p1=lldb/trunk/source/API/SBWatchpointLocation.cpp&r1=141866&r2=141876&rev=141876&view=diff
==============================================================================
--- lldb/trunk/source/API/SBWatchpointLocation.cpp (original)
+++ lldb/trunk/source/API/SBWatchpoint.cpp Thu Oct 13 13:08:26 2011
@@ -1,4 +1,4 @@
-//===-- SBWatchpointLocation.cpp --------------------------------*- C++ -*-===//
+//===-- SBWatchpoint.cpp --------------------------------*- C++ -*-===//
//
// The LLVM Compiler Infrastructure
//
@@ -7,7 +7,7 @@
//
//===----------------------------------------------------------------------===//
-#include "lldb/API/SBWatchpointLocation.h"
+#include "lldb/API/SBWatchpoint.h"
#include "lldb/API/SBDefines.h"
#include "lldb/API/SBAddress.h"
#include "lldb/API/SBDebugger.h"
@@ -26,12 +26,12 @@
using namespace lldb_private;
-SBWatchpointLocation::SBWatchpointLocation () :
+SBWatchpoint::SBWatchpoint () :
m_opaque_sp ()
{
}
-SBWatchpointLocation::SBWatchpointLocation (const lldb::WatchpointLocationSP &watch_loc_sp) :
+SBWatchpoint::SBWatchpoint (const lldb::WatchpointLocationSP &watch_loc_sp) :
m_opaque_sp (watch_loc_sp)
{
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
@@ -40,18 +40,18 @@
{
SBStream sstr;
GetDescription (sstr, lldb::eDescriptionLevelBrief);
- log->Printf ("SBWatchpointLocation::SBWatchpointLocation (const lldb::WatchpointLocationsSP &watch_loc_sp"
+ log->Printf ("SBWatchpoint::SBWatchpoint (const lldb::WatchpointLocationsSP &watch_loc_sp"
"=%p) => this.sp = %p (%s)", watch_loc_sp.get(), m_opaque_sp.get(), sstr.GetData());
}
}
-SBWatchpointLocation::SBWatchpointLocation(const SBWatchpointLocation &rhs) :
+SBWatchpoint::SBWatchpoint(const SBWatchpoint &rhs) :
m_opaque_sp (rhs.m_opaque_sp)
{
}
-const SBWatchpointLocation &
-SBWatchpointLocation::operator = (const SBWatchpointLocation &rhs)
+const SBWatchpoint &
+SBWatchpoint::operator = (const SBWatchpoint &rhs)
{
if (this != &rhs)
m_opaque_sp = rhs.m_opaque_sp;
@@ -59,12 +59,12 @@
}
-SBWatchpointLocation::~SBWatchpointLocation ()
+SBWatchpoint::~SBWatchpoint ()
{
}
watch_id_t
-SBWatchpointLocation::GetID () const
+SBWatchpoint::GetID ()
{
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
@@ -75,22 +75,41 @@
if (log)
{
if (watch_id == LLDB_INVALID_WATCH_ID)
- log->Printf ("SBWatchpointLocation(%p)::GetID () => LLDB_INVALID_WATCH_ID", m_opaque_sp.get());
+ log->Printf ("SBWatchpoint(%p)::GetID () => LLDB_INVALID_WATCH_ID", m_opaque_sp.get());
else
- log->Printf ("SBWatchpointLocation(%p)::GetID () => %u", m_opaque_sp.get(), watch_id);
+ log->Printf ("SBWatchpoint(%p)::GetID () => %u", m_opaque_sp.get(), watch_id);
}
return watch_id;
}
bool
-SBWatchpointLocation::IsValid() const
+SBWatchpoint::IsValid() const
{
return m_opaque_sp.get() != NULL;
+#if 0
+ if (m_opaque_sp)
+ return m_opaque_sp->GetError().Success();
+ return false;
+#endif
+}
+
+SBError
+SBWatchpoint::GetError ()
+{
+ SBError sb_error;
+#if 0
+ if (m_opaque_sp)
+ {
+ // TODO: Johnny fill this in
+ sb_error.ref() = m_opaque_sp->GetError();
+ }
+#endif
+ return sb_error;
}
int32_t
-SBWatchpointLocation::GetHardwareIndex () const
+SBWatchpoint::GetHardwareIndex ()
{
int32_t hw_index = -1;
@@ -104,7 +123,7 @@
}
addr_t
-SBWatchpointLocation::GetWatchAddress () const
+SBWatchpoint::GetWatchAddress ()
{
addr_t ret_addr = LLDB_INVALID_ADDRESS;
@@ -118,7 +137,7 @@
}
size_t
-SBWatchpointLocation::GetWatchSize () const
+SBWatchpoint::GetWatchSize ()
{
size_t watch_size = 0;
@@ -132,7 +151,7 @@
}
void
-SBWatchpointLocation::SetEnabled (bool enabled)
+SBWatchpoint::SetEnabled (bool enabled)
{
if (m_opaque_sp)
{
@@ -142,7 +161,7 @@
}
bool
-SBWatchpointLocation::IsEnabled ()
+SBWatchpoint::IsEnabled ()
{
if (m_opaque_sp)
{
@@ -154,7 +173,7 @@
}
uint32_t
-SBWatchpointLocation::GetHitCount () const
+SBWatchpoint::GetHitCount ()
{
uint32_t count = 0;
if (m_opaque_sp)
@@ -165,13 +184,13 @@
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
if (log)
- log->Printf ("SBWatchpointLocation(%p)::GetHitCount () => %u", m_opaque_sp.get(), count);
+ log->Printf ("SBWatchpoint(%p)::GetHitCount () => %u", m_opaque_sp.get(), count);
return count;
}
uint32_t
-SBWatchpointLocation::GetIgnoreCount ()
+SBWatchpoint::GetIgnoreCount ()
{
if (m_opaque_sp)
{
@@ -183,7 +202,7 @@
}
void
-SBWatchpointLocation::SetIgnoreCount (uint32_t n)
+SBWatchpoint::SetIgnoreCount (uint32_t n)
{
if (m_opaque_sp)
{
@@ -193,7 +212,7 @@
}
bool
-SBWatchpointLocation::GetDescription (SBStream &description, DescriptionLevel level)
+SBWatchpoint::GetDescription (SBStream &description, DescriptionLevel level)
{
if (m_opaque_sp)
{
@@ -209,26 +228,19 @@
}
lldb_private::WatchpointLocation *
-SBWatchpointLocation::operator->() const
+SBWatchpoint::operator->()
{
return m_opaque_sp.get();
}
lldb_private::WatchpointLocation *
-SBWatchpointLocation::get() const
+SBWatchpoint::get()
{
return m_opaque_sp.get();
}
lldb::WatchpointLocationSP &
-SBWatchpointLocation::operator *()
-{
- return m_opaque_sp;
-}
-
-const lldb::WatchpointLocationSP &
-SBWatchpointLocation::operator *() const
+SBWatchpoint::operator *()
{
return m_opaque_sp;
}
-
Removed: lldb/trunk/source/API/SBWatchpointLocation.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/API/SBWatchpointLocation.cpp?rev=141875&view=auto
==============================================================================
--- lldb/trunk/source/API/SBWatchpointLocation.cpp (original)
+++ lldb/trunk/source/API/SBWatchpointLocation.cpp (removed)
@@ -1,234 +0,0 @@
-//===-- SBWatchpointLocation.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/SBWatchpointLocation.h"
-#include "lldb/API/SBDefines.h"
-#include "lldb/API/SBAddress.h"
-#include "lldb/API/SBDebugger.h"
-#include "lldb/API/SBStream.h"
-
-#include "lldb/lldb-types.h"
-#include "lldb/lldb-defines.h"
-#include "lldb/Breakpoint/WatchpointLocation.h"
-#include "lldb/Breakpoint/WatchpointLocationList.h"
-#include "lldb/Core/Log.h"
-#include "lldb/Core/Stream.h"
-#include "lldb/Core/StreamFile.h"
-#include "lldb/Target/Target.h"
-
-using namespace lldb;
-using namespace lldb_private;
-
-
-SBWatchpointLocation::SBWatchpointLocation () :
- m_opaque_sp ()
-{
-}
-
-SBWatchpointLocation::SBWatchpointLocation (const lldb::WatchpointLocationSP &watch_loc_sp) :
- m_opaque_sp (watch_loc_sp)
-{
- LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
-
- if (log)
- {
- SBStream sstr;
- GetDescription (sstr, lldb::eDescriptionLevelBrief);
- log->Printf ("SBWatchpointLocation::SBWatchpointLocation (const lldb::WatchpointLocationsSP &watch_loc_sp"
- "=%p) => this.sp = %p (%s)", watch_loc_sp.get(), m_opaque_sp.get(), sstr.GetData());
- }
-}
-
-SBWatchpointLocation::SBWatchpointLocation(const SBWatchpointLocation &rhs) :
- m_opaque_sp (rhs.m_opaque_sp)
-{
-}
-
-const SBWatchpointLocation &
-SBWatchpointLocation::operator = (const SBWatchpointLocation &rhs)
-{
- if (this != &rhs)
- m_opaque_sp = rhs.m_opaque_sp;
- return *this;
-}
-
-
-SBWatchpointLocation::~SBWatchpointLocation ()
-{
-}
-
-watch_id_t
-SBWatchpointLocation::GetID () const
-{
- LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
-
- watch_id_t watch_id = LLDB_INVALID_WATCH_ID;
- if (m_opaque_sp)
- watch_id = m_opaque_sp->GetID();
-
- if (log)
- {
- if (watch_id == LLDB_INVALID_WATCH_ID)
- log->Printf ("SBWatchpointLocation(%p)::GetID () => LLDB_INVALID_WATCH_ID", m_opaque_sp.get());
- else
- log->Printf ("SBWatchpointLocation(%p)::GetID () => %u", m_opaque_sp.get(), watch_id);
- }
-
- return watch_id;
-}
-
-bool
-SBWatchpointLocation::IsValid() const
-{
- return m_opaque_sp.get() != NULL;
-}
-
-int32_t
-SBWatchpointLocation::GetHardwareIndex () const
-{
- int32_t hw_index = -1;
-
- if (m_opaque_sp)
- {
- Mutex::Locker api_locker (m_opaque_sp->GetTarget().GetAPIMutex());
- hw_index = m_opaque_sp->GetHardwareIndex();
- }
-
- return hw_index;
-}
-
-addr_t
-SBWatchpointLocation::GetWatchAddress () const
-{
- addr_t ret_addr = LLDB_INVALID_ADDRESS;
-
- if (m_opaque_sp)
- {
- Mutex::Locker api_locker (m_opaque_sp->GetTarget().GetAPIMutex());
- ret_addr = m_opaque_sp->GetLoadAddress();
- }
-
- return ret_addr;
-}
-
-size_t
-SBWatchpointLocation::GetWatchSize () const
-{
- size_t watch_size = 0;
-
- if (m_opaque_sp)
- {
- Mutex::Locker api_locker (m_opaque_sp->GetTarget().GetAPIMutex());
- watch_size = m_opaque_sp->GetByteSize();
- }
-
- return watch_size;
-}
-
-void
-SBWatchpointLocation::SetEnabled (bool enabled)
-{
- if (m_opaque_sp)
- {
- Mutex::Locker api_locker (m_opaque_sp->GetTarget().GetAPIMutex());
- m_opaque_sp->GetTarget().DisableWatchpointLocationByID(m_opaque_sp->GetID());
- }
-}
-
-bool
-SBWatchpointLocation::IsEnabled ()
-{
- if (m_opaque_sp)
- {
- Mutex::Locker api_locker (m_opaque_sp->GetTarget().GetAPIMutex());
- return m_opaque_sp->IsEnabled();
- }
- else
- return false;
-}
-
-uint32_t
-SBWatchpointLocation::GetHitCount () const
-{
- uint32_t count = 0;
- if (m_opaque_sp)
- {
- Mutex::Locker api_locker (m_opaque_sp->GetTarget().GetAPIMutex());
- count = m_opaque_sp->GetHitCount();
- }
-
- LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
- if (log)
- log->Printf ("SBWatchpointLocation(%p)::GetHitCount () => %u", m_opaque_sp.get(), count);
-
- return count;
-}
-
-uint32_t
-SBWatchpointLocation::GetIgnoreCount ()
-{
- if (m_opaque_sp)
- {
- Mutex::Locker api_locker (m_opaque_sp->GetTarget().GetAPIMutex());
- return m_opaque_sp->GetIgnoreCount();
- }
- else
- return 0;
-}
-
-void
-SBWatchpointLocation::SetIgnoreCount (uint32_t n)
-{
- if (m_opaque_sp)
- {
- Mutex::Locker api_locker (m_opaque_sp->GetTarget().GetAPIMutex());
- m_opaque_sp->SetIgnoreCount (n);
- }
-}
-
-bool
-SBWatchpointLocation::GetDescription (SBStream &description, DescriptionLevel level)
-{
- if (m_opaque_sp)
- {
- Mutex::Locker api_locker (m_opaque_sp->GetTarget().GetAPIMutex());
- description.ref();
- m_opaque_sp->GetDescription (description.get(), level);
- description.get()->EOL();
- }
- else
- description.Printf ("No value");
-
- return true;
-}
-
-lldb_private::WatchpointLocation *
-SBWatchpointLocation::operator->() const
-{
- return m_opaque_sp.get();
-}
-
-lldb_private::WatchpointLocation *
-SBWatchpointLocation::get() const
-{
- return m_opaque_sp.get();
-}
-
-lldb::WatchpointLocationSP &
-SBWatchpointLocation::operator *()
-{
- return m_opaque_sp;
-}
-
-const lldb::WatchpointLocationSP &
-SBWatchpointLocation::operator *() const
-{
- return m_opaque_sp;
-}
-
More information about the lldb-commits
mailing list