llvm/lldb/include/lldb/lldb-defines.h

//===-- lldb-defines.h ------------------------------------------*- C++ -*-===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef LLDB_LLDB_DEFINES_H
#define LLDB_LLDB_DEFINES_H

#include "lldb/lldb-types.h"

#if !defined(INT32_MAX)
#define INT32_MAX
#endif

#if !defined(UINT32_MAX)
#define UINT32_MAX
#endif

#if !defined(UINT64_MAX)
#define UINT64_MAX
#endif

// LLDB version
//
// A build script phase can modify this version number if needed.
//#define LLDB_VERSION
//#define LLDB_REVISION
//#define LLDB_VERSION_STRING

// LLDB defines
#define LLDB_GENERIC_ERROR

// Breakpoints
#define LLDB_INVALID_BREAK_ID
#define LLDB_DEFAULT_BREAK_SIZE
#define LLDB_BREAK_ID_IS_VALID(bid)
#define LLDB_BREAK_ID_IS_INTERNAL(bid)

// Watchpoints
#define LLDB_INVALID_WATCH_ID
#define LLDB_WATCH_ID_IS_VALID(uid)
#define LLDB_WATCH_TYPE_READ
#define LLDB_WATCH_TYPE_WRITE
#define LLDB_WATCH_TYPE_MODIFY
#define LLDB_WATCH_TYPE_IS_VALID(type)

// StopPointSites
#define LLDB_INVALID_SITE_ID

// Generic Register Numbers
#define LLDB_REGNUM_GENERIC_PC
#define LLDB_REGNUM_GENERIC_SP
#define LLDB_REGNUM_GENERIC_FP
#define LLDB_REGNUM_GENERIC_RA
#define LLDB_REGNUM_GENERIC_FLAGS
#define LLDB_REGNUM_GENERIC_ARG1
#define LLDB_REGNUM_GENERIC_ARG2
#define LLDB_REGNUM_GENERIC_ARG3
#define LLDB_REGNUM_GENERIC_ARG4
#define LLDB_REGNUM_GENERIC_ARG5
#define LLDB_REGNUM_GENERIC_ARG6
#define LLDB_REGNUM_GENERIC_ARG7
#define LLDB_REGNUM_GENERIC_ARG8
#define LLDB_REGNUM_GENERIC_TP
     // thread control block pointer
/// Invalid value definitions
#define LLDB_INVALID_STOP_ID
#define LLDB_INVALID_ADDRESS
#define LLDB_INVALID_INDEX32
#define LLDB_INVALID_IVAR_OFFSET
#define LLDB_INVALID_IMAGE_TOKEN
#define LLDB_INVALID_MODULE_VERSION
#define LLDB_INVALID_REGNUM
#define LLDB_INVALID_UID
#define LLDB_INVALID_PROCESS_ID
#define LLDB_INVALID_THREAD_ID
#define LLDB_INVALID_FRAME_ID
#define LLDB_INVALID_SIGNAL_NUMBER
#define LLDB_INVALID_OFFSET
#define LLDB_INVALID_LINE_NUMBER
#define LLDB_INVALID_COLUMN_NUMBER
#define LLDB_INVALID_QUEUE_ID
#define LLDB_INVALID_CPU_ID
#define LLDB_INVALID_WATCHPOINT_RESOURCE_ID

/// CPU Type definitions
#define LLDB_ARCH_DEFAULT
#define LLDB_ARCH_DEFAULT_32BIT
#define LLDB_ARCH_DEFAULT_64BIT
#define LLDB_INVALID_CPUTYPE

/// Option Set definitions
// FIXME: I'm sure there's some #define magic that can create all 32 sets on the
// fly.  That would have the added benefit of making this unreadable.
#define LLDB_MAX_NUM_OPTION_SETS
#define LLDB_OPT_SET_ALL
#define LLDB_OPT_SET_1
#define LLDB_OPT_SET_2
#define LLDB_OPT_SET_3
#define LLDB_OPT_SET_4
#define LLDB_OPT_SET_5
#define LLDB_OPT_SET_6
#define LLDB_OPT_SET_7
#define LLDB_OPT_SET_8
#define LLDB_OPT_SET_9
#define LLDB_OPT_SET_10
#define LLDB_OPT_SET_11
#define LLDB_OPT_SET_12
#define LLDB_OPT_SET_FROM_TO(A, B)

#if defined(_WIN32) && !defined(MAX_PATH)
#define MAX_PATH
#endif

/// Address Mask
/// Bits not used for addressing are set to 1 in the mask;
/// all mask bits set is an invalid value.
#define LLDB_INVALID_ADDRESS_MASK

// ignore GCC function attributes
#if defined(_MSC_VER) && !defined(__clang__)
#define __attribute__(X)
#endif

#define UNUSED_IF_ASSERT_DISABLED(x)

#define LLDB_DEPRECATED(MSG)

#if defined(__clang__)
#define LLDB_DEPRECATED_FIXME(MSG, FIX)
#else
#define LLDB_DEPRECATED_FIXME
#endif

#endif // LLDB_LLDB_DEFINES_H