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