1 //===-- GenealogySPI.h ------------------------------------------*- C++ -*-===//
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 //===----------------------------------------------------------------------===//
8 #ifndef LLDB_TOOLS_DEBUGSERVER_SOURCE_MACOSX_GENEALOGYSPI_H
9 #define LLDB_TOOLS_DEBUGSERVER_SOURCE_MACOSX_GENEALOGYSPI_H
13 typedef void *os_activity_process_list_t
;
14 typedef void *os_activity_list_t
;
15 typedef void *os_trace_message_list_t
;
16 typedef struct os_activity_watch_s
*os_activity_watch_t
;
17 typedef uint64_t os_activity_t
;
19 struct os_activity_breadcrumb_s
{
20 uint32_t breadcrumb_id
;
26 typedef struct os_activity_breadcrumb_s
*os_activity_breadcrumb_t
;
28 typedef struct os_trace_message_s
{
33 xpc_object_t __unsafe_unretained payload
;
34 const uint8_t *image_uuid
;
35 const char *image_path
;
39 } * os_trace_message_t
;
41 typedef struct os_activity_process_s
{
42 os_activity_process_list_t child_procs
;
43 os_trace_message_list_t messages
;
44 os_activity_list_t activities
;
47 const uint8_t *image_uuid
;
48 const char *image_path
;
50 } * os_activity_process_t
;
52 typedef struct os_activity_entry_s
{
53 uint64_t activity_start
;
54 os_activity_t activity_id
;
55 os_activity_t parent_id
;
56 const char *activity_name
;
58 os_trace_message_list_t messages
;
59 } * os_activity_entry_t
;
62 OS_ACTIVITY_DIAGNOSTIC_DEFAULT
= 0x00000000,
63 OS_ACTIVITY_DIAGNOSTIC_PROCESS_ONLY
= 0x00000001,
64 OS_ACTIVITY_DIAGNOSTIC_SKIP_DECODE
= 0x00000002,
65 OS_ACTIVITY_DIAGNOSTIC_FLATTENED
= 0x00000004,
66 OS_ACTIVITY_DIAGNOSTIC_ALL_ACTIVITIES
= 0x00000008,
67 OS_ACTIVITY_DIAGNOSTIC_MAX
= 0x0000000f
69 typedef uint32_t os_activity_diagnostic_flag_t
;
72 OS_ACTIVITY_WATCH_DEFAULT
= 0x00000000,
73 OS_ACTIVITY_WATCH_PROCESS_ONLY
= 0x00000001,
74 OS_ACTIVITY_WATCH_SKIP_DECODE
= 0x00000002,
75 OS_ACTIVITY_WATCH_PAYLOAD
= 0x00000004,
76 OS_ACTIVITY_WATCH_ERRORS
= 0x00000008,
77 OS_ACTIVITY_WATCH_FAULTS
= 0x00000010,
78 OS_ACTIVITY_WATCH_MAX
= 0x0000001f
80 typedef uint32_t os_activity_watch_flag_t
;
82 // Return values from os_trace_get_type()
83 #define OS_TRACE_TYPE_RELEASE (1u << 0)
84 #define OS_TRACE_TYPE_DEBUG (1u << 1)
85 #define OS_TRACE_TYPE_ERROR ((1u << 6) | (1u << 0))
86 #define OS_TRACE_TYPE_FAULT ((1u << 7) | (1u << 6) | (1u << 0))
88 typedef void (^os_activity_watch_block_t
)(os_activity_watch_t watch
,
89 os_activity_process_t process_info
,
91 typedef void (^os_diagnostic_block_t
)(os_activity_process_list_t processes
,