1 //===-- lldb-types.h --------------------------------------------*- C++ -*-===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 #ifndef LLDB_lldb_types_h_
11 #define LLDB_lldb_types_h_
13 #include "lldb/lldb-enumerations.h"
14 #include "lldb/lldb-forward.h"
18 //----------------------------------------------------------------------
19 // All host systems must define:
20 // lldb::thread_t The native thread type for spawned threads on the
22 // lldb::thread_arg_t The type of the one any only thread creation
23 // argument for the host system
24 // lldb::thread_result_t The return type that gets returned when a thread
26 // lldb::thread_func_t The function prototype used to spawn a thread on the
28 // #define LLDB_INVALID_PROCESS_ID ...
29 // #define LLDB_INVALID_THREAD_ID ...
30 // #define LLDB_INVALID_HOST_THREAD ...
31 //----------------------------------------------------------------------
33 // TODO: Add a bunch of ifdefs to determine the host system and what
34 // things should be defined. Currently MacOSX is being assumed by default
35 // since that is what lldb was first developed for.
42 typedef void *rwlock_t;
43 typedef void *process_t; // Process type is HANDLE
44 typedef void *thread_t; // Host thread type
45 typedef void *file_t; // Host file type
46 typedef unsigned int __w64 socket_t; // Host socket type
47 typedef void *thread_arg_t; // Host thread argument type
48 typedef unsigned thread_result_t; // Host thread result type
49 typedef thread_result_t (*thread_func_t)(void *); // Host thread function type
57 //----------------------------------------------------------------------
59 //----------------------------------------------------------------------
60 typedef pthread_rwlock_t rwlock_t;
61 typedef uint64_t process_t; // Process type is just a pid.
62 typedef pthread_t thread_t; // Host thread type
63 typedef int file_t; // Host file type
64 typedef int socket_t; // Host socket type
65 typedef void *thread_arg_t; // Host thread argument type
66 typedef void *thread_result_t; // Host thread result type
67 typedef void *(*thread_func_t)(void *); // Host thread function type
73 typedef void (*LogOutputCallback)(const char *, void *baton);
74 typedef bool (*CommandOverrideCallback)(void *baton, const char **argv);
75 typedef bool (*CommandOverrideCallbackWithResult)(
76 void *baton, const char **argv, lldb_private::CommandReturnObject &result);
77 typedef bool (*ExpressionCancelCallback)(ExpressionEvaluationPhase phase,
81 #define LLDB_INVALID_PROCESS ((lldb::process_t)-1)
82 #define LLDB_INVALID_HOST_THREAD ((lldb::thread_t)NULL)
85 typedef uint64_t addr_t;
86 typedef uint64_t user_id_t;
87 typedef uint64_t pid_t;
88 typedef uint64_t tid_t;
89 typedef uint64_t offset_t;
90 typedef int32_t break_id_t;
91 typedef int32_t watch_id_t;
92 typedef void *opaque_compiler_type_t;
93 typedef uint64_t queue_id_t;
96 #endif // LLDB_lldb_types_h_