| //===-- lldb-defines.h ------------------------------------------*- C++ -*-===// |
| // |
| // The LLVM Compiler Infrastructure |
| // |
| // This file is distributed under the University of Illinois Open Source |
| // License. See LICENSE.TXT for details. |
| // |
| //===----------------------------------------------------------------------===// |
| |
| #ifndef LLDB_defines_h_ |
| #define LLDB_defines_h_ |
| |
| #include <LLDB/lldb-types.h> |
| |
| #if !defined(UINT32_MAX) |
| #define UINT32_MAX 4294967295U |
| #endif |
| |
| #if !defined(UINT64_MAX) |
| #define UINT64_MAX 18446744073709551615ULL |
| #endif |
| |
| //---------------------------------------------------------------------- |
| // lldb defines |
| //---------------------------------------------------------------------- |
| #define LLDB_GENERIC_ERROR ((uint32_t)UINT32_MAX) |
| |
| //---------------------------------------------------------------------- |
| // Breakpoints |
| //---------------------------------------------------------------------- |
| #define LLDB_INVALID_BREAK_ID ((lldb::break_id_t)0) |
| #define LLDB_DEFAULT_BREAK_SIZE 0 |
| #define LLDB_BREAK_ID_IS_VALID(bid) ((bid) != (LLDB_INVALID_BREAK_ID)) |
| #define LLDB_BREAK_ID_IS_INTERNAL(bid) ((bid) < 0) |
| |
| //---------------------------------------------------------------------- |
| // Watchpoints |
| //---------------------------------------------------------------------- |
| #define LLDB_INVALID_WATCH_ID ((lldb::user_id_t)0) |
| #define LLDB_WATCH_ID_IS_VALID(uid) ((uid) != (LLDB_INVALID_WATCH_ID)) |
| #define LLDB_WATCH_TYPE_READ (1u << 0) |
| #define LLDB_WATCH_TYPE_WRITE (1u << 1) |
| |
| //---------------------------------------------------------------------- |
| // Generic Register Numbers |
| //---------------------------------------------------------------------- |
| #define LLDB_REGNUM_GENERIC_PC 0 // Program Counter |
| #define LLDB_REGNUM_GENERIC_SP 1 // Stack Pointer |
| #define LLDB_REGNUM_GENERIC_FP 2 // Frame Pointer |
| #define LLDB_REGNUM_GENERIC_RA 3 // Return Address |
| #define LLDB_REGNUM_GENERIC_FLAGS 4 // Processor flags register |
| |
| //---------------------------------------------------------------------- |
| /// Invalid value definitions |
| //---------------------------------------------------------------------- |
| #define LLDB_INVALID_ADDRESS (~((lldb::addr_t)0)) |
| #define LLDB_INVALID_INDEX32 ((uint32_t)UINT32_MAX) |
| #define LLDB_INVALID_REGNUM ((uint32_t)UINT32_MAX) |
| #define LLDB_INVALID_UID ((lldb::user_id_t)UINT32_MAX) |
| #define LLDB_INVALID_PROCESS_ID ((lldb::pid_t)0) |
| #define LLDB_INVALID_THREAD_ID ((lldb::tid_t)0) |
| #define LLDB_INVALID_FRAME_ID ((uint32_t) UINT32_MAX) |
| #define LLDB_INVALID_SIGNAL_NUMBER ((int32_t) INT32_MAX) |
| |
| //---------------------------------------------------------------------- |
| /// CPU Type defintions |
| //---------------------------------------------------------------------- |
| #define LLDB_ARCH_DEFAULT "systemArch" |
| #define LLDB_ARCH_DEFAULT_32BIT "systemArch32" |
| #define LLDB_ARCH_DEFAULT_64BIT "systemArch64" |
| #define LLDB_INVALID_CPUTYPE (0xFFFFFFFEu) |
| |
| |
| |
| #if defined(__cplusplus) |
| |
| //---------------------------------------------------------------------- |
| /// @def DISALLOW_COPY_AND_ASSIGN(TypeName) |
| /// Macro definition for easily disallowing copy constructor and |
| /// assignment operators in C++ classes. |
| //---------------------------------------------------------------------- |
| #define DISALLOW_COPY_AND_ASSIGN(TypeName) \ |
| TypeName(const TypeName&); \ |
| const TypeName& operator=(const TypeName&) |
| |
| #endif // #if defined(__cplusplus) |
| |
| #endif // LLDB_defines_h_ |