[Lldb-commits] [lldb] r124250 - in /lldb/trunk: include/lldb/Breakpoint/ include/lldb/Core/ include/lldb/Expression/ include/lldb/Symbol/ include/lldb/Target/ include/lldb/Utility/ lldb.xcodeproj/ source/Commands/ source/Core/ source/Expression/ source/Interpreter/ source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/ source/Plugins/ObjectFile/Mach-O/ source/Plugins/Process/MacOSX-User/source/ source/Plugins/Process/MacOSX-User/source/MacOSX/ source/Plugins/Process/Utility/ source/Plugins/Process/gdb-remote/ source/Plu...
Greg Clayton
gclayton at apple.com
Tue Jan 25 15:55:37 PST 2011
Author: gclayton
Date: Tue Jan 25 17:55:37 2011
New Revision: 124250
URL: http://llvm.org/viewvc/llvm-project?rev=124250&view=rev
Log:
Enabled extra warnings and fixed a bunch of small issues.
Modified:
lldb/trunk/include/lldb/Breakpoint/BreakpointList.h
lldb/trunk/include/lldb/Breakpoint/BreakpointLocationList.h
lldb/trunk/include/lldb/Core/DataExtractor.h
lldb/trunk/include/lldb/Core/Module.h
lldb/trunk/include/lldb/Core/PluginInterface.h
lldb/trunk/include/lldb/Core/StreamFile.h
lldb/trunk/include/lldb/Core/Value.h
lldb/trunk/include/lldb/Expression/ASTResultSynthesizer.h
lldb/trunk/include/lldb/Expression/ASTStructExtractor.h
lldb/trunk/include/lldb/Expression/ClangASTSource.h
lldb/trunk/include/lldb/Expression/ClangExpressionDeclMap.h
lldb/trunk/include/lldb/Expression/ClangExpressionVariable.h
lldb/trunk/include/lldb/Expression/DWARFExpression.h
lldb/trunk/include/lldb/Symbol/ClangASTContext.h
lldb/trunk/include/lldb/Symbol/ClangASTType.h
lldb/trunk/include/lldb/Symbol/Symbol.h
lldb/trunk/include/lldb/Symbol/SymbolContextScope.h
lldb/trunk/include/lldb/Symbol/TaggedASTType.h
lldb/trunk/include/lldb/Symbol/Type.h
lldb/trunk/include/lldb/Symbol/UnwindTable.h
lldb/trunk/include/lldb/Target/ExecutionContextScope.h
lldb/trunk/include/lldb/Utility/SharingPtr.h
lldb/trunk/lldb.xcodeproj/project.pbxproj
lldb/trunk/source/Commands/CommandObjectFrame.cpp
lldb/trunk/source/Core/DataExtractor.cpp
lldb/trunk/source/Core/Value.cpp
lldb/trunk/source/Core/ValueObjectVariable.cpp
lldb/trunk/source/Expression/ClangExpressionDeclMap.cpp
lldb/trunk/source/Expression/DWARFExpression.cpp
lldb/trunk/source/Expression/IRDynamicChecks.cpp
lldb/trunk/source/Interpreter/ScriptInterpreterPython.cpp
lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCTrampolineHandler.cpp
lldb/trunk/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp
lldb/trunk/source/Plugins/Process/MacOSX-User/source/MacOSX/MachThreadContext_arm.cpp
lldb/trunk/source/Plugins/Process/MacOSX-User/source/ProcessMacOSXLog.cpp
lldb/trunk/source/Plugins/Process/Utility/RegisterContextLLDB.cpp
lldb/trunk/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
lldb/trunk/source/Plugins/Process/gdb-remote/ProcessGDBRemoteLog.cpp
lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFCompileUnit.cpp
lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
lldb/trunk/source/Symbol/ClangASTContext.cpp
lldb/trunk/source/Symbol/ClangASTType.cpp
lldb/trunk/source/Symbol/Type.cpp
lldb/trunk/source/Target/StackFrame.cpp
lldb/trunk/source/Target/Thread.cpp
lldb/trunk/source/Target/ThreadPlanShouldStopHere.cpp
lldb/trunk/tools/debugserver/debugserver.xcodeproj/project.pbxproj
Modified: lldb/trunk/include/lldb/Breakpoint/BreakpointList.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Breakpoint/BreakpointList.h?rev=124250&r1=124249&r2=124250&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Breakpoint/BreakpointList.h (original)
+++ lldb/trunk/include/lldb/Breakpoint/BreakpointList.h Tue Jan 25 17:55:37 2011
@@ -46,7 +46,7 @@
/// @result
/// Returns breakpoint id.
//------------------------------------------------------------------
- virtual lldb::break_id_t
+ lldb::break_id_t
Add (lldb::BreakpointSP& bp_sp, bool notify);
//------------------------------------------------------------------
Modified: lldb/trunk/include/lldb/Breakpoint/BreakpointLocationList.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Breakpoint/BreakpointLocationList.h?rev=124250&r1=124249&r2=124250&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Breakpoint/BreakpointLocationList.h (original)
+++ lldb/trunk/include/lldb/Breakpoint/BreakpointLocationList.h Tue Jan 25 17:55:37 2011
@@ -38,6 +38,7 @@
friend class Breakpoint;
public:
+ virtual
~BreakpointLocationList();
//------------------------------------------------------------------
Modified: lldb/trunk/include/lldb/Core/DataExtractor.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Core/DataExtractor.h?rev=124250&r1=124249&r2=124250&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Core/DataExtractor.h (original)
+++ lldb/trunk/include/lldb/Core/DataExtractor.h Tue Jan 25 17:55:37 2011
@@ -720,10 +720,10 @@
GetU8 ( uint32_t *offset_ptr) const;
uint8_t
- GetU8_unchecked ( uint32_t *offset_ptr) const
+ GetU8_unchecked (uint32_t *offset_ptr) const
{
uint8_t val = m_start[*offset_ptr];
- *offset_ptr += sizeof(val);
+ *offset_ptr += 1;
return val;
}
Modified: lldb/trunk/include/lldb/Core/Module.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Core/Module.h?rev=124250&r1=124249&r2=124250&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Core/Module.h (original)
+++ lldb/trunk/include/lldb/Core/Module.h Tue Jan 25 17:55:37 2011
@@ -82,6 +82,7 @@
//------------------------------------------------------------------
/// Destructor.
//------------------------------------------------------------------
+ virtual
~Module ();
//------------------------------------------------------------------
Modified: lldb/trunk/include/lldb/Core/PluginInterface.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Core/PluginInterface.h?rev=124250&r1=124249&r2=124250&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Core/PluginInterface.h (original)
+++ lldb/trunk/include/lldb/Core/PluginInterface.h Tue Jan 25 17:55:37 2011
@@ -21,6 +21,8 @@
class PluginInterface
{
public:
+ virtual
+ ~PluginInterface () {}
virtual const char *
GetPluginName() = 0;
Modified: lldb/trunk/include/lldb/Core/StreamFile.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Core/StreamFile.h?rev=124250&r1=124249&r2=124250&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Core/StreamFile.h (original)
+++ lldb/trunk/include/lldb/Core/StreamFile.h Tue Jan 25 17:55:37 2011
@@ -72,6 +72,9 @@
FILE* m_file; ///< File handle to dump to.
bool m_close_file;
std::string m_path_name;
+
+private:
+ DISALLOW_COPY_AND_ASSIGN (StreamFile);
};
} // namespace lldb_private
Modified: lldb/trunk/include/lldb/Core/Value.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Core/Value.h?rev=124250&r1=124249&r2=124250&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Core/Value.h (original)
+++ lldb/trunk/include/lldb/Core/Value.h Tue Jan 25 17:55:37 2011
@@ -63,8 +63,11 @@
Value(double v);
Value(long double v);
Value(const uint8_t *bytes, int len);
- Value(const Value &v);
+ Value(const Value &rhs);
+ Value &
+ operator=(const Value &rhs);
+
Value *
CreateProxy();
@@ -145,10 +148,16 @@
class ValueList
{
public:
- ValueList () {}
+ ValueList () :
+ m_values()
+ {
+ }
+
ValueList (const ValueList &rhs);
- ~ValueList () {}
+ ~ValueList ()
+ {
+ }
const ValueList & operator= (const ValueList &rhs);
Modified: lldb/trunk/include/lldb/Expression/ASTResultSynthesizer.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Expression/ASTResultSynthesizer.h?rev=124250&r1=124249&r2=124250&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Expression/ASTResultSynthesizer.h (original)
+++ lldb/trunk/include/lldb/Expression/ASTResultSynthesizer.h Tue Jan 25 17:55:37 2011
@@ -158,4 +158,4 @@
}
-#endif
\ No newline at end of file
+#endif
Modified: lldb/trunk/include/lldb/Expression/ASTStructExtractor.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Expression/ASTStructExtractor.h?rev=124250&r1=124249&r2=124250&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Expression/ASTStructExtractor.h (original)
+++ lldb/trunk/include/lldb/Expression/ASTStructExtractor.h Tue Jan 25 17:55:37 2011
@@ -153,4 +153,4 @@
}
-#endif
\ No newline at end of file
+#endif
Modified: lldb/trunk/include/lldb/Expression/ClangASTSource.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Expression/ClangASTSource.h?rev=124250&r1=124249&r2=124250&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Expression/ClangASTSource.h (original)
+++ lldb/trunk/include/lldb/Expression/ClangASTSource.h Tue Jan 25 17:55:37 2011
@@ -255,4 +255,4 @@
}
-#endif
\ No newline at end of file
+#endif
Modified: lldb/trunk/include/lldb/Expression/ClangExpressionDeclMap.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Expression/ClangExpressionDeclMap.h?rev=124250&r1=124249&r2=124250&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Expression/ClangExpressionDeclMap.h (original)
+++ lldb/trunk/include/lldb/Expression/ClangExpressionDeclMap.h Tue Jan 25 17:55:37 2011
@@ -469,7 +469,9 @@
//----------------------------------------------------------------------
/// The following values should not live beyond parsing
//----------------------------------------------------------------------
- struct ParserVars {
+ class ParserVars
+ {
+ public:
ParserVars() :
m_exe_ctx(NULL),
m_sym_ctx(),
@@ -493,6 +495,8 @@
ClangPersistentVariables *m_persistent_vars; ///< The persistent variables for the process.
bool m_enable_lookups; ///< Set to true during parsing if we have found the first "$__lldb" name.
bool m_ignore_lookups; ///< True during an import when we should be ignoring type lookups.
+ private:
+ DISALLOW_COPY_AND_ASSIGN (ParserVars);
};
std::auto_ptr<ParserVars> m_parser_vars;
Modified: lldb/trunk/include/lldb/Expression/ClangExpressionVariable.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Expression/ClangExpressionVariable.h?rev=124250&r1=124249&r2=124250&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Expression/ClangExpressionVariable.h (original)
+++ lldb/trunk/include/lldb/Expression/ClangExpressionVariable.h Tue Jan 25 17:55:37 2011
@@ -89,7 +89,9 @@
//----------------------------------------------------------------------
/// The following values should not live beyond parsing
//----------------------------------------------------------------------
- struct ParserVars {
+ class ParserVars
+ {
+ public:
ParserVars() :
m_parser_type(),
@@ -103,6 +105,9 @@
const clang::NamedDecl *m_named_decl; ///< The Decl corresponding to this variable
llvm::Value *m_llvm_value; ///< The IR value corresponding to this variable; usually a GlobalValue
lldb_private::Value *m_lldb_value; ///< The value found in LLDB for this variable
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN (ParserVars);
};
//----------------------------------------------------------------------
/// Make this variable usable by the parser by allocating space for
Modified: lldb/trunk/include/lldb/Expression/DWARFExpression.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Expression/DWARFExpression.h?rev=124250&r1=124249&r2=124250&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Expression/DWARFExpression.h (original)
+++ lldb/trunk/include/lldb/Expression/DWARFExpression.h Tue Jan 25 17:55:37 2011
@@ -189,6 +189,8 @@
bool
Evaluate (ExecutionContextScope *exe_scope,
clang::ASTContext *ast_context,
+ ClangExpressionVariableList *expr_locals,
+ ClangExpressionDeclMap *decl_map,
lldb::addr_t loclist_base_load_addr,
const Value* initial_value_ptr,
Value& result,
@@ -201,6 +203,8 @@
bool
Evaluate (ExecutionContext *exe_ctx,
clang::ASTContext *ast_context,
+ ClangExpressionVariableList *expr_locals,
+ ClangExpressionDeclMap *decl_map,
RegisterContext *reg_ctx,
lldb::addr_t loclist_base_load_addr,
const Value* initial_value_ptr,
@@ -269,10 +273,10 @@
static bool
Evaluate (ExecutionContext *exe_ctx,
clang::ASTContext *ast_context,
- const DataExtractor& opcodes,
ClangExpressionVariableList *expr_locals,
ClangExpressionDeclMap *decl_map,
RegisterContext *reg_ctx,
+ const DataExtractor& opcodes,
const uint32_t offset,
const uint32_t length,
const uint32_t reg_set,
@@ -331,8 +335,7 @@
lldb::addr_t m_loclist_slide; ///< A value used to slide the location list offsets so that
///< they are relative to the object that owns the location list
///< (the function for frame base and variable location lists)
- ClangExpressionVariableList *m_expr_locals; ///< The locals used by this expression. See Evaluate()
- ClangExpressionDeclMap *m_decl_map; ///< The external variables used by this expression. See Evaluate()
+
};
} // namespace lldb_private
Modified: lldb/trunk/include/lldb/Symbol/ClangASTContext.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Symbol/ClangASTContext.h?rev=124250&r1=124249&r2=124250&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Symbol/ClangASTContext.h (original)
+++ lldb/trunk/include/lldb/Symbol/ClangASTContext.h Tue Jan 25 17:55:37 2011
@@ -589,7 +589,7 @@
CreateMemberPointerType (lldb::clang_type_t clang_pointee_type,
lldb::clang_type_t clang_class_type);
- size_t
+ uint32_t
GetPointerBitSize ();
static bool
Modified: lldb/trunk/include/lldb/Symbol/ClangASTType.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Symbol/ClangASTType.h?rev=124250&r1=124249&r2=124250&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Symbol/ClangASTType.h (original)
+++ lldb/trunk/include/lldb/Symbol/ClangASTType.h Tue Jan 25 17:55:37 2011
@@ -46,7 +46,7 @@
{
}
- ~ClangASTType();
+ virtual ~ClangASTType();
const ClangASTType &
operator= (const ClangASTType &atb)
@@ -75,10 +75,10 @@
static ConstString
GetClangTypeName (lldb::clang_type_t clang_type);
- uint64_t
+ uint32_t
GetClangTypeBitWidth ();
- static uint64_t
+ static uint32_t
GetClangTypeBitWidth (clang::ASTContext *ast_context, lldb::clang_type_t opaque_clang_qual_type);
size_t
Modified: lldb/trunk/include/lldb/Symbol/Symbol.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Symbol/Symbol.h?rev=124250&r1=124249&r2=124250&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Symbol/Symbol.h (original)
+++ lldb/trunk/include/lldb/Symbol/Symbol.h Tue Jan 25 17:55:37 2011
@@ -93,7 +93,7 @@
uint32_t
GetSiblingIndex () const;
- uint32_t
+ lldb::addr_t
GetByteSize () const { return m_addr_range.GetByteSize(); }
lldb::SymbolType
Modified: lldb/trunk/include/lldb/Symbol/SymbolContextScope.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Symbol/SymbolContextScope.h?rev=124250&r1=124249&r2=124250&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Symbol/SymbolContextScope.h (original)
+++ lldb/trunk/include/lldb/Symbol/SymbolContextScope.h Tue Jan 25 17:55:37 2011
@@ -71,6 +71,9 @@
class SymbolContextScope
{
public:
+ virtual
+ ~SymbolContextScope () {}
+
//------------------------------------------------------------------
/// Reconstruct the object's symbolc context into \a sc.
///
Modified: lldb/trunk/include/lldb/Symbol/TaggedASTType.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Symbol/TaggedASTType.h?rev=124250&r1=124249&r2=124250&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Symbol/TaggedASTType.h (original)
+++ lldb/trunk/include/lldb/Symbol/TaggedASTType.h Tue Jan 25 17:55:37 2011
@@ -29,7 +29,7 @@
TaggedASTType () :
ClangASTType() { }
- ~TaggedASTType() { }
+ virtual ~TaggedASTType() { }
TaggedASTType<C> &operator= (const TaggedASTType<C> &tw)
{
Modified: lldb/trunk/include/lldb/Symbol/Type.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Symbol/Type.h?rev=124250&r1=124249&r2=124250&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Symbol/Type.h (original)
+++ lldb/trunk/include/lldb/Symbol/Type.h Tue Jan 25 17:55:37 2011
@@ -48,8 +48,8 @@
const ConstString &name,
uint32_t byte_size,
SymbolContextScope *context,
- uintptr_t encoding_uid,
- EncodingDataType encoding_type,
+ lldb::user_id_t encoding_uid,
+ EncodingDataType encoding_uid_type,
const Declaration& decl,
lldb::clang_type_t clang_qual_type,
ResolveState clang_type_resolve_state);
@@ -57,6 +57,8 @@
// This makes an invalid type. Used for functions that return a Type when they
// get an error.
Type();
+
+ Type (const Type &rhs);
const Type&
operator= (const Type& rhs);
@@ -88,7 +90,7 @@
const ConstString&
GetName();
- uint64_t
+ uint32_t
GetByteSize();
uint32_t
@@ -234,8 +236,8 @@
SymbolFile *m_symbol_file;
SymbolContextScope *m_context; // The symbol context in which this type is defined
Type *m_encoding_type;
- EncodingDataType m_encoding_uid_type;
uint32_t m_encoding_uid;
+ EncodingDataType m_encoding_uid_type;
uint32_t m_byte_size;
Declaration m_decl;
lldb::clang_type_t m_clang_type;
@@ -244,7 +246,8 @@
Type *
GetEncodingType ();
- bool ResolveClangType (ResolveState clang_type_resolve_state);
+ bool
+ ResolveClangType (ResolveState clang_type_resolve_state);
};
} // namespace lldb_private
Modified: lldb/trunk/include/lldb/Symbol/UnwindTable.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Symbol/UnwindTable.h?rev=124250&r1=124249&r2=124250&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Symbol/UnwindTable.h (original)
+++ lldb/trunk/include/lldb/Symbol/UnwindTable.h Tue Jan 25 17:55:37 2011
@@ -51,6 +51,8 @@
UnwindAssemblyProfiler* m_assembly_profiler;
DWARFCallFrameInfo* m_eh_frame;
+
+ DISALLOW_COPY_AND_ASSIGN (UnwindTable);
};
} // namespace lldb_private
Modified: lldb/trunk/include/lldb/Target/ExecutionContextScope.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Target/ExecutionContextScope.h?rev=124250&r1=124249&r2=124250&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Target/ExecutionContextScope.h (original)
+++ lldb/trunk/include/lldb/Target/ExecutionContextScope.h Tue Jan 25 17:55:37 2011
@@ -39,6 +39,9 @@
class ExecutionContextScope
{
public:
+ virtual
+ ~ExecutionContextScope () {}
+
virtual Target *
CalculateTarget () = 0;
Modified: lldb/trunk/include/lldb/Utility/SharingPtr.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Utility/SharingPtr.h?rev=124250&r1=124249&r2=124250&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Utility/SharingPtr.h (original)
+++ lldb/trunk/include/lldb/Utility/SharingPtr.h Tue Jan 25 17:55:37 2011
@@ -48,6 +48,11 @@
private:
virtual void on_zero_shared();
+
+ // Outlaw copy constructor and assignment operator to keep effictive C++
+ // warnings down to a minumum
+ shared_ptr_pointer (const shared_ptr_pointer &);
+ shared_ptr_pointer & operator=(const shared_ptr_pointer &);
};
template <class T>
@@ -169,7 +174,7 @@
template<class T>
template<class Y>
SharingPtr<T>::SharingPtr(Y* p)
- : ptr_(p)
+ : ptr_(p), cntrl_(0)
{
std::auto_ptr<Y> hold(p);
typedef imp::shared_ptr_pointer<Y*> _CntrlBlk;
Modified: lldb/trunk/lldb.xcodeproj/project.pbxproj
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/lldb.xcodeproj/project.pbxproj?rev=124250&r1=124249&r2=124250&view=diff
==============================================================================
--- lldb/trunk/lldb.xcodeproj/project.pbxproj (original)
+++ lldb/trunk/lldb.xcodeproj/project.pbxproj Tue Jan 25 17:55:37 2011
@@ -2874,8 +2874,15 @@
__STDC_LIMIT_MACROS,
LLDB_CONFIGURATION_DEBUG,
);
+ GCC_WARN_64_TO_32_BIT_CONVERSION = NO;
+ GCC_WARN_ABOUT_MISSING_NEWLINE = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES;
+ GCC_WARN_EFFECTIVE_CPLUSPLUS_VIOLATIONS = NO;
GCC_WARN_HIDDEN_VIRTUAL_FUNCTIONS = YES;
+ GCC_WARN_INITIALIZER_NOT_FULLY_BRACKETED = YES;
+ GCC_WARN_MISSING_PARENTHESES = YES;
+ GCC_WARN_NON_VIRTUAL_DESTRUCTOR = YES;
+ GCC_WARN_UNUSED_VALUE = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
ONLY_ACTIVE_ARCH = YES;
PREBINDING = NO;
@@ -2897,8 +2904,15 @@
__STDC_LIMIT_MACROS,
LLDB_CONFIGURATION_RELEASE,
);
+ GCC_WARN_64_TO_32_BIT_CONVERSION = NO;
+ GCC_WARN_ABOUT_MISSING_NEWLINE = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES;
+ GCC_WARN_EFFECTIVE_CPLUSPLUS_VIOLATIONS = NO;
GCC_WARN_HIDDEN_VIRTUAL_FUNCTIONS = YES;
+ GCC_WARN_INITIALIZER_NOT_FULLY_BRACKETED = YES;
+ GCC_WARN_MISSING_PARENTHESES = YES;
+ GCC_WARN_NON_VIRTUAL_DESTRUCTOR = YES;
+ GCC_WARN_UNUSED_VALUE = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
PREBINDING = NO;
VALID_ARCHS = "x86_64 i386";
@@ -3078,8 +3092,15 @@
__STDC_LIMIT_MACROS,
LLDB_CONFIGURATION_BUILD_AND_INTEGRATION,
);
+ GCC_WARN_64_TO_32_BIT_CONVERSION = NO;
+ GCC_WARN_ABOUT_MISSING_NEWLINE = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES;
+ GCC_WARN_EFFECTIVE_CPLUSPLUS_VIOLATIONS = NO;
GCC_WARN_HIDDEN_VIRTUAL_FUNCTIONS = YES;
+ GCC_WARN_INITIALIZER_NOT_FULLY_BRACKETED = YES;
+ GCC_WARN_MISSING_PARENTHESES = YES;
+ GCC_WARN_NON_VIRTUAL_DESTRUCTOR = YES;
+ GCC_WARN_UNUSED_VALUE = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
PREBINDING = NO;
VALID_ARCHS = "x86_64 i386";
Modified: lldb/trunk/source/Commands/CommandObjectFrame.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Commands/CommandObjectFrame.cpp?rev=124250&r1=124249&r2=124250&view=diff
==============================================================================
--- lldb/trunk/source/Commands/CommandObjectFrame.cpp (original)
+++ lldb/trunk/source/Commands/CommandObjectFrame.cpp Tue Jan 25 17:55:37 2011
@@ -629,7 +629,7 @@
{
for (uint32_t i=0; i<num_variables; i++)
{
- VariableSP var_sp (variable_list->GetVariableAtIndex(i));
+ var_sp = variable_list->GetVariableAtIndex(i);
bool dump_variable = true;
switch (var_sp->GetScope())
Modified: lldb/trunk/source/Core/DataExtractor.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/DataExtractor.cpp?rev=124250&r1=124249&r2=124250&view=diff
==============================================================================
--- lldb/trunk/source/Core/DataExtractor.cpp (original)
+++ lldb/trunk/source/Core/DataExtractor.cpp Tue Jan 25 17:55:37 2011
@@ -1253,7 +1253,7 @@
// earlier C++ libraries
std::string binary_value(64, '0');
std::bitset<64> bits(uval64);
- for (size_t i = 0; i < 64; ++i)
+ for (i = 0; i < 64; ++i)
if (bits[i])
binary_value[64 - 1 - i] = '1';
if (item_bit_size > 0)
Modified: lldb/trunk/source/Core/Value.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/Value.cpp?rev=124250&r1=124249&r2=124250&view=diff
==============================================================================
--- lldb/trunk/source/Core/Value.cpp (original)
+++ lldb/trunk/source/Core/Value.cpp Tue Jan 25 17:55:37 2011
@@ -142,6 +142,26 @@
}
}
+Value &
+Value::operator=(const Value &rhs)
+{
+ if (this != &rhs)
+ {
+ m_value = rhs.m_value;
+ m_value_type = rhs.m_value_type;
+ m_context = rhs.m_context;
+ m_context_type = rhs.m_context_type;
+ if ((uintptr_t)rhs.m_value.ULongLong(LLDB_INVALID_ADDRESS) == (uintptr_t)rhs.m_data_buffer.GetBytes())
+ {
+ m_data_buffer.CopyData(rhs.m_data_buffer.GetBytes(),
+ rhs.m_data_buffer.GetByteSize());
+
+ m_value = (uintptr_t)m_data_buffer.GetBytes();
+ }
+ }
+ return *this;
+}
+
Value *
Value::CreateProxy()
{
@@ -653,17 +673,17 @@
{
// Resolve the proxy
- Value * v = (Value*)m_context;
+ Value * rhs = (Value*)m_context;
- m_value = v->m_value;
- m_value_type = v->m_value_type;
- m_context = v->m_context;
- m_context_type = v->m_context_type;
+ m_value = rhs->m_value;
+ m_value_type = rhs->m_value_type;
+ m_context = rhs->m_context;
+ m_context_type = rhs->m_context_type;
- if ((uintptr_t)v->m_value.ULongLong(LLDB_INVALID_ADDRESS) == (uintptr_t)v->m_data_buffer.GetBytes())
+ if ((uintptr_t)rhs->m_value.ULongLong(LLDB_INVALID_ADDRESS) == (uintptr_t)rhs->m_data_buffer.GetBytes())
{
- m_data_buffer.CopyData(v->m_data_buffer.GetBytes(),
- v->m_data_buffer.GetByteSize());
+ m_data_buffer.CopyData(rhs->m_data_buffer.GetBytes(),
+ rhs->m_data_buffer.GetByteSize());
m_value = (uintptr_t)m_data_buffer.GetBytes();
}
Modified: lldb/trunk/source/Core/ValueObjectVariable.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/ValueObjectVariable.cpp?rev=124250&r1=124249&r2=124250&view=diff
==============================================================================
--- lldb/trunk/source/Core/ValueObjectVariable.cpp (original)
+++ lldb/trunk/source/Core/ValueObjectVariable.cpp Tue Jan 25 17:55:37 2011
@@ -118,7 +118,7 @@
loclist_base_load_addr = sc.function->GetAddressRange().GetBaseAddress().GetLoadAddress (exe_ctx.target);
}
Value old_value(m_value);
- if (expr.Evaluate (&exe_ctx, GetClangAST(), NULL, loclist_base_load_addr, NULL, m_value, &m_error))
+ if (expr.Evaluate (&exe_ctx, GetClangAST(), NULL, NULL, NULL, loclist_base_load_addr, NULL, m_value, &m_error))
{
m_value.SetContext(Value::eContextTypeVariable, variable);
Modified: lldb/trunk/source/Expression/ClangExpressionDeclMap.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Expression/ClangExpressionDeclMap.cpp?rev=124250&r1=124249&r2=124250&view=diff
==============================================================================
--- lldb/trunk/source/Expression/ClangExpressionDeclMap.cpp (original)
+++ lldb/trunk/source/Expression/ClangExpressionDeclMap.cpp Tue Jan 25 17:55:37 2011
@@ -1402,17 +1402,15 @@
{
uint32_t register_number = reg_info.kinds[lldb::eRegisterKindLLDB];
uint32_t register_byte_size = reg_info.byte_size;
-
- Error error;
-
+
if (dematerialize)
{
DataBufferHeap register_data (register_byte_size, 0);
- Error error;
- if (exe_ctx.process->ReadMemory (addr, register_data.GetBytes(), register_byte_size, error) != register_byte_size)
+ Error read_error;
+ if (exe_ctx.process->ReadMemory (addr, register_data.GetBytes(), register_byte_size, read_error) != register_byte_size)
{
- err.SetErrorStringWithFormat ("Couldn't read %s from the target: %s", reg_info.name, error.AsCString());
+ err.SetErrorStringWithFormat ("Couldn't read %s from the target: %s", reg_info.name, read_error.AsCString());
return false;
}
@@ -1801,7 +1799,7 @@
}
Error err;
- if (!var_location_expr.Evaluate(&exe_ctx, ast, NULL, loclist_base_load_addr, NULL, *var_location.get(), &err))
+ if (!var_location_expr.Evaluate(&exe_ctx, ast, NULL, NULL, NULL, loclist_base_load_addr, NULL, *var_location.get(), &err))
{
if (log)
log->Printf("Error evaluating location: %s", err.AsCString());
Modified: lldb/trunk/source/Expression/DWARFExpression.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Expression/DWARFExpression.cpp?rev=124250&r1=124249&r2=124250&view=diff
==============================================================================
--- lldb/trunk/source/Expression/DWARFExpression.cpp (original)
+++ lldb/trunk/source/Expression/DWARFExpression.cpp Tue Jan 25 17:55:37 2011
@@ -217,18 +217,14 @@
DWARFExpression::DWARFExpression() :
m_data(),
m_reg_kind (eRegisterKindDWARF),
- m_loclist_slide (LLDB_INVALID_ADDRESS),
- m_expr_locals (NULL),
- m_decl_map (NULL)
+ m_loclist_slide (LLDB_INVALID_ADDRESS)
{
}
DWARFExpression::DWARFExpression(const DWARFExpression& rhs) :
m_data(rhs.m_data),
m_reg_kind (rhs.m_reg_kind),
- m_loclist_slide(rhs.m_loclist_slide),
- m_expr_locals (rhs.m_expr_locals),
- m_decl_map (rhs.m_decl_map)
+ m_loclist_slide(rhs.m_loclist_slide)
{
}
@@ -236,9 +232,7 @@
DWARFExpression::DWARFExpression(const DataExtractor& data, uint32_t data_offset, uint32_t data_length) :
m_data(data, data_offset, data_length),
m_reg_kind (eRegisterKindDWARF),
- m_loclist_slide(LLDB_INVALID_ADDRESS),
- m_expr_locals (NULL),
- m_decl_map (NULL)
+ m_loclist_slide(LLDB_INVALID_ADDRESS)
{
}
@@ -256,19 +250,6 @@
return m_data.GetByteSize() > 0;
}
-
-void
-DWARFExpression::SetExpressionLocalVariableList (ClangExpressionVariableList *locals)
-{
- m_expr_locals = locals;
-}
-
-void
-DWARFExpression::SetExpressionDeclMap (ClangExpressionDeclMap *decl_map)
-{
- m_decl_map = decl_map;
-}
-
void
DWARFExpression::SetOpcodeData (const DataExtractor& data)
{
@@ -749,6 +730,8 @@
(
ExecutionContextScope *exe_scope,
clang::ASTContext *ast_context,
+ ClangExpressionVariableList *expr_locals,
+ ClangExpressionDeclMap *decl_map,
lldb::addr_t loclist_base_load_addr,
const Value* initial_value_ptr,
Value& result,
@@ -756,7 +739,7 @@
) const
{
ExecutionContext exe_ctx (exe_scope);
- return Evaluate(&exe_ctx, ast_context, NULL, loclist_base_load_addr, initial_value_ptr, result, error_ptr);
+ return Evaluate(&exe_ctx, ast_context, expr_locals, decl_map, NULL, loclist_base_load_addr, initial_value_ptr, result, error_ptr);
}
bool
@@ -764,6 +747,8 @@
(
ExecutionContext *exe_ctx,
clang::ASTContext *ast_context,
+ ClangExpressionVariableList *expr_locals,
+ ClangExpressionDeclMap *decl_map,
RegisterContext *reg_ctx,
lldb::addr_t loclist_base_load_addr,
const Value* initial_value_ptr,
@@ -809,7 +794,7 @@
if (length > 0 && lo_pc <= pc && pc < hi_pc)
{
- return DWARFExpression::Evaluate (exe_ctx, ast_context, m_data, m_expr_locals, m_decl_map, reg_ctx, offset, length, m_reg_kind, initial_value_ptr, result, error_ptr);
+ return DWARFExpression::Evaluate (exe_ctx, ast_context, expr_locals, decl_map, reg_ctx, m_data, offset, length, m_reg_kind, initial_value_ptr, result, error_ptr);
}
offset += length;
}
@@ -821,7 +806,7 @@
}
// Not a location list, just a single expression.
- return DWARFExpression::Evaluate (exe_ctx, ast_context, m_data, m_expr_locals, m_decl_map, reg_ctx, 0, m_data.GetByteSize(), m_reg_kind, initial_value_ptr, result, error_ptr);
+ return DWARFExpression::Evaluate (exe_ctx, ast_context, expr_locals, decl_map, reg_ctx, m_data, 0, m_data.GetByteSize(), m_reg_kind, initial_value_ptr, result, error_ptr);
}
@@ -831,10 +816,10 @@
(
ExecutionContext *exe_ctx,
clang::ASTContext *ast_context,
- const DataExtractor& opcodes,
ClangExpressionVariableList *expr_locals,
ClangExpressionDeclMap *decl_map,
RegisterContext *reg_ctx,
+ const DataExtractor& opcodes,
const uint32_t opcodes_offset,
const uint32_t opcodes_length,
const uint32_t reg_kind,
Modified: lldb/trunk/source/Expression/IRDynamicChecks.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Expression/IRDynamicChecks.cpp?rev=124250&r1=124249&r2=124250&view=diff
==============================================================================
--- lldb/trunk/source/Expression/IRDynamicChecks.cpp (original)
+++ lldb/trunk/source/Expression/IRDynamicChecks.cpp Tue Jan 25 17:55:37 2011
@@ -127,6 +127,10 @@
{
}
+ virtual~Instrumenter ()
+ {
+ }
+
//------------------------------------------------------------------
/// Inspect a function to find instructions to instrument
///
@@ -287,12 +291,16 @@
class ValidPointerChecker : public Instrumenter
{
public:
- ValidPointerChecker(llvm::Module &module,
- DynamicCheckerFunctions &checker_functions) :
+ ValidPointerChecker (llvm::Module &module,
+ DynamicCheckerFunctions &checker_functions) :
Instrumenter(module, checker_functions),
m_valid_pointer_check_func(NULL)
{
}
+
+ virtual ~ValidPointerChecker ()
+ {
+ }
private:
bool InstrumentInstruction(llvm::Instruction *inst)
{
@@ -356,6 +364,12 @@
m_objc_object_check_func(NULL)
{
}
+
+ virtual
+ ~ObjcObjectChecker ()
+ {
+ }
+
private:
bool InstrumentInstruction(llvm::Instruction *inst)
{
Modified: lldb/trunk/source/Interpreter/ScriptInterpreterPython.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Interpreter/ScriptInterpreterPython.cpp?rev=124250&r1=124249&r2=124250&view=diff
==============================================================================
--- lldb/trunk/source/Interpreter/ScriptInterpreterPython.cpp (original)
+++ lldb/trunk/source/Interpreter/ScriptInterpreterPython.cpp Tue Jan 25 17:55:37 2011
@@ -1293,7 +1293,6 @@
&& python_function_name[0] != '\0')
{
Thread *thread = context->exe_ctx.thread;
- Target *target = context->exe_ctx.target;
const StackFrameSP stop_frame_sp = thread->GetStackFrameSPForStackFramePtr (context->exe_ctx.frame);
BreakpointSP breakpoint_sp = target->GetBreakpointByID (break_id);
const BreakpointLocationSP bp_loc_sp = breakpoint_sp->FindLocationByID (break_loc_id);
Modified: lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCTrampolineHandler.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCTrampolineHandler.cpp?rev=124250&r1=124249&r2=124250&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCTrampolineHandler.cpp (original)
+++ lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCTrampolineHandler.cpp Tue Jan 25 17:55:37 2011
@@ -344,11 +344,10 @@
eSymbolTypeData);
if (trampoline_symbol != NULL)
{
- const Address &temp_address = trampoline_symbol->GetValue();
- if (!temp_address.IsValid())
+ if (!trampoline_symbol->GetValue().IsValid())
return false;
- m_trampoline_header = temp_address.GetLoadAddress(&target);
+ m_trampoline_header = trampoline_symbol->GetValue().GetLoadAddress(&target);
if (m_trampoline_header == LLDB_INVALID_ADDRESS)
return false;
@@ -358,11 +357,10 @@
eSymbolTypeCode);
if (changed_symbol != NULL)
{
- const Address &temp_address = changed_symbol->GetValue();
- if (!temp_address.IsValid())
+ if (!changed_symbol->GetValue().IsValid())
return false;
- lldb::addr_t changed_addr = temp_address.GetLoadAddress(&target);
+ lldb::addr_t changed_addr = changed_symbol->GetValue().GetLoadAddress(&target);
if (changed_addr != LLDB_INVALID_ADDRESS)
{
BreakpointSP trampolines_changed_bp_sp = target.CreateBreakpoint (changed_addr,
Modified: lldb/trunk/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp?rev=124250&r1=124249&r2=124250&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp (original)
+++ lldb/trunk/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp Tue Jan 25 17:55:37 2011
@@ -202,11 +202,11 @@
Symtab *
ObjectFileMachO::GetSymtab()
{
- lldb_private::Mutex::Locker locker(m_mutex);
+ lldb_private::Mutex::Locker symfile_locker(m_mutex);
if (m_symtab_ap.get() == NULL)
{
m_symtab_ap.reset(new Symtab(this));
- Mutex::Locker locker (m_symtab_ap->GetMutex());
+ Mutex::Locker symtab_locker (m_symtab_ap->GetMutex());
ParseSymtab (true);
}
return m_symtab_ap.get();
Modified: lldb/trunk/source/Plugins/Process/MacOSX-User/source/MacOSX/MachThreadContext_arm.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/MacOSX-User/source/MacOSX/MachThreadContext_arm.cpp?rev=124250&r1=124249&r2=124250&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/MacOSX-User/source/MacOSX/MachThreadContext_arm.cpp (original)
+++ lldb/trunk/source/Plugins/Process/MacOSX-User/source/MacOSX/MachThreadContext_arm.cpp Tue Jan 25 17:55:37 2011
@@ -133,7 +133,7 @@
void
MachThreadContext_arm::RefreshStateAfterStop ()
{
- EnableHardwareSingleStep (false) == KERN_SUCCESS;
+ EnableHardwareSingleStep (false);
}
#if defined (ENABLE_ARM_SINGLE_STEP)
Modified: lldb/trunk/source/Plugins/Process/MacOSX-User/source/ProcessMacOSXLog.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/MacOSX-User/source/ProcessMacOSXLog.cpp?rev=124250&r1=124249&r2=124250&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/MacOSX-User/source/ProcessMacOSXLog.cpp (original)
+++ lldb/trunk/source/Plugins/Process/MacOSX-User/source/ProcessMacOSXLog.cpp Tue Jan 25 17:55:37 2011
@@ -89,12 +89,10 @@
{
// Try see if there already is a log - that way we can reuse its settings.
// We could reuse the log in toto, but we don't know that the stream is the same.
- uint32_t flag_bits;
+ uint32_t flag_bits = 0;
LogSP log(GetLog ());
if (log)
flag_bits = log->GetMask().Get();
- else
- flag_bits = 0;
// Now make a new log with this stream if one was provided
if (log_stream_sp)
@@ -105,7 +103,6 @@
if (log)
{
- uint32_t flag_bits = 0;
bool got_unknown_category = false;
const size_t argc = args.GetArgumentCount();
for (size_t i=0; i<argc; ++i)
Modified: lldb/trunk/source/Plugins/Process/Utility/RegisterContextLLDB.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/Utility/RegisterContextLLDB.cpp?rev=124250&r1=124249&r2=124250&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/Utility/RegisterContextLLDB.cpp (original)
+++ lldb/trunk/source/Plugins/Process/Utility/RegisterContextLLDB.cpp Tue Jan 25 17:55:37 2011
@@ -1032,7 +1032,7 @@
ExecutionContext exe_ctx (&m_thread.GetProcess(), &m_thread, NULL);
Value result;
Error error;
- if (dwarfexpr.Evaluate (&exe_ctx, NULL, this, 0, NULL, result, &error))
+ if (dwarfexpr.Evaluate (&exe_ctx, NULL, NULL, NULL, this, 0, NULL, result, &error))
{
addr_t val;
val = result.GetScalar().ULongLong();
Modified: lldb/trunk/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp?rev=124250&r1=124249&r2=124250&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp (original)
+++ lldb/trunk/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp Tue Jan 25 17:55:37 2011
@@ -1098,13 +1098,13 @@
gdb_thread->SetName (thread_name.empty() ? thread_name.c_str() : NULL);
if (exc_type != 0)
{
- const size_t exc_data_count = exc_data.size();
+ const size_t exc_data_size = exc_data.size();
gdb_thread->SetStopInfo (StopInfoMachException::CreateStopReasonWithMachException (*thread_sp,
exc_type,
- exc_data_count,
- exc_data_count >= 1 ? exc_data[0] : 0,
- exc_data_count >= 2 ? exc_data[1] : 0));
+ exc_data_size,
+ exc_data_size >= 1 ? exc_data[0] : 0,
+ exc_data_size >= 2 ? exc_data[1] : 0));
}
else if (signo)
{
@@ -1230,7 +1230,7 @@
timeout_time.OffsetWithSeconds(5);
StateType state = WaitForStateChangedEventsPrivate (&timeout_time, stop_event_sp);
- const bool timed_out = state == eStateInvalid;
+ timed_out = state == eStateInvalid;
if (log)
log->Printf ("ProcessGDBRemote::InterruptIfRunning() catch stop event: state = %s, timed-out=%i", StateAsCString(state), timed_out);
Modified: lldb/trunk/source/Plugins/Process/gdb-remote/ProcessGDBRemoteLog.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/gdb-remote/ProcessGDBRemoteLog.cpp?rev=124250&r1=124249&r2=124250&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/gdb-remote/ProcessGDBRemoteLog.cpp (original)
+++ lldb/trunk/source/Plugins/Process/gdb-remote/ProcessGDBRemoteLog.cpp Tue Jan 25 17:55:37 2011
@@ -96,12 +96,10 @@
{
// Try see if there already is a log - that way we can reuse its settings.
// We could reuse the log in toto, but we don't know that the stream is the same.
- uint32_t flag_bits;
+ uint32_t flag_bits = 0;
LogSP log(GetLog ());
if (log)
flag_bits = log->GetMask().Get();
- else
- flag_bits = 0;
// Now make a new log with this stream if one was provided
if (log_stream_sp)
@@ -112,7 +110,6 @@
if (log)
{
- uint32_t flag_bits = 0;
bool got_unknown_category = false;
const size_t argc = args.GetArgumentCount();
for (size_t i=0; i<argc; ++i)
Modified: lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFCompileUnit.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFCompileUnit.cpp?rev=124250&r1=124249&r2=124250&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFCompileUnit.cpp (original)
+++ lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFCompileUnit.cpp Tue Jan 25 17:55:37 2011
@@ -639,11 +639,9 @@
const size_t num_attributes = die.GetAttributes(m_dwarf2Data, this, fixed_form_sizes, attributes);
if (num_attributes > 0)
{
- uint32_t i;
-
is_variable = tag == DW_TAG_variable;
- for (i=0; i<num_attributes; ++i)
+ for (uint32_t i=0; i<num_attributes; ++i)
{
dw_attr_t attr = attributes.AttributeAtIndex(i);
DWARFFormValue form_value;
@@ -767,7 +765,7 @@
}
else
{
- for (size_t i=0, num_ranges = ranges.Size(); i<num_ranges; ++i)
+ for (uint32_t i=0, num_ranges = ranges.Size(); i<num_ranges; ++i)
{
const DWARFDebugRanges::Range *range = ranges.RangeAtIndex (i);
aranges->AppendRange (m_offset, range->begin_offset, range->end_offset);
Modified: lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp?rev=124250&r1=124249&r2=124250&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp (original)
+++ lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp Tue Jan 25 17:55:37 2011
@@ -1272,10 +1272,10 @@
uint32_t block_offset = form_value.BlockData() - debug_info_data.GetDataStart();
if (DWARFExpression::Evaluate (NULL,
NULL,
- debug_info_data,
NULL,
NULL,
NULL,
+ debug_info_data,
block_offset,
block_length,
eRegisterKindDWARF,
@@ -2882,14 +2882,14 @@
// DIE and we want to try and find a type that has the complete definition.
TypeSP
SymbolFileDWARF::FindDefinitionTypeForDIE (
- DWARFCompileUnit* curr_cu,
+ DWARFCompileUnit* cu,
const DWARFDebugInfoEntry *die,
const ConstString &type_name
)
{
TypeSP type_sp;
- if (curr_cu == NULL || die == NULL || !type_name)
+ if (cu == NULL || die == NULL || !type_name)
return type_sp;
if (!m_indexed)
@@ -2901,7 +2901,7 @@
if (num_matches > 0)
{
DWARFCompileUnit* type_cu = NULL;
- DWARFCompileUnit* curr_cu = curr_cu;
+ DWARFCompileUnit* curr_cu = cu;
DWARFDebugInfo *info = DebugInfo();
for (size_t i=0; i<num_matches; ++i)
{
@@ -3362,8 +3362,8 @@
ast.StartTagDeclarationDefinition (clang_type);
if (die->HasChildren())
{
- SymbolContext sc(GetCompUnitForDWARFCompUnit(dwarf_cu));
- ParseChildEnumerators(sc, clang_type, type_sp->GetByteSize(), dwarf_cu, die);
+ SymbolContext cu_sc(GetCompUnitForDWARFCompUnit(dwarf_cu));
+ ParseChildEnumerators(cu_sc, clang_type, type_sp->GetByteSize(), dwarf_cu, die);
}
ast.CompleteTagDeclarationDefinition (clang_type);
#endif
@@ -3396,7 +3396,7 @@
uint32_t i;
for (i=0; i<num_attributes; ++i)
{
- const dw_attr_t attr = attributes.AttributeAtIndex(i);
+ attr = attributes.AttributeAtIndex(i);
DWARFFormValue form_value;
if (attributes.ExtractFormValueAtIndex(this, i, form_value))
{
Modified: lldb/trunk/source/Symbol/ClangASTContext.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Symbol/ClangASTContext.cpp?rev=124250&r1=124249&r2=124250&view=diff
==============================================================================
--- lldb/trunk/source/Symbol/ClangASTContext.cpp (original)
+++ lldb/trunk/source/Symbol/ClangASTContext.cpp Tue Jan 25 17:55:37 2011
@@ -3909,7 +3909,7 @@
return NULL;
}
-size_t
+uint32_t
ClangASTContext::GetPointerBitSize ()
{
ASTContext *ast = getASTContext();
Modified: lldb/trunk/source/Symbol/ClangASTType.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Symbol/ClangASTType.cpp?rev=124250&r1=124249&r2=124250&view=diff
==============================================================================
--- lldb/trunk/source/Symbol/ClangASTType.cpp (original)
+++ lldb/trunk/source/Symbol/ClangASTType.cpp Tue Jan 25 17:55:37 2011
@@ -859,13 +859,13 @@
}
}
-uint64_t
+uint32_t
ClangASTType::GetClangTypeBitWidth ()
{
return GetClangTypeBitWidth (m_ast, m_type);
}
-uint64_t
+uint32_t
ClangASTType::GetClangTypeBitWidth (clang::ASTContext *ast_context, clang_type_t clang_type)
{
if (ast_context && clang_type)
Modified: lldb/trunk/source/Symbol/Type.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Symbol/Type.cpp?rev=124250&r1=124249&r2=124250&view=diff
==============================================================================
--- lldb/trunk/source/Symbol/Type.cpp (original)
+++ lldb/trunk/source/Symbol/Type.cpp Tue Jan 25 17:55:37 2011
@@ -27,16 +27,17 @@
#include "lldb/Target/Process.h"
using namespace lldb;
+using namespace lldb_private;
-lldb_private::Type::Type
+Type::Type
(
lldb::user_id_t uid,
SymbolFile* symbol_file,
const ConstString &name,
uint32_t byte_size,
SymbolContextScope *context,
- uintptr_t encoding_data,
- EncodingDataType encoding_data_type,
+ user_id_t encoding_uid,
+ EncodingDataType encoding_uid_type,
const Declaration& decl,
clang_type_t clang_type,
ResolveState clang_type_resolve_state
@@ -46,8 +47,8 @@
m_symbol_file (symbol_file),
m_context (context),
m_encoding_type (NULL),
- m_encoding_uid_type (encoding_data_type),
- m_encoding_uid (encoding_data),
+ m_encoding_uid (encoding_uid),
+ m_encoding_uid_type (encoding_uid_type),
m_byte_size (byte_size),
m_decl (decl),
m_clang_type (clang_type),
@@ -55,7 +56,7 @@
{
}
-lldb_private::Type::Type () :
+Type::Type () :
UserID (0),
m_name ("<INVALID TYPE>"),
m_symbol_file (NULL),
@@ -71,29 +72,33 @@
}
-const lldb_private::Type&
-lldb_private::Type::operator= (const Type& rhs)
+Type::Type (const Type &rhs) :
+ UserID (rhs),
+ m_name (rhs.m_name),
+ m_symbol_file (rhs.m_symbol_file),
+ m_context (rhs.m_context),
+ m_encoding_type (rhs.m_encoding_type),
+ m_encoding_uid_type (rhs.m_encoding_uid_type),
+ m_encoding_uid (rhs.m_encoding_uid),
+ m_byte_size (rhs.m_byte_size),
+ m_decl (rhs.m_decl),
+ m_clang_type (rhs.m_clang_type),
+ m_clang_type_resolve_state (rhs.m_clang_type_resolve_state)
+{
+}
+
+const Type&
+Type::operator= (const Type& rhs)
{
if (this != &rhs)
{
- UserID::operator= (rhs);
- m_name = rhs.m_name;
- m_symbol_file = rhs.m_symbol_file;
- m_context = rhs.m_context;
- m_encoding_type = rhs.m_encoding_type;
- m_encoding_uid_type = rhs.m_encoding_uid_type;
- m_encoding_uid = rhs.m_encoding_uid;
- m_byte_size = rhs.m_byte_size;
- m_decl = rhs.m_decl;
- m_clang_type = rhs.m_clang_type;
- m_clang_type_resolve_state = rhs.m_clang_type_resolve_state;
}
return *this;
}
void
-lldb_private::Type::GetDescription (Stream *s, lldb::DescriptionLevel level, bool show_name)
+Type::GetDescription (Stream *s, lldb::DescriptionLevel level, bool show_name)
{
*s << "id = " << (const UserID&)*this;
@@ -133,7 +138,7 @@
void
-lldb_private::Type::Dump (Stream *s, bool show_context)
+Type::Dump (Stream *s, bool show_context)
{
s->Printf("%.*p: ", (int)sizeof(void*) * 2, this);
s->Indent();
@@ -183,8 +188,8 @@
s->EOL();
}
-const lldb_private::ConstString &
-lldb_private::Type::GetName()
+const ConstString &
+Type::GetName()
{
if (!(m_name))
{
@@ -199,18 +204,18 @@
}
void
-lldb_private::Type::DumpTypeName(Stream *s)
+Type::DumpTypeName(Stream *s)
{
GetName().Dump(s, "<invalid-type-name>");
}
void
-lldb_private::Type::DumpValue
+Type::DumpValue
(
- lldb_private::ExecutionContext *exe_ctx,
- lldb_private::Stream *s,
- const lldb_private::DataExtractor &data,
+ ExecutionContext *exe_ctx,
+ Stream *s,
+ const DataExtractor &data,
uint32_t data_byte_offset,
bool show_types,
bool show_summary,
@@ -229,7 +234,7 @@
s->PutCString(") ");
}
- lldb_private::ClangASTType::DumpValue (GetClangAST (),
+ ClangASTType::DumpValue (GetClangAST (),
m_clang_type,
exe_ctx,
s,
@@ -246,8 +251,8 @@
}
}
-lldb_private::Type *
-lldb_private::Type::GetEncodingType ()
+Type *
+Type::GetEncodingType ()
{
if (m_encoding_type == NULL && m_encoding_uid != LLDB_INVALID_UID)
m_encoding_type = m_symbol_file->ResolveTypeUID(m_encoding_uid);
@@ -256,8 +261,8 @@
-uint64_t
-lldb_private::Type::GetByteSize()
+uint32_t
+Type::GetByteSize()
{
if (m_byte_size == 0)
{
@@ -274,7 +279,7 @@
m_byte_size = encoding_type->GetByteSize();
if (m_byte_size == 0)
{
- uint64_t bit_width = ClangASTType::GetClangTypeBitWidth (GetClangAST(), GetClangLayoutType());
+ uint32_t bit_width = ClangASTType::GetClangTypeBitWidth (GetClangAST(), GetClangLayoutType());
m_byte_size = (bit_width + 7 ) / 8;
}
}
@@ -293,7 +298,7 @@
uint32_t
-lldb_private::Type::GetNumChildren (bool omit_empty_base_classes)
+Type::GetNumChildren (bool omit_empty_base_classes)
{
if (ResolveClangType(eResolveStateForward))
{
@@ -305,7 +310,7 @@
}
bool
-lldb_private::Type::IsAggregateType ()
+Type::IsAggregateType ()
{
if (ResolveClangType(eResolveStateForward))
return ClangASTContext::IsAggregateType (m_clang_type);
@@ -313,33 +318,33 @@
}
lldb::Format
-lldb_private::Type::GetFormat ()
+Type::GetFormat ()
{
// Make sure we resolve our type if it already hasn't been.
if (!ResolveClangType(eResolveStateForward))
return lldb::eFormatInvalid;
- return lldb_private::ClangASTType::GetFormat (m_clang_type);
+ return ClangASTType::GetFormat (m_clang_type);
}
lldb::Encoding
-lldb_private::Type::GetEncoding (uint32_t &count)
+Type::GetEncoding (uint32_t &count)
{
// Make sure we resolve our type if it already hasn't been.
if (!ResolveClangType(eResolveStateForward))
return lldb::eEncodingInvalid;
- return lldb_private::ClangASTType::GetEncoding (m_clang_type, count);
+ return ClangASTType::GetEncoding (m_clang_type, count);
}
bool
-lldb_private::Type::DumpValueInMemory
+Type::DumpValueInMemory
(
- lldb_private::ExecutionContext *exe_ctx,
- lldb_private::Stream *s,
+ ExecutionContext *exe_ctx,
+ Stream *s,
lldb::addr_t address,
lldb::AddressType address_type,
bool show_types,
@@ -349,7 +354,7 @@
{
if (address != LLDB_INVALID_ADDRESS)
{
- lldb_private::DataExtractor data;
+ DataExtractor data;
data.SetByteOrder (exe_ctx->process->GetByteOrder());
if (ReadFromMemory (exe_ctx, address, address_type, data))
{
@@ -362,7 +367,7 @@
bool
-lldb_private::Type::ReadFromMemory (lldb_private::ExecutionContext *exe_ctx, lldb::addr_t addr, lldb::AddressType address_type, lldb_private::DataExtractor &data)
+Type::ReadFromMemory (ExecutionContext *exe_ctx, lldb::addr_t addr, lldb::AddressType address_type, DataExtractor &data)
{
if (address_type == lldb::eAddressTypeFile)
{
@@ -401,26 +406,26 @@
bool
-lldb_private::Type::WriteToMemory (lldb_private::ExecutionContext *exe_ctx, lldb::addr_t addr, lldb::AddressType address_type, lldb_private::DataExtractor &data)
+Type::WriteToMemory (ExecutionContext *exe_ctx, lldb::addr_t addr, lldb::AddressType address_type, DataExtractor &data)
{
return false;
}
-lldb_private::TypeList*
-lldb_private::Type::GetTypeList()
+TypeList*
+Type::GetTypeList()
{
return GetSymbolFile()->GetTypeList();
}
-const lldb_private::Declaration &
-lldb_private::Type::GetDeclaration () const
+const Declaration &
+Type::GetDeclaration () const
{
return m_decl;
}
bool
-lldb_private::Type::ResolveClangType (ResolveState clang_type_resolve_state)
+Type::ResolveClangType (ResolveState clang_type_resolve_state)
{
Type *encoding_type = NULL;
if (m_clang_type == NULL)
@@ -560,7 +565,7 @@
return m_clang_type != NULL;
}
uint32_t
-lldb_private::Type::GetEncodingMask ()
+Type::GetEncodingMask ()
{
uint32_t encoding_mask = 1u << m_encoding_uid_type;
Type *encoding_type = GetEncodingType();
@@ -571,40 +576,40 @@
}
clang_type_t
-lldb_private::Type::GetClangType ()
+Type::GetClangType ()
{
ResolveClangType(eResolveStateFull);
return m_clang_type;
}
clang_type_t
-lldb_private::Type::GetClangLayoutType ()
+Type::GetClangLayoutType ()
{
ResolveClangType(eResolveStateLayout);
return m_clang_type;
}
clang_type_t
-lldb_private::Type::GetClangForwardType ()
+Type::GetClangForwardType ()
{
ResolveClangType (eResolveStateForward);
return m_clang_type;
}
clang::ASTContext *
-lldb_private::Type::GetClangAST ()
+Type::GetClangAST ()
{
return GetClangASTContext().getASTContext();
}
-lldb_private::ClangASTContext &
-lldb_private::Type::GetClangASTContext ()
+ClangASTContext &
+Type::GetClangASTContext ()
{
return m_symbol_file->GetClangASTContext();
}
int
-lldb_private::Type::Compare(const Type &a, const Type &b)
+Type::Compare(const Type &a, const Type &b)
{
// Just compare the UID values for now...
lldb::user_id_t a_uid = a.GetID();
@@ -620,14 +625,14 @@
void *
-lldb_private::Type::CreateClangPointerType (lldb_private::Type *type)
+Type::CreateClangPointerType (Type *type)
{
assert(type);
return GetClangASTContext().CreatePointerType(type->GetClangForwardType());
}
void *
-lldb_private::Type::CreateClangTypedefType (lldb_private::Type *typedef_type, lldb_private::Type *base_type)
+Type::CreateClangTypedefType (Type *typedef_type, Type *base_type)
{
assert(typedef_type && base_type);
return GetClangASTContext().CreateTypedefType (typedef_type->GetName().AsCString(),
@@ -636,14 +641,14 @@
}
void *
-lldb_private::Type::CreateClangLValueReferenceType (lldb_private::Type *type)
+Type::CreateClangLValueReferenceType (Type *type)
{
assert(type);
return GetClangASTContext().CreateLValueReferenceType(type->GetClangForwardType());
}
void *
-lldb_private::Type::CreateClangRValueReferenceType (lldb_private::Type *type)
+Type::CreateClangRValueReferenceType (Type *type)
{
assert(type);
return GetClangASTContext().CreateRValueReferenceType (type->GetClangForwardType());
Modified: lldb/trunk/source/Target/StackFrame.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Target/StackFrame.cpp?rev=124250&r1=124249&r2=124250&view=diff
==============================================================================
--- lldb/trunk/source/Target/StackFrame.cpp (original)
+++ lldb/trunk/source/Target/StackFrame.cpp Tue Jan 25 17:55:37 2011
@@ -48,9 +48,9 @@
lldb::addr_t pc,
const SymbolContext *sc_ptr
) :
+ m_thread (thread),
m_frame_index (frame_idx),
m_concrete_frame_index (unwind_frame_index),
- m_thread (thread),
m_reg_context_sp (),
m_id (pc, cfa, NULL),
m_frame_code_addr (NULL, pc),
@@ -59,7 +59,8 @@
m_frame_base (),
m_frame_base_error (),
m_variable_list_sp (),
- m_variable_list_value_objects ()
+ m_variable_list_value_objects (),
+ m_disassembly ()
{
if (sc_ptr != NULL)
{
@@ -78,9 +79,9 @@
lldb::addr_t pc,
const SymbolContext *sc_ptr
) :
+ m_thread (thread),
m_frame_index (frame_idx),
m_concrete_frame_index (unwind_frame_index),
- m_thread (thread),
m_reg_context_sp (reg_context_sp),
m_id (pc, cfa, NULL),
m_frame_code_addr (NULL, pc),
@@ -89,7 +90,8 @@
m_frame_base (),
m_frame_base_error (),
m_variable_list_sp (),
- m_variable_list_value_objects ()
+ m_variable_list_value_objects (),
+ m_disassembly ()
{
if (sc_ptr != NULL)
{
@@ -114,9 +116,9 @@
const Address& pc_addr,
const SymbolContext *sc_ptr
) :
+ m_thread (thread),
m_frame_index (frame_idx),
m_concrete_frame_index (unwind_frame_index),
- m_thread (thread),
m_reg_context_sp (reg_context_sp),
m_id (pc_addr.GetLoadAddress (&thread.GetProcess().GetTarget()), cfa, NULL),
m_frame_code_addr (pc_addr),
@@ -125,7 +127,8 @@
m_frame_base (),
m_frame_base_error (),
m_variable_list_sp (),
- m_variable_list_value_objects ()
+ m_variable_list_value_objects (),
+ m_disassembly ()
{
if (sc_ptr != NULL)
{
@@ -626,7 +629,7 @@
if (var_path.size() > 2) // Need at least two brackets and a number
{
char *end = NULL;
- int32_t child_index = ::strtol (&var_path[1], &end, 0);
+ long child_index = ::strtol (&var_path[1], &end, 0);
if (end && *end == ']')
{
@@ -745,7 +748,7 @@
if (m_sc.function->GetFrameBaseExpression().IsLocationList())
loclist_base_addr = m_sc.function->GetAddressRange().GetBaseAddress().GetLoadAddress (&m_thread.GetProcess().GetTarget());
- if (m_sc.function->GetFrameBaseExpression().Evaluate(&exe_ctx, NULL, NULL, loclist_base_addr, NULL, expr_value, &m_frame_base_error) == false)
+ if (m_sc.function->GetFrameBaseExpression().Evaluate(&exe_ctx, NULL, NULL, NULL, NULL, loclist_base_addr, NULL, expr_value, &m_frame_base_error) == false)
{
// We should really have an error if evaluate returns, but in case
// we don't, lets set the error to something at least.
@@ -963,4 +966,4 @@
StackFrame::GetSP ()
{
return m_thread.GetStackFrameSPForStackFramePtr (this);
-}
\ No newline at end of file
+}
Modified: lldb/trunk/source/Target/Thread.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Target/Thread.cpp?rev=124250&r1=124249&r2=124250&view=diff
==============================================================================
--- lldb/trunk/source/Target/Thread.cpp (original)
+++ lldb/trunk/source/Target/Thread.cpp Tue Jan 25 17:55:37 2011
@@ -844,7 +844,7 @@
stack_size = m_discarded_plan_stack.size();
s->Printf ("Discarded Plan Stack: %d elements.\n", stack_size);
- for (int i = stack_size - 1; i >= 0; i--)
+ for (i = stack_size - 1; i >= 0; i--)
{
s->Printf ("Element %d: ", i);
s->IndentMore();
Modified: lldb/trunk/source/Target/ThreadPlanShouldStopHere.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Target/ThreadPlanShouldStopHere.cpp?rev=124250&r1=124249&r2=124250&view=diff
==============================================================================
--- lldb/trunk/source/Target/ThreadPlanShouldStopHere.cpp (original)
+++ lldb/trunk/source/Target/ThreadPlanShouldStopHere.cpp Tue Jan 25 17:55:37 2011
@@ -50,4 +50,4 @@
return m_callback (m_owner, m_flags, m_baton);
else
return NULL;
-}
\ No newline at end of file
+}
Modified: lldb/trunk/tools/debugserver/debugserver.xcodeproj/project.pbxproj
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/tools/debugserver/debugserver.xcodeproj/project.pbxproj?rev=124250&r1=124249&r2=124250&view=diff
==============================================================================
--- lldb/trunk/tools/debugserver/debugserver.xcodeproj/project.pbxproj (original)
+++ lldb/trunk/tools/debugserver/debugserver.xcodeproj/project.pbxproj Tue Jan 25 17:55:37 2011
@@ -372,6 +372,7 @@
isa = PBXProject;
buildConfigurationList = 1DEB914E08733D8E0010E9CD /* Build configuration list for PBXProject "debugserver" */;
compatibilityVersion = "Xcode 3.1";
+ developmentRegion = English;
hasScannedForEncodings = 1;
knownRegions = (
English,
More information about the lldb-commits
mailing list