chromium/third_party/breakpad/breakpad/src/google_breakpad/common/minidump_cpu_riscv.h

/* minidump_format.h: A cross-platform reimplementation of minidump-related
 * portions of DbgHelp.h from the Windows Platform SDK.
 *
 * (This is C99 source, please don't corrupt it with C++.)
 *
 * This file contains the necessary definitions to read minidump files
 * produced on RISCV and RISCV64. These files may be read on any platform
 * provided that the alignments of these structures on the processing system
 * are identical to the alignments of these structures on the producing
 * system. For this reason, precise-sized types are used. The structures
 * defined by this file have been laid out to minimize alignment problems by
 * ensuring that all members are aligned on their natural boundaries.
 * In some cases, tail-padding may be significant when different ABIs specify
 * different tail-padding behaviors. To avoid problems when reading or
 * writing affected structures, MD_*_SIZE macros are provided where needed,
 * containing the useful size of the structures without padding.
 *
 * Structures that are defined by Microsoft to contain a zero-length array
 * are instead defined here to contain an array with one element, as
 * zero-length arrays are forbidden by standard C and C++. In these cases,
 * *_minsize constants are provided to be used in place of sizeof. For a
 * cleaner interface to these sizes when using C++, see minidump_size.h.
 *
 * These structures are also sufficient to populate minidump files.
 *
 * Because precise data type sizes are crucial for this implementation to
 * function properly and portably, a set of primitive types with known sizes
 * are used as the basis of each structure defined by this file.
 *
 * Author: Iacopo Colonnelli
 */

/*
 * RISCV and RISCV64 support
 */

#ifndef GOOGLE_BREAKPAD_COMMON_MINIDUMP_CPU_RISCV_H__
#define GOOGLE_BREAKPAD_COMMON_MINIDUMP_CPU_RISCV_H__

#include "google_breakpad/common/breakpad_types.h"

#define MD_CONTEXT_RISCV_GPR_COUNT
#define MD_CONTEXT_RISCV_FPR_COUNT

enum MDRISCVRegisterNumbers {};

/* For (MDRawContextRISCV).context_flags.  These values indicate the type of
 * context stored in the structure. */
#define MD_CONTEXT_RISCV
#define MD_CONTEXT_RISCV_INTEGER
#define MD_CONTEXT_RISCV_FLOATING_POINT
#define MD_CONTEXT_RISCV_FULL

MDRawContextRISCV;

/* For (MDRawContextRISCV64).context_flags.  These values indicate the type of
 * context stored in the structure. */
#define MD_CONTEXT_RISCV64
#define MD_CONTEXT_RISCV64_INTEGER
#define MD_CONTEXT_RISCV64_FLOATING_POINT
#define MD_CONTEXT_RISCV64_FULL

MDRawContextRISCV64;


#endif  /* GOOGLE_BREAKPAD_COMMON_MINIDUMP_CPU_RISCV_H__ */