Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-05-10 08:43:00

0001 //===-- lldb-types.h --------------------------------------------*- C++ -*-===//
0002 //
0003 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
0004 // See https://llvm.org/LICENSE.txt for license information.
0005 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
0006 //
0007 //===----------------------------------------------------------------------===//
0008 
0009 #ifndef LLDB_LLDB_TYPES_H
0010 #define LLDB_LLDB_TYPES_H
0011 
0012 #include "lldb/lldb-enumerations.h"
0013 #include "lldb/lldb-forward.h"
0014 
0015 #include <cstdint>
0016 
0017 // All host systems must define:
0018 //  lldb::rwlock_t          The type representing a read/write lock on the host
0019 //  lldb::process_t         The type representing a process on the host
0020 //  lldb::thread_t          The native thread type for spawned threads on the
0021 //                          host
0022 //  lldb::file_t            The type representing a file on the host
0023 //  lldb::socket_t          The type representing a socket on the host
0024 //  lldb::thread_arg_t      The type of the one and only thread creation
0025 //                          argument for the host system
0026 //  lldb::thread_result_t   The type that gets returned when a thread finishes
0027 //  lldb::thread_func_t     The function prototype used to spawn a thread on the
0028 //                          host system.
0029 //  lldb::pipe_t            The type representing a pipe on the host
0030 //
0031 // Additionally, lldb defines a few macros based on these definitions:
0032 //  LLDB_INVALID_PROCESS      The value of an invalid lldb::process_t
0033 //  LLDB_INVALID_HOST_THREAD  The value of an invalid lldb::thread_t
0034 //  LLDB_INVALID_PIPE         The value of an invalid lldb::pipe_t
0035 
0036 #ifdef _WIN32
0037 
0038 #include <process.h>
0039 
0040 namespace lldb {
0041 typedef void *rwlock_t;
0042 typedef void *process_t;                          // Process type is HANDLE
0043 typedef void *thread_t;                           // Host thread type
0044 typedef void *file_t;                             // Host file type
0045 typedef unsigned int __w64 socket_t;              // Host socket type
0046 typedef void *thread_arg_t;                       // Host thread argument type
0047 typedef unsigned thread_result_t;                 // Host thread result type
0048 typedef thread_result_t (*thread_func_t)(void *); // Host thread function type
0049 typedef void *pipe_t;                             // Host pipe type is HANDLE
0050 
0051 #else
0052 
0053 #include <pthread.h>
0054 
0055 namespace lldb {
0056 typedef pthread_rwlock_t rwlock_t;
0057 typedef uint64_t process_t;             // Process type is just a pid.
0058 typedef pthread_t thread_t;             // Host thread type
0059 typedef int file_t;                     // Host file type
0060 typedef int socket_t;                   // Host socket type
0061 typedef void *thread_arg_t;             // Host thread argument type
0062 typedef void *thread_result_t;          // Host thread result type
0063 typedef void *(*thread_func_t)(void *); // Host thread function type
0064 typedef int pipe_t;                     // Host pipe type
0065 
0066 #endif // _WIN32
0067 
0068 #define LLDB_INVALID_PROCESS ((lldb::process_t)-1)
0069 #define LLDB_INVALID_HOST_THREAD ((lldb::thread_t)NULL)
0070 #define LLDB_INVALID_PIPE ((lldb::pipe_t)-1)
0071 #define LLDB_INVALID_CALLBACK_TOKEN ((lldb::callback_token_t) - 1)
0072 
0073 typedef void (*LogOutputCallback)(const char *, void *baton);
0074 typedef bool (*CommandOverrideCallback)(void *baton, const char **argv);
0075 typedef bool (*ExpressionCancelCallback)(lldb::ExpressionEvaluationPhase phase,
0076                                          void *baton);
0077 
0078 typedef void *ScriptObjectPtr;
0079 
0080 typedef uint64_t addr_t;
0081 typedef int32_t callback_token_t;
0082 typedef uint64_t user_id_t;
0083 typedef uint64_t pid_t;
0084 typedef uint64_t tid_t;
0085 typedef uint64_t offset_t;
0086 typedef int32_t break_id_t;
0087 typedef int32_t watch_id_t;
0088 typedef uint32_t wp_resource_id_t;
0089 typedef void *opaque_compiler_type_t;
0090 typedef uint64_t queue_id_t;
0091 typedef uint32_t cpu_id_t; // CPU core id
0092 
0093 } // namespace lldb
0094 
0095 #endif // LLDB_LLDB_TYPES_H