summaryrefslogtreecommitdiffstats
path: root/lldb/source/Plugins/ABI/SysV-ppc/ABISysV_ppc.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/ABI/SysV-ppc/ABISysV_ppc.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/ABI/SysV-ppc/ABISysV_ppc.h')
-rw-r--r--lldb/source/Plugins/ABI/SysV-ppc/ABISysV_ppc.h190
1 files changed, 85 insertions, 105 deletions
diff --git a/lldb/source/Plugins/ABI/SysV-ppc/ABISysV_ppc.h b/lldb/source/Plugins/ABI/SysV-ppc/ABISysV_ppc.h
index 99ee755631c..c9c1c985f67 100644
--- a/lldb/source/Plugins/ABI/SysV-ppc/ABISysV_ppc.h
+++ b/lldb/source/Plugins/ABI/SysV-ppc/ABISysV_ppc.h
@@ -14,120 +14,100 @@
// C++ Includes
// Other libraries and framework includes
// Project includes
-#include "lldb/lldb-private.h"
#include "lldb/Target/ABI.h"
+#include "lldb/lldb-private.h"
-class ABISysV_ppc :
- public lldb_private::ABI
-{
+class ABISysV_ppc : public lldb_private::ABI {
public:
- ~ABISysV_ppc() override = default;
-
- size_t
- GetRedZoneSize() const override;
-
- bool
- PrepareTrivialCall(lldb_private::Thread &thread,
- lldb::addr_t sp,
- lldb::addr_t functionAddress,
- lldb::addr_t returnAddress,
- llvm::ArrayRef<lldb::addr_t> args) const override;
-
- bool
- GetArgumentValues(lldb_private::Thread &thread,
- lldb_private::ValueList &values) const override;
-
- lldb_private::Error
- SetReturnValueObject(lldb::StackFrameSP &frame_sp, lldb::ValueObjectSP &new_value) override;
-
- lldb::ValueObjectSP
- GetReturnValueObjectImpl(lldb_private::Thread &thread,
- lldb_private::CompilerType &type) const override;
-
- bool
- CreateFunctionEntryUnwindPlan(lldb_private::UnwindPlan &unwind_plan) override;
-
- bool
- CreateDefaultUnwindPlan(lldb_private::UnwindPlan &unwind_plan) override;
-
- bool
- RegisterIsVolatile(const lldb_private::RegisterInfo *reg_info) override;
-
- // The SysV ppc ABI requires that stack frames be 16 byte aligned.
- // When there is a trap handler on the stack, e.g. _sigtramp in userland
- // code, we've seen that the stack pointer is often not aligned properly
- // before the handler is invoked. This means that lldb will stop the unwind
- // early -- before the function which caused the trap.
- //
- // To work around this, we relax that alignment to be just word-size (8-bytes).
- // Whitelisting the trap handlers for user space would be easy (_sigtramp) but
- // in other environments there can be a large number of different functions
- // involved in async traps.
- bool
- CallFrameAddressIsValid(lldb::addr_t cfa) override
- {
- // Make sure the stack call frame addresses are 8 byte aligned
- if (cfa & (8ull - 1ull))
- return false; // Not 8 byte aligned
- if (cfa == 0)
- return false; // Zero is not a valid stack address
- return true;
- }
-
- bool
- CodeAddressIsValid(lldb::addr_t pc) override
- {
- // We have a 64 bit address space, so anything is valid as opcodes
- // aren't fixed width...
- return true;
- }
-
- const lldb_private::RegisterInfo *
- GetRegisterInfoArray(uint32_t &count) override;
-
- //------------------------------------------------------------------
- // Static Functions
- //------------------------------------------------------------------
-
- static void
- Initialize();
-
- static void
- Terminate();
-
- static lldb::ABISP
- CreateInstance (const lldb_private::ArchSpec &arch);
-
- static lldb_private::ConstString
- GetPluginNameStatic();
-
- //------------------------------------------------------------------
- // PluginInterface protocol
- //------------------------------------------------------------------
-
- lldb_private::ConstString
- GetPluginName() override;
-
- uint32_t
- GetPluginVersion() override;
+ ~ABISysV_ppc() override = default;
+
+ size_t GetRedZoneSize() const override;
+
+ bool PrepareTrivialCall(lldb_private::Thread &thread, lldb::addr_t sp,
+ lldb::addr_t functionAddress,
+ lldb::addr_t returnAddress,
+ llvm::ArrayRef<lldb::addr_t> args) const override;
+
+ bool GetArgumentValues(lldb_private::Thread &thread,
+ lldb_private::ValueList &values) const override;
+
+ lldb_private::Error
+ SetReturnValueObject(lldb::StackFrameSP &frame_sp,
+ lldb::ValueObjectSP &new_value) override;
+
+ lldb::ValueObjectSP
+ GetReturnValueObjectImpl(lldb_private::Thread &thread,
+ lldb_private::CompilerType &type) const override;
+
+ bool
+ CreateFunctionEntryUnwindPlan(lldb_private::UnwindPlan &unwind_plan) override;
+
+ bool CreateDefaultUnwindPlan(lldb_private::UnwindPlan &unwind_plan) override;
+
+ bool RegisterIsVolatile(const lldb_private::RegisterInfo *reg_info) override;
+
+ // The SysV ppc ABI requires that stack frames be 16 byte aligned.
+ // When there is a trap handler on the stack, e.g. _sigtramp in userland
+ // code, we've seen that the stack pointer is often not aligned properly
+ // before the handler is invoked. This means that lldb will stop the unwind
+ // early -- before the function which caused the trap.
+ //
+ // To work around this, we relax that alignment to be just word-size
+ // (8-bytes).
+ // Whitelisting the trap handlers for user space would be easy (_sigtramp) but
+ // in other environments there can be a large number of different functions
+ // involved in async traps.
+ bool CallFrameAddressIsValid(lldb::addr_t cfa) override {
+ // Make sure the stack call frame addresses are 8 byte aligned
+ if (cfa & (8ull - 1ull))
+ return false; // Not 8 byte aligned
+ if (cfa == 0)
+ return false; // Zero is not a valid stack address
+ return true;
+ }
+
+ bool CodeAddressIsValid(lldb::addr_t pc) override {
+ // We have a 64 bit address space, so anything is valid as opcodes
+ // aren't fixed width...
+ return true;
+ }
+
+ const lldb_private::RegisterInfo *
+ GetRegisterInfoArray(uint32_t &count) override;
+
+ //------------------------------------------------------------------
+ // Static Functions
+ //------------------------------------------------------------------
+
+ static void Initialize();
+
+ static void Terminate();
+
+ static lldb::ABISP CreateInstance(const lldb_private::ArchSpec &arch);
+
+ static lldb_private::ConstString GetPluginNameStatic();
+
+ //------------------------------------------------------------------
+ // PluginInterface protocol
+ //------------------------------------------------------------------
+
+ lldb_private::ConstString GetPluginName() override;
+
+ uint32_t GetPluginVersion() override;
protected:
- void
- CreateRegisterMapIfNeeded ();
+ void CreateRegisterMapIfNeeded();
- lldb::ValueObjectSP
- GetReturnValueObjectSimple(lldb_private::Thread &thread,
- lldb_private::CompilerType &ast_type) const;
+ lldb::ValueObjectSP
+ GetReturnValueObjectSimple(lldb_private::Thread &thread,
+ lldb_private::CompilerType &ast_type) const;
- bool
- RegisterIsCalleeSaved (const lldb_private::RegisterInfo *reg_info);
+ bool RegisterIsCalleeSaved(const lldb_private::RegisterInfo *reg_info);
private:
- ABISysV_ppc() :
- lldb_private::ABI()
- {
- // Call CreateInstance instead.
- }
+ ABISysV_ppc() : lldb_private::ABI() {
+ // Call CreateInstance instead.
+ }
};
#endif // liblldb_ABISysV_ppc_h_
OpenPOWER on IntegriCloud