diff options
Diffstat (limited to 'lldb/source/Plugins/LanguageRuntime/ObjC')
6 files changed, 42 insertions, 40 deletions
diff --git a/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntime.h b/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntime.h index d9dd5a69be9..7eaf5ac04d4 100644 --- a/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntime.h +++ b/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntime.h @@ -104,17 +104,19 @@ protected: Address * GetPrintForDebuggerAddr(); - std::auto_ptr<Address> m_PrintForDebugger_addr; + STD_UNIQUE_PTR(Address) m_PrintForDebugger_addr; bool m_read_objc_library; - std::auto_ptr<lldb_private::AppleObjCTrampolineHandler> m_objc_trampoline_handler_ap; + STD_UNIQUE_PTR(lldb_private::AppleObjCTrampolineHandler) m_objc_trampoline_handler_ap; lldb::BreakpointSP m_objc_exception_bp_sp; lldb::ModuleWP m_objc_module_wp; AppleObjCRuntime(Process *process) : lldb_private::ObjCLanguageRuntime(process), m_read_objc_library (false), - m_objc_trampoline_handler_ap(NULL) - { } // Call CreateInstance instead. + m_objc_trampoline_handler_ap () + { + // Call CreateInstance instead. + } }; } // namespace lldb_private diff --git a/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV1.cpp b/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV1.cpp index 944cc3507ac..ca239db43bb 100644 --- a/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV1.cpp +++ b/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV1.cpp @@ -150,7 +150,7 @@ struct BufStruct { ClangUtilityFunction * AppleObjCRuntimeV1::CreateObjectChecker(const char *name) { - std::auto_ptr<BufStruct> buf(new BufStruct); + STD_UNIQUE_PTR(BufStruct) buf(new BufStruct); assert(snprintf(&buf->contents[0], sizeof(buf->contents), "struct __objc_class \n" diff --git a/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV1.h b/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV1.h index 419bae998b2..e84f5ff42ec 100644 --- a/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV1.h +++ b/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV1.h @@ -184,7 +184,7 @@ protected: HashTableSignature m_hash_signature; lldb::addr_t m_isa_hash_table_ptr; - std::auto_ptr<TypeVendor> m_type_vendor_ap; + STD_UNIQUE_PTR(TypeVendor) m_type_vendor_ap; private: AppleObjCRuntimeV1(Process *process); }; diff --git a/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp b/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp index 31916937c0b..7ab38f91770 100644 --- a/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp +++ b/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp @@ -11,7 +11,6 @@ #include <string> #include <vector> -#include <memory> #include <stdint.h> #include "lldb/lldb-enumerations.h" @@ -309,6 +308,10 @@ AppleObjCRuntimeV2::AppleObjCRuntimeV2 (Process *process, m_has_object_getClass = (objc_module_sp->FindFirstSymbolWithNameAndType(g_gdb_object_getClass, eSymbolTypeCode) != NULL); } +AppleObjCRuntimeV2::~AppleObjCRuntimeV2() +{ +} + bool AppleObjCRuntimeV2::GetDynamicTypeAndAddress (ValueObject &in_value, DynamicValueType use_dynamic, @@ -817,9 +820,9 @@ public: if (process) { - std::auto_ptr<objc_class_t> objc_class; - std::auto_ptr<class_ro_t> class_ro; - std::auto_ptr<class_rw_t> class_rw; + STD_UNIQUE_PTR(objc_class_t) objc_class; + STD_UNIQUE_PTR(class_ro_t) class_ro; + STD_UNIQUE_PTR(class_rw_t) class_rw; if (!Read_objc_class(process, objc_class)) return m_name; @@ -840,7 +843,7 @@ public: if (!process) return ObjCLanguageRuntime::ClassDescriptorSP(); - std::auto_ptr<objc_class_t> objc_class; + STD_UNIQUE_PTR(objc_class_t) objc_class; if (!Read_objc_class(process, objc_class)) return ObjCLanguageRuntime::ClassDescriptorSP(); @@ -869,9 +872,9 @@ public: if (process) { - std::auto_ptr<objc_class_t> objc_class; - std::auto_ptr<class_ro_t> class_ro; - std::auto_ptr<class_rw_t> class_rw; + STD_UNIQUE_PTR(objc_class_t) objc_class; + STD_UNIQUE_PTR(class_ro_t) class_ro; + STD_UNIQUE_PTR(class_rw_t) class_rw; if (!Read_objc_class(process, objc_class)) return 0; @@ -898,9 +901,9 @@ public: { lldb_private::Process *process = m_runtime.GetProcess(); - std::auto_ptr<objc_class_t> objc_class; - std::auto_ptr<class_ro_t> class_ro; - std::auto_ptr<class_rw_t> class_rw; + STD_UNIQUE_PTR(objc_class_t) objc_class; + STD_UNIQUE_PTR(class_ro_t) class_ro; + STD_UNIQUE_PTR(class_rw_t) class_rw; if (!Read_objc_class(process, objc_class)) return 0; @@ -914,7 +917,7 @@ public: if (instance_method_func) { - std::auto_ptr <method_list_t> base_method_list; + STD_UNIQUE_PTR(method_list_t) base_method_list; base_method_list.reset(new method_list_t); if (!base_method_list->Read(process, class_ro->m_baseMethods_ptr)) @@ -923,7 +926,7 @@ public: if (base_method_list->m_entsize != method_t::GetSize(process)) return false; - std::auto_ptr <method_t> method; + STD_UNIQUE_PTR(method_t) method; method.reset(new method_t); for (uint32_t i = 0, e = base_method_list->m_count; i < e; ++i) @@ -950,23 +953,20 @@ public: if (ivar_func) { - std::auto_ptr <ivar_list_t> ivar_list; - - ivar_list.reset(new ivar_list_t); - if (!ivar_list->Read(process, class_ro->m_ivars_ptr)) + ivar_list_t ivar_list; + if (!ivar_list.Read(process, class_ro->m_ivars_ptr)) return false; - if (ivar_list->m_entsize != ivar_t::GetSize(process)) + if (ivar_list.m_entsize != ivar_t::GetSize(process)) return false; - std::auto_ptr <ivar_t> ivar; - ivar.reset(new ivar_t); + ivar_t ivar; - for (uint32_t i = 0, e = ivar_list->m_count; i < e; ++i) + for (uint32_t i = 0, e = ivar_list.m_count; i < e; ++i) { - ivar->Read(process, ivar_list->m_first_ptr + (i * ivar_list->m_entsize)); + ivar.Read(process, ivar_list.m_first_ptr + (i * ivar_list.m_entsize)); - if (ivar_func(ivar->m_name.c_str(), ivar->m_type.c_str(), ivar->m_offset_ptr, ivar->m_size)) + if (ivar_func(ivar.m_name.c_str(), ivar.m_type.c_str(), ivar.m_offset_ptr, ivar.m_size)) break; } } @@ -1354,7 +1354,7 @@ private: } }; - bool Read_objc_class (Process* process, std::auto_ptr<objc_class_t> &objc_class) + bool Read_objc_class (Process* process, STD_UNIQUE_PTR(objc_class_t) &objc_class) { objc_class.reset(new objc_class_t); @@ -1366,7 +1366,7 @@ private: return ret; } - bool Read_class_row (Process* process, const objc_class_t &objc_class, std::auto_ptr<class_ro_t> &class_ro, std::auto_ptr<class_rw_t> &class_rw) + bool Read_class_row (Process* process, const objc_class_t &objc_class, STD_UNIQUE_PTR(class_ro_t) &class_ro, STD_UNIQUE_PTR(class_rw_t) &class_rw) { class_ro.reset(); class_rw.reset(); diff --git a/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.h b/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.h index 8e801249d02..07a38fe7d75 100644 --- a/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.h +++ b/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.h @@ -29,7 +29,7 @@ class AppleObjCRuntimeV2 : public AppleObjCRuntime { public: - virtual ~AppleObjCRuntimeV2() { } + virtual ~AppleObjCRuntimeV2(); // These are generic runtime functions: virtual bool @@ -150,17 +150,17 @@ private: lldb::addr_t GetSharedCacheReadOnlyAddress(); - std::auto_ptr<ClangFunction> m_get_class_info_function; - std::auto_ptr<ClangUtilityFunction> m_get_class_info_code; + STD_UNIQUE_PTR(ClangFunction) m_get_class_info_function; + STD_UNIQUE_PTR(ClangUtilityFunction) m_get_class_info_code; lldb::addr_t m_get_class_info_args; Mutex m_get_class_info_args_mutex; - std::auto_ptr<ClangFunction> m_get_shared_cache_class_info_function; - std::auto_ptr<ClangUtilityFunction> m_get_shared_cache_class_info_code; + STD_UNIQUE_PTR(ClangFunction) m_get_shared_cache_class_info_function; + STD_UNIQUE_PTR(ClangUtilityFunction) m_get_shared_cache_class_info_code; lldb::addr_t m_get_shared_cache_class_info_args; Mutex m_get_shared_cache_class_info_args_mutex; - std::auto_ptr<TypeVendor> m_type_vendor_ap; + STD_UNIQUE_PTR(TypeVendor) m_type_vendor_ap; lldb::addr_t m_isa_hash_table_ptr; HashTableSignature m_hash_signature; bool m_has_object_getClass; diff --git a/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCTrampolineHandler.h b/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCTrampolineHandler.h index a50651431e7..0ee4d48d30c 100644 --- a/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCTrampolineHandler.h +++ b/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCTrampolineHandler.h @@ -197,14 +197,14 @@ private: MsgsendMap m_msgSend_map; lldb::ProcessSP m_process_sp; lldb::ModuleSP m_objc_module_sp; - std::auto_ptr<ClangFunction> m_impl_function; - std::auto_ptr<ClangUtilityFunction> m_impl_code; + STD_UNIQUE_PTR(ClangFunction) m_impl_function; + STD_UNIQUE_PTR(ClangUtilityFunction) m_impl_code; Mutex m_impl_function_mutex; lldb::addr_t m_impl_fn_addr; lldb::addr_t m_impl_stret_fn_addr; lldb::addr_t m_msg_forward_addr; lldb::addr_t m_msg_forward_stret_addr; - std::auto_ptr<AppleObjCVTables> m_vtables_ap; + STD_UNIQUE_PTR(AppleObjCVTables) m_vtables_ap; }; |