Kate Stone b9c1b51e45 *** 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
2016-09-06 20:57:50 +00:00

100 lines
2.9 KiB
C++

//===-- RNBDefs.h -----------------------------------------------*- C++ -*-===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
//
// Created by Greg Clayton on 12/14/07.
//
//===----------------------------------------------------------------------===//
#ifndef __RNBDefs_h__
#define __RNBDefs_h__
#include "DNBDefs.h"
#include <memory>
#define CONCAT2(a, b) a##b
#define CONCAT(a, b) CONCAT2(a, b)
#define STRINGIZE2(x) #x
#define STRINGIZE(x) STRINGIZE2(x)
#if !defined(DEBUGSERVER_PROGRAM_SYMBOL)
#define DEBUGSERVER_PROGRAM_SYMBOL debugserver
#endif
#if !defined(DEBUGSERVER_PROGRAM_NAME)
#define DEBUGSERVER_PROGRAM_NAME STRINGIZE(DEBUGSERVER_PROGRAM_SYMBOL)
#endif
#ifndef DEBUGSERVER_VERSION_NUM
extern "C" const unsigned char CONCAT(DEBUGSERVER_PROGRAM_SYMBOL,
VersionString)[];
#define DEBUGSERVER_VERSION_NUM \
CONCAT(DEBUGSERVER_PROGRAM_SYMBOL, VersionNumber)
#endif
#ifndef DEBUGSERVER_VERSION_STR
extern "C" const double CONCAT(DEBUGSERVER_PROGRAM_SYMBOL, VersionNumber);
#define DEBUGSERVER_VERSION_STR \
CONCAT(DEBUGSERVER_PROGRAM_SYMBOL, VersionString)
#endif
#if defined(__i386__)
#define RNB_ARCH "i386"
#elif defined(__x86_64__)
#define RNB_ARCH "x86_64"
#elif defined(__ppc64__)
#define RNB_ARCH "ppc64"
#elif defined(__powerpc__) || defined(__ppc__)
#define RNB_ARCH "ppc"
#elif defined(__arm64__) || defined(__aarch64__)
#define RNB_ARCH "arm64"
#elif defined(__arm__)
#define RNB_ARCH "armv7"
#else
#error undefined architecture
#endif
class RNBRemote;
typedef std::shared_ptr<RNBRemote> RNBRemoteSP;
typedef enum { rnb_success = 0, rnb_err = 1, rnb_not_connected = 2 } rnb_err_t;
// Log bits
// reserve low bits for DNB
#define LOG_RNB_MINIMAL \
((LOG_LO_USER) << 0) // Minimal logging (min verbosity)
#define LOG_RNB_MEDIUM \
((LOG_LO_USER) << 1) // Medium logging (med verbosity)
#define LOG_RNB_MAX ((LOG_LO_USER) << 2) // Max logging (max verbosity)
#define LOG_RNB_COMM ((LOG_LO_USER) << 3) // Log communications (RNBSocket)
#define LOG_RNB_REMOTE ((LOG_LO_USER) << 4) // Log remote (RNBRemote)
#define LOG_RNB_EVENTS \
((LOG_LO_USER) << 5) // Log events (PThreadEvents)
#define LOG_RNB_PROC ((LOG_LO_USER) << 6) // Log process state (Process thread)
#define LOG_RNB_PACKETS ((LOG_LO_USER) << 7) // Log gdb remote packets
#define LOG_RNB_ALL (~((LOG_LO_USER)-1))
#define LOG_RNB_DEFAULT (LOG_RNB_ALL)
extern RNBRemoteSP g_remoteSP;
#endif // #ifndef __RNBDefs_h__