1//===-- NtStructures.h ------------------------------------------*- C++ -*-===//
2//
3// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4// See https://llvm.org/LICENSE.txt for license information.
5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6//
7//===----------------------------------------------------------------------===//
8
9#ifndef liblldb_Plugins_Process_Minidump_NtStructures_h_
10#define liblldb_Plugins_Process_Minidump_NtStructures_h_
11
12#include "llvm/Support/Endian.h"
13
14namespace lldb_private {
15
16namespace minidump {
17
18// This describes the layout of a TEB (Thread Environment Block) for a 64-bit
19// process.  It's adapted from the 32-bit TEB in winternl.h.  Currently, we care
20// only about the position of the tls_slots.
21struct TEB64 {
22  llvm::support::ulittle64_t reserved1[12];
23  llvm::support::ulittle64_t process_environment_block;
24  llvm::support::ulittle64_t reserved2[399];
25  uint8_t reserved3[1952];
26  llvm::support::ulittle64_t tls_slots[64];
27  uint8_t reserved4[8];
28  llvm::support::ulittle64_t reserved5[26];
29  llvm::support::ulittle64_t reserved_for_ole; // Windows 2000 only
30  llvm::support::ulittle64_t reserved6[4];
31  llvm::support::ulittle64_t tls_expansion_slots;
32};
33
34#endif // liblldb_Plugins_Process_Minidump_NtStructures_h_
35} // namespace minidump
36} // namespace lldb_private
37