summaryrefslogtreecommitdiffstats
path: root/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV1.h
diff options
context:
space:
mode:
authorKate Stone <katherine.stone@apple.com>2016-09-06 20:57:50 +0000
committerKate Stone <katherine.stone@apple.com>2016-09-06 20:57:50 +0000
commitb9c1b51e45b845debb76d8658edabca70ca56079 (patch)
treedfcb5a13ef2b014202340f47036da383eaee74aa /lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV1.h
parentd5aa73376966339caad04013510626ec2e42c760 (diff)
downloadbcm5719-llvm-b9c1b51e45b845debb76d8658edabca70ca56079.tar.gz
bcm5719-llvm-b9c1b51e45b845debb76d8658edabca70ca56079.zip
*** This commit represents a complete reformatting of the LLDB source code
*** to conform to clang-format’s LLVM style. This kind of mass change has *** two obvious implications: Firstly, merging this particular commit into a downstream fork may be a huge effort. Alternatively, it may be worth merging all changes up to this commit, performing the same reformatting operation locally, and then discarding the merge for this particular commit. The commands used to accomplish this reformatting were as follows (with current working directory as the root of the repository): find . \( -iname "*.c" -or -iname "*.cpp" -or -iname "*.h" -or -iname "*.mm" \) -exec clang-format -i {} + find . -iname "*.py" -exec autopep8 --in-place --aggressive --aggressive {} + ; The version of clang-format used was 3.9.0, and autopep8 was 1.2.4. Secondly, “blame” style tools will generally point to this commit instead of a meaningful prior commit. There are alternatives available that will attempt to look through this change and find the appropriate prior commit. YMMV. llvm-svn: 280751
Diffstat (limited to 'lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV1.h')
-rw-r--r--lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV1.h308
1 files changed, 131 insertions, 177 deletions
diff --git a/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV1.h b/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV1.h
index 9f9fcc69b68..3dddf1b094e 100644
--- a/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV1.h
+++ b/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV1.h
@@ -14,194 +14,148 @@
// C++ Includes
// Other libraries and framework includes
// Project includes
-#include "lldb/lldb-private.h"
-#include "lldb/Target/ObjCLanguageRuntime.h"
#include "AppleObjCRuntime.h"
+#include "lldb/Target/ObjCLanguageRuntime.h"
+#include "lldb/lldb-private.h"
namespace lldb_private {
-
-class AppleObjCRuntimeV1 :
- public AppleObjCRuntime
-{
+
+class AppleObjCRuntimeV1 : public AppleObjCRuntime {
public:
- ~AppleObjCRuntimeV1() override = default;
-
- //------------------------------------------------------------------
- // Static Functions
- //------------------------------------------------------------------
- static void
- Initialize();
-
- static void
- Terminate();
-
- static lldb_private::LanguageRuntime *
- CreateInstance(Process *process, lldb::LanguageType language);
-
- static lldb_private::ConstString
- GetPluginNameStatic();
-
- static bool classof(const ObjCLanguageRuntime* runtime)
- {
- switch (runtime->GetRuntimeVersion())
- {
- case ObjCRuntimeVersions::eAppleObjC_V1:
- return true;
- default:
- return false;
- }
+ ~AppleObjCRuntimeV1() override = default;
+
+ //------------------------------------------------------------------
+ // Static Functions
+ //------------------------------------------------------------------
+ static void Initialize();
+
+ static void Terminate();
+
+ static lldb_private::LanguageRuntime *
+ CreateInstance(Process *process, lldb::LanguageType language);
+
+ static lldb_private::ConstString GetPluginNameStatic();
+
+ static bool classof(const ObjCLanguageRuntime *runtime) {
+ switch (runtime->GetRuntimeVersion()) {
+ case ObjCRuntimeVersions::eAppleObjC_V1:
+ return true;
+ default:
+ return false;
}
-
- class ClassDescriptorV1 : public ObjCLanguageRuntime::ClassDescriptor
- {
- public:
- ClassDescriptorV1 (ValueObject &isa_pointer);
- ClassDescriptorV1 (ObjCISA isa, lldb::ProcessSP process_sp);
-
- ~ClassDescriptorV1() override = default;
-
- ConstString
- GetClassName() override
- {
- return m_name;
- }
-
- ClassDescriptorSP
- GetSuperclass() override;
-
- ClassDescriptorSP
- GetMetaclass() const override;
-
- bool
- IsValid() override
- {
- return m_valid;
- }
-
- // v1 does not support tagged pointers
- bool
- GetTaggedPointerInfo(uint64_t* info_bits = nullptr,
- uint64_t* value_bits = nullptr,
- uint64_t* payload = nullptr) override
- {
- return false;
- }
-
- uint64_t
- GetInstanceSize() override
- {
- return m_instance_size;
- }
-
- ObjCISA
- GetISA() override
- {
- return m_isa;
- }
-
- bool
- Describe(std::function <void (ObjCLanguageRuntime::ObjCISA)> const &superclass_func,
- std::function <bool (const char *, const char *)> const &instance_method_func,
- std::function <bool (const char *, const char *)> const &class_method_func,
- std::function <bool (const char *, const char *,
- lldb::addr_t, uint64_t)> const &ivar_func) const override;
-
- protected:
- void
- Initialize (ObjCISA isa, lldb::ProcessSP process_sp);
-
- private:
- ConstString m_name;
- ObjCISA m_isa;
- ObjCISA m_parent_isa;
- bool m_valid;
- lldb::ProcessWP m_process_wp;
- uint64_t m_instance_size;
- };
-
- // These are generic runtime functions:
- bool
- GetDynamicTypeAndAddress(ValueObject &in_value,
- lldb::DynamicValueType use_dynamic,
- TypeAndOrName &class_type_or_name,
- Address &address,
- Value::ValueType &value_type) override;
-
- UtilityFunction *
- CreateObjectChecker(const char *) override;
-
- //------------------------------------------------------------------
- // PluginInterface protocol
- //------------------------------------------------------------------
- ConstString
- GetPluginName() override;
-
- uint32_t
- GetPluginVersion() override;
-
- ObjCRuntimeVersions
- GetRuntimeVersion() const override
- {
- return ObjCRuntimeVersions::eAppleObjC_V1;
+ }
+
+ class ClassDescriptorV1 : public ObjCLanguageRuntime::ClassDescriptor {
+ public:
+ ClassDescriptorV1(ValueObject &isa_pointer);
+ ClassDescriptorV1(ObjCISA isa, lldb::ProcessSP process_sp);
+
+ ~ClassDescriptorV1() override = default;
+
+ ConstString GetClassName() override { return m_name; }
+
+ ClassDescriptorSP GetSuperclass() override;
+
+ ClassDescriptorSP GetMetaclass() const override;
+
+ bool IsValid() override { return m_valid; }
+
+ // v1 does not support tagged pointers
+ bool GetTaggedPointerInfo(uint64_t *info_bits = nullptr,
+ uint64_t *value_bits = nullptr,
+ uint64_t *payload = nullptr) override {
+ return false;
}
-
- void
- UpdateISAToDescriptorMapIfNeeded() override;
-
- DeclVendor *
- GetDeclVendor() override;
+
+ uint64_t GetInstanceSize() override { return m_instance_size; }
+
+ ObjCISA GetISA() override { return m_isa; }
+
+ bool
+ Describe(std::function<void(ObjCLanguageRuntime::ObjCISA)> const
+ &superclass_func,
+ std::function<bool(const char *, const char *)> const
+ &instance_method_func,
+ std::function<bool(const char *, const char *)> const
+ &class_method_func,
+ std::function<bool(const char *, const char *, lldb::addr_t,
+ uint64_t)> const &ivar_func) const override;
+
+ protected:
+ void Initialize(ObjCISA isa, lldb::ProcessSP process_sp);
+
+ private:
+ ConstString m_name;
+ ObjCISA m_isa;
+ ObjCISA m_parent_isa;
+ bool m_valid;
+ lldb::ProcessWP m_process_wp;
+ uint64_t m_instance_size;
+ };
+
+ // These are generic runtime functions:
+ bool GetDynamicTypeAndAddress(ValueObject &in_value,
+ lldb::DynamicValueType use_dynamic,
+ TypeAndOrName &class_type_or_name,
+ Address &address,
+ Value::ValueType &value_type) override;
+
+ UtilityFunction *CreateObjectChecker(const char *) override;
+
+ //------------------------------------------------------------------
+ // PluginInterface protocol
+ //------------------------------------------------------------------
+ ConstString GetPluginName() override;
+
+ uint32_t GetPluginVersion() override;
+
+ ObjCRuntimeVersions GetRuntimeVersion() const override {
+ return ObjCRuntimeVersions::eAppleObjC_V1;
+ }
+
+ void UpdateISAToDescriptorMapIfNeeded() override;
+
+ DeclVendor *GetDeclVendor() override;
protected:
- lldb::BreakpointResolverSP
- CreateExceptionResolver(Breakpoint *bkpt, bool catch_bp, bool throw_bp) override;
-
- class HashTableSignature
- {
- public:
- HashTableSignature () :
- m_count (0),
- m_num_buckets (0),
- m_buckets_ptr (LLDB_INVALID_ADDRESS)
- {
- }
-
- bool
- NeedsUpdate (uint32_t count,
- uint32_t num_buckets,
- lldb::addr_t buckets_ptr)
- {
- return m_count != count ||
- m_num_buckets != num_buckets ||
- m_buckets_ptr != buckets_ptr ;
- }
-
- void
- UpdateSignature (uint32_t count,
- uint32_t num_buckets,
- lldb::addr_t buckets_ptr)
- {
- m_count = count;
- m_num_buckets = num_buckets;
- m_buckets_ptr = buckets_ptr;
- }
-
- protected:
- uint32_t m_count;
- uint32_t m_num_buckets;
- lldb::addr_t m_buckets_ptr;
- };
-
- lldb::addr_t
- GetISAHashTablePointer ();
-
- HashTableSignature m_hash_signature;
- lldb::addr_t m_isa_hash_table_ptr;
- std::unique_ptr<DeclVendor> m_decl_vendor_ap;
+ lldb::BreakpointResolverSP CreateExceptionResolver(Breakpoint *bkpt,
+ bool catch_bp,
+ bool throw_bp) override;
+
+ class HashTableSignature {
+ public:
+ HashTableSignature()
+ : m_count(0), m_num_buckets(0), m_buckets_ptr(LLDB_INVALID_ADDRESS) {}
+
+ bool NeedsUpdate(uint32_t count, uint32_t num_buckets,
+ lldb::addr_t buckets_ptr) {
+ return m_count != count || m_num_buckets != num_buckets ||
+ m_buckets_ptr != buckets_ptr;
+ }
+
+ void UpdateSignature(uint32_t count, uint32_t num_buckets,
+ lldb::addr_t buckets_ptr) {
+ m_count = count;
+ m_num_buckets = num_buckets;
+ m_buckets_ptr = buckets_ptr;
+ }
+
+ protected:
+ uint32_t m_count;
+ uint32_t m_num_buckets;
+ lldb::addr_t m_buckets_ptr;
+ };
+
+ lldb::addr_t GetISAHashTablePointer();
+
+ HashTableSignature m_hash_signature;
+ lldb::addr_t m_isa_hash_table_ptr;
+ std::unique_ptr<DeclVendor> m_decl_vendor_ap;
private:
- AppleObjCRuntimeV1(Process *process);
+ AppleObjCRuntimeV1(Process *process);
};
-
+
} // namespace lldb_private
#endif // liblldb_AppleObjCRuntimeV1_h_
OpenPOWER on IntegriCloud