lldb 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/.rspec +3 -0
- data/CHANGELOG.md +7 -0
- data/LICENSE-APACHE +190 -0
- data/LICENSE-MIT +21 -0
- data/README.md +240 -0
- data/Rakefile +80 -0
- data/Steepfile +11 -0
- data/examples/basic_debug.rb +111 -0
- data/examples/breakpoints.rb +72 -0
- data/examples/expression_eval.rb +84 -0
- data/examples/test_program.c +14 -0
- data/ext/lldb/Makefile +24 -0
- data/ext/lldb/extconf.rb +160 -0
- data/ext/lldb/liblldb_wrapper.dylib +0 -0
- data/ext/lldb/lldb_wrapper.cpp +2051 -0
- data/ext/lldb/lldb_wrapper.h +424 -0
- data/ext/lldb/lldb_wrapper.o +0 -0
- data/ext/lldb/mkmf.log +24 -0
- data/lib/lldb/breakpoint.rb +233 -0
- data/lib/lldb/breakpoint_location.rb +117 -0
- data/lib/lldb/command_interpreter.rb +62 -0
- data/lib/lldb/command_return_object.rb +71 -0
- data/lib/lldb/debugger.rb +179 -0
- data/lib/lldb/error.rb +70 -0
- data/lib/lldb/ffi_bindings.rb +394 -0
- data/lib/lldb/frame.rb +226 -0
- data/lib/lldb/launch_info.rb +85 -0
- data/lib/lldb/module.rb +61 -0
- data/lib/lldb/process.rb +317 -0
- data/lib/lldb/symbol_context.rb +52 -0
- data/lib/lldb/target.rb +427 -0
- data/lib/lldb/thread.rb +226 -0
- data/lib/lldb/type.rb +215 -0
- data/lib/lldb/types.rb +190 -0
- data/lib/lldb/value.rb +334 -0
- data/lib/lldb/value_list.rb +88 -0
- data/lib/lldb/version.rb +7 -0
- data/lib/lldb/watchpoint.rb +145 -0
- data/lib/lldb.rb +64 -0
- data/lldb.gemspec +33 -0
- data/rbs_collection.lock.yaml +220 -0
- data/rbs_collection.yaml +19 -0
- data/sig/lldb/ffi_bindings.rbs +312 -0
- metadata +102 -0
|
@@ -0,0 +1,424 @@
|
|
|
1
|
+
#ifndef LLDB_WRAPPER_H
|
|
2
|
+
#define LLDB_WRAPPER_H
|
|
3
|
+
|
|
4
|
+
#ifdef __cplusplus
|
|
5
|
+
extern "C" {
|
|
6
|
+
#endif
|
|
7
|
+
|
|
8
|
+
#include <stdint.h>
|
|
9
|
+
#include <stddef.h>
|
|
10
|
+
|
|
11
|
+
// Opaque pointer types
|
|
12
|
+
typedef void* lldb_debugger_t;
|
|
13
|
+
typedef void* lldb_target_t;
|
|
14
|
+
typedef void* lldb_process_t;
|
|
15
|
+
typedef void* lldb_thread_t;
|
|
16
|
+
typedef void* lldb_frame_t;
|
|
17
|
+
typedef void* lldb_breakpoint_t;
|
|
18
|
+
typedef void* lldb_breakpoint_location_t;
|
|
19
|
+
typedef void* lldb_value_t;
|
|
20
|
+
typedef void* lldb_value_list_t;
|
|
21
|
+
typedef void* lldb_error_t;
|
|
22
|
+
typedef void* lldb_module_t;
|
|
23
|
+
typedef void* lldb_symbol_context_t;
|
|
24
|
+
typedef void* lldb_launch_info_t;
|
|
25
|
+
typedef void* lldb_type_t;
|
|
26
|
+
typedef void* lldb_watchpoint_t;
|
|
27
|
+
typedef void* lldb_command_interpreter_t;
|
|
28
|
+
typedef void* lldb_command_return_object_t;
|
|
29
|
+
|
|
30
|
+
// Initialization
|
|
31
|
+
void lldb_initialize(void);
|
|
32
|
+
void lldb_terminate(void);
|
|
33
|
+
|
|
34
|
+
// SBDebugger
|
|
35
|
+
lldb_debugger_t lldb_debugger_create(void);
|
|
36
|
+
void lldb_debugger_destroy(lldb_debugger_t dbg);
|
|
37
|
+
int lldb_debugger_is_valid(lldb_debugger_t dbg);
|
|
38
|
+
lldb_target_t lldb_debugger_create_target(lldb_debugger_t dbg,
|
|
39
|
+
const char* filename,
|
|
40
|
+
const char* arch,
|
|
41
|
+
const char* platform,
|
|
42
|
+
int add_dependent_modules,
|
|
43
|
+
lldb_error_t error);
|
|
44
|
+
lldb_target_t lldb_debugger_create_target_simple(lldb_debugger_t dbg,
|
|
45
|
+
const char* filename);
|
|
46
|
+
uint32_t lldb_debugger_get_num_targets(lldb_debugger_t dbg);
|
|
47
|
+
lldb_target_t lldb_debugger_get_target_at_index(lldb_debugger_t dbg, uint32_t index);
|
|
48
|
+
lldb_target_t lldb_debugger_get_selected_target(lldb_debugger_t dbg);
|
|
49
|
+
void lldb_debugger_set_selected_target(lldb_debugger_t dbg, lldb_target_t target);
|
|
50
|
+
int lldb_debugger_delete_target(lldb_debugger_t dbg, lldb_target_t target);
|
|
51
|
+
lldb_target_t lldb_debugger_find_target_with_process_id(lldb_debugger_t dbg, uint64_t pid);
|
|
52
|
+
void lldb_debugger_set_async(lldb_debugger_t dbg, int async);
|
|
53
|
+
int lldb_debugger_get_async(lldb_debugger_t dbg);
|
|
54
|
+
const char* lldb_debugger_get_version_string(void);
|
|
55
|
+
lldb_command_interpreter_t lldb_debugger_get_command_interpreter(lldb_debugger_t dbg);
|
|
56
|
+
void lldb_debugger_handle_command(lldb_debugger_t dbg, const char* command);
|
|
57
|
+
|
|
58
|
+
// SBTarget
|
|
59
|
+
void lldb_target_destroy(lldb_target_t target);
|
|
60
|
+
int lldb_target_is_valid(lldb_target_t target);
|
|
61
|
+
lldb_process_t lldb_target_launch_simple(lldb_target_t target,
|
|
62
|
+
const char** argv,
|
|
63
|
+
const char** envp,
|
|
64
|
+
const char* working_dir);
|
|
65
|
+
lldb_process_t lldb_target_launch(lldb_target_t target,
|
|
66
|
+
lldb_launch_info_t launch_info,
|
|
67
|
+
lldb_error_t error);
|
|
68
|
+
lldb_process_t lldb_target_attach_to_process_with_id(lldb_target_t target,
|
|
69
|
+
uint64_t pid,
|
|
70
|
+
lldb_error_t error);
|
|
71
|
+
lldb_process_t lldb_target_attach_to_process_with_name(lldb_target_t target,
|
|
72
|
+
const char* name,
|
|
73
|
+
int wait_for,
|
|
74
|
+
lldb_error_t error);
|
|
75
|
+
lldb_breakpoint_t lldb_target_breakpoint_create_by_name(lldb_target_t target,
|
|
76
|
+
const char* symbol_name,
|
|
77
|
+
const char* module_name);
|
|
78
|
+
lldb_breakpoint_t lldb_target_breakpoint_create_by_location(lldb_target_t target,
|
|
79
|
+
const char* file,
|
|
80
|
+
uint32_t line);
|
|
81
|
+
lldb_breakpoint_t lldb_target_breakpoint_create_by_address(lldb_target_t target,
|
|
82
|
+
uint64_t address);
|
|
83
|
+
lldb_breakpoint_t lldb_target_breakpoint_create_by_regex(lldb_target_t target,
|
|
84
|
+
const char* symbol_regex,
|
|
85
|
+
const char* module_name);
|
|
86
|
+
lldb_breakpoint_t lldb_target_breakpoint_create_by_source_regex(lldb_target_t target,
|
|
87
|
+
const char* source_regex,
|
|
88
|
+
const char* source_file);
|
|
89
|
+
int lldb_target_delete_breakpoint(lldb_target_t target, int32_t breakpoint_id);
|
|
90
|
+
int lldb_target_delete_all_breakpoints(lldb_target_t target);
|
|
91
|
+
int lldb_target_enable_all_breakpoints(lldb_target_t target);
|
|
92
|
+
int lldb_target_disable_all_breakpoints(lldb_target_t target);
|
|
93
|
+
lldb_breakpoint_t lldb_target_find_breakpoint_by_id(lldb_target_t target, int32_t id);
|
|
94
|
+
uint32_t lldb_target_get_num_breakpoints(lldb_target_t target);
|
|
95
|
+
lldb_breakpoint_t lldb_target_get_breakpoint_at_index(lldb_target_t target, uint32_t index);
|
|
96
|
+
lldb_process_t lldb_target_get_process(lldb_target_t target);
|
|
97
|
+
const char* lldb_target_get_executable_path(lldb_target_t target);
|
|
98
|
+
uint32_t lldb_target_get_num_modules(lldb_target_t target);
|
|
99
|
+
lldb_module_t lldb_target_get_module_at_index(lldb_target_t target, uint32_t index);
|
|
100
|
+
lldb_value_t lldb_target_evaluate_expression(lldb_target_t target, const char* expr);
|
|
101
|
+
size_t lldb_target_read_memory(lldb_target_t target, uint64_t addr, void* buf, size_t size, lldb_error_t error);
|
|
102
|
+
uint32_t lldb_target_get_address_byte_size(lldb_target_t target);
|
|
103
|
+
const char* lldb_target_get_triple(lldb_target_t target);
|
|
104
|
+
lldb_watchpoint_t lldb_target_watch_address(lldb_target_t target, uint64_t addr, size_t size, int read, int write, lldb_error_t error);
|
|
105
|
+
int lldb_target_delete_watchpoint(lldb_target_t target, int32_t watchpoint_id);
|
|
106
|
+
int lldb_target_delete_all_watchpoints(lldb_target_t target);
|
|
107
|
+
lldb_watchpoint_t lldb_target_find_watchpoint_by_id(lldb_target_t target, int32_t id);
|
|
108
|
+
uint32_t lldb_target_get_num_watchpoints(lldb_target_t target);
|
|
109
|
+
lldb_watchpoint_t lldb_target_get_watchpoint_at_index(lldb_target_t target, uint32_t index);
|
|
110
|
+
|
|
111
|
+
// SBLaunchInfo
|
|
112
|
+
lldb_launch_info_t lldb_launch_info_create(const char** argv);
|
|
113
|
+
void lldb_launch_info_destroy(lldb_launch_info_t info);
|
|
114
|
+
void lldb_launch_info_set_working_directory(lldb_launch_info_t info, const char* dir);
|
|
115
|
+
void lldb_launch_info_set_environment_entries(lldb_launch_info_t info,
|
|
116
|
+
const char** envp,
|
|
117
|
+
int append);
|
|
118
|
+
uint32_t lldb_launch_info_get_launch_flags(lldb_launch_info_t info);
|
|
119
|
+
void lldb_launch_info_set_launch_flags(lldb_launch_info_t info, uint32_t flags);
|
|
120
|
+
|
|
121
|
+
// SBProcess
|
|
122
|
+
void lldb_process_destroy(lldb_process_t process);
|
|
123
|
+
int lldb_process_is_valid(lldb_process_t process);
|
|
124
|
+
int lldb_process_continue(lldb_process_t process);
|
|
125
|
+
int lldb_process_stop(lldb_process_t process);
|
|
126
|
+
int lldb_process_kill(lldb_process_t process);
|
|
127
|
+
int lldb_process_detach(lldb_process_t process);
|
|
128
|
+
int lldb_process_destroy_process(lldb_process_t process);
|
|
129
|
+
int lldb_process_signal(lldb_process_t process, int signal);
|
|
130
|
+
int lldb_process_get_state(lldb_process_t process);
|
|
131
|
+
uint32_t lldb_process_get_num_threads(lldb_process_t process);
|
|
132
|
+
lldb_thread_t lldb_process_get_thread_at_index(lldb_process_t process, uint32_t index);
|
|
133
|
+
lldb_thread_t lldb_process_get_thread_by_id(lldb_process_t process, uint64_t tid);
|
|
134
|
+
lldb_thread_t lldb_process_get_thread_by_index_id(lldb_process_t process, uint32_t index_id);
|
|
135
|
+
lldb_thread_t lldb_process_get_selected_thread(lldb_process_t process);
|
|
136
|
+
int lldb_process_set_selected_thread_by_id(lldb_process_t process, uint64_t tid);
|
|
137
|
+
int lldb_process_set_selected_thread_by_index_id(lldb_process_t process, uint32_t index_id);
|
|
138
|
+
uint64_t lldb_process_get_process_id(lldb_process_t process);
|
|
139
|
+
int lldb_process_get_exit_status(lldb_process_t process);
|
|
140
|
+
const char* lldb_process_get_exit_description(lldb_process_t process);
|
|
141
|
+
size_t lldb_process_read_memory(lldb_process_t process, uint64_t addr, void* buf, size_t size, lldb_error_t error);
|
|
142
|
+
size_t lldb_process_write_memory(lldb_process_t process, uint64_t addr, const void* buf, size_t size, lldb_error_t error);
|
|
143
|
+
uint64_t lldb_process_allocate_memory(lldb_process_t process, size_t size, uint32_t permissions, lldb_error_t error);
|
|
144
|
+
int lldb_process_deallocate_memory(lldb_process_t process, uint64_t addr);
|
|
145
|
+
size_t lldb_process_read_cstring_from_memory(lldb_process_t process, uint64_t addr, void* buf, size_t size, lldb_error_t error);
|
|
146
|
+
size_t lldb_process_get_stdout(lldb_process_t process, char* buf, size_t size);
|
|
147
|
+
size_t lldb_process_get_stderr(lldb_process_t process, char* buf, size_t size);
|
|
148
|
+
size_t lldb_process_put_stdin(lldb_process_t process, const char* buf, size_t size);
|
|
149
|
+
int lldb_process_send_async_interrupt(lldb_process_t process);
|
|
150
|
+
uint32_t lldb_process_get_num_supported_hardware_watchpoints(lldb_process_t process, lldb_error_t error);
|
|
151
|
+
uint32_t lldb_process_get_unique_id(lldb_process_t process);
|
|
152
|
+
|
|
153
|
+
// SBThread
|
|
154
|
+
void lldb_thread_destroy(lldb_thread_t thread);
|
|
155
|
+
int lldb_thread_is_valid(lldb_thread_t thread);
|
|
156
|
+
int lldb_thread_step_over(lldb_thread_t thread);
|
|
157
|
+
int lldb_thread_step_into(lldb_thread_t thread);
|
|
158
|
+
int lldb_thread_step_out(lldb_thread_t thread);
|
|
159
|
+
int lldb_thread_step_instruction(lldb_thread_t thread, int step_over);
|
|
160
|
+
int lldb_thread_run_to_address(lldb_thread_t thread, uint64_t addr);
|
|
161
|
+
uint32_t lldb_thread_get_num_frames(lldb_thread_t thread);
|
|
162
|
+
lldb_frame_t lldb_thread_get_frame_at_index(lldb_thread_t thread, uint32_t index);
|
|
163
|
+
lldb_frame_t lldb_thread_get_selected_frame(lldb_thread_t thread);
|
|
164
|
+
int lldb_thread_set_selected_frame(lldb_thread_t thread, uint32_t index);
|
|
165
|
+
uint64_t lldb_thread_get_thread_id(lldb_thread_t thread);
|
|
166
|
+
uint32_t lldb_thread_get_index_id(lldb_thread_t thread);
|
|
167
|
+
const char* lldb_thread_get_name(lldb_thread_t thread);
|
|
168
|
+
const char* lldb_thread_get_queue_name(lldb_thread_t thread);
|
|
169
|
+
int lldb_thread_get_stop_reason(lldb_thread_t thread);
|
|
170
|
+
const char* lldb_thread_get_stop_description(lldb_thread_t thread, size_t max_size);
|
|
171
|
+
uint64_t lldb_thread_get_stop_reason_data_count(lldb_thread_t thread);
|
|
172
|
+
uint64_t lldb_thread_get_stop_reason_data_at_index(lldb_thread_t thread, uint32_t index);
|
|
173
|
+
int lldb_thread_is_stopped(lldb_thread_t thread);
|
|
174
|
+
int lldb_thread_is_suspended(lldb_thread_t thread);
|
|
175
|
+
int lldb_thread_suspend(lldb_thread_t thread);
|
|
176
|
+
int lldb_thread_resume(lldb_thread_t thread);
|
|
177
|
+
lldb_process_t lldb_thread_get_process(lldb_thread_t thread);
|
|
178
|
+
|
|
179
|
+
// SBFrame
|
|
180
|
+
void lldb_frame_destroy(lldb_frame_t frame);
|
|
181
|
+
int lldb_frame_is_valid(lldb_frame_t frame);
|
|
182
|
+
const char* lldb_frame_get_function_name(lldb_frame_t frame);
|
|
183
|
+
const char* lldb_frame_get_display_function_name(lldb_frame_t frame);
|
|
184
|
+
uint32_t lldb_frame_get_line(lldb_frame_t frame);
|
|
185
|
+
const char* lldb_frame_get_file_path(lldb_frame_t frame);
|
|
186
|
+
uint32_t lldb_frame_get_column(lldb_frame_t frame);
|
|
187
|
+
uint64_t lldb_frame_get_pc(lldb_frame_t frame);
|
|
188
|
+
int lldb_frame_set_pc(lldb_frame_t frame, uint64_t new_pc);
|
|
189
|
+
uint64_t lldb_frame_get_sp(lldb_frame_t frame);
|
|
190
|
+
uint64_t lldb_frame_get_fp(lldb_frame_t frame);
|
|
191
|
+
lldb_value_t lldb_frame_find_variable(lldb_frame_t frame, const char* name);
|
|
192
|
+
lldb_value_t lldb_frame_evaluate_expression(lldb_frame_t frame, const char* expr);
|
|
193
|
+
lldb_value_t lldb_frame_get_value_for_variable_path(lldb_frame_t frame, const char* path);
|
|
194
|
+
uint32_t lldb_frame_get_frame_id(lldb_frame_t frame);
|
|
195
|
+
lldb_thread_t lldb_frame_get_thread(lldb_frame_t frame);
|
|
196
|
+
lldb_symbol_context_t lldb_frame_get_symbol_context(lldb_frame_t frame, uint32_t scope);
|
|
197
|
+
lldb_value_list_t lldb_frame_get_variables(lldb_frame_t frame, int arguments, int locals, int statics, int in_scope_only);
|
|
198
|
+
lldb_value_list_t lldb_frame_get_registers(lldb_frame_t frame);
|
|
199
|
+
int lldb_frame_is_inlined(lldb_frame_t frame);
|
|
200
|
+
const char* lldb_frame_disassemble(lldb_frame_t frame);
|
|
201
|
+
lldb_module_t lldb_frame_get_module(lldb_frame_t frame);
|
|
202
|
+
|
|
203
|
+
// SBBreakpoint
|
|
204
|
+
void lldb_breakpoint_destroy(lldb_breakpoint_t bp);
|
|
205
|
+
int lldb_breakpoint_is_valid(lldb_breakpoint_t bp);
|
|
206
|
+
int32_t lldb_breakpoint_get_id(lldb_breakpoint_t bp);
|
|
207
|
+
int lldb_breakpoint_is_enabled(lldb_breakpoint_t bp);
|
|
208
|
+
void lldb_breakpoint_set_enabled(lldb_breakpoint_t bp, int enabled);
|
|
209
|
+
int lldb_breakpoint_is_one_shot(lldb_breakpoint_t bp);
|
|
210
|
+
void lldb_breakpoint_set_one_shot(lldb_breakpoint_t bp, int one_shot);
|
|
211
|
+
uint32_t lldb_breakpoint_get_hit_count(lldb_breakpoint_t bp);
|
|
212
|
+
uint32_t lldb_breakpoint_get_ignore_count(lldb_breakpoint_t bp);
|
|
213
|
+
void lldb_breakpoint_set_ignore_count(lldb_breakpoint_t bp, uint32_t count);
|
|
214
|
+
const char* lldb_breakpoint_get_condition(lldb_breakpoint_t bp);
|
|
215
|
+
void lldb_breakpoint_set_condition(lldb_breakpoint_t bp, const char* condition);
|
|
216
|
+
uint32_t lldb_breakpoint_get_num_locations(lldb_breakpoint_t bp);
|
|
217
|
+
lldb_breakpoint_location_t lldb_breakpoint_get_location_at_index(lldb_breakpoint_t bp, uint32_t index);
|
|
218
|
+
lldb_breakpoint_location_t lldb_breakpoint_find_location_by_id(lldb_breakpoint_t bp, int32_t id);
|
|
219
|
+
int lldb_breakpoint_is_hardware(lldb_breakpoint_t bp);
|
|
220
|
+
int lldb_breakpoint_get_auto_continue(lldb_breakpoint_t bp);
|
|
221
|
+
void lldb_breakpoint_set_auto_continue(lldb_breakpoint_t bp, int auto_continue);
|
|
222
|
+
uint64_t lldb_breakpoint_get_thread_id(lldb_breakpoint_t bp);
|
|
223
|
+
void lldb_breakpoint_set_thread_id(lldb_breakpoint_t bp, uint64_t tid);
|
|
224
|
+
const char* lldb_breakpoint_get_thread_name(lldb_breakpoint_t bp);
|
|
225
|
+
void lldb_breakpoint_set_thread_name(lldb_breakpoint_t bp, const char* name);
|
|
226
|
+
uint32_t lldb_breakpoint_get_thread_index(lldb_breakpoint_t bp);
|
|
227
|
+
void lldb_breakpoint_set_thread_index(lldb_breakpoint_t bp, uint32_t index);
|
|
228
|
+
|
|
229
|
+
// SBBreakpointLocation
|
|
230
|
+
void lldb_breakpoint_location_destroy(lldb_breakpoint_location_t loc);
|
|
231
|
+
int lldb_breakpoint_location_is_valid(lldb_breakpoint_location_t loc);
|
|
232
|
+
int32_t lldb_breakpoint_location_get_id(lldb_breakpoint_location_t loc);
|
|
233
|
+
uint64_t lldb_breakpoint_location_get_load_address(lldb_breakpoint_location_t loc);
|
|
234
|
+
int lldb_breakpoint_location_is_enabled(lldb_breakpoint_location_t loc);
|
|
235
|
+
void lldb_breakpoint_location_set_enabled(lldb_breakpoint_location_t loc, int enabled);
|
|
236
|
+
uint32_t lldb_breakpoint_location_get_hit_count(lldb_breakpoint_location_t loc);
|
|
237
|
+
uint32_t lldb_breakpoint_location_get_ignore_count(lldb_breakpoint_location_t loc);
|
|
238
|
+
void lldb_breakpoint_location_set_ignore_count(lldb_breakpoint_location_t loc, uint32_t count);
|
|
239
|
+
const char* lldb_breakpoint_location_get_condition(lldb_breakpoint_location_t loc);
|
|
240
|
+
void lldb_breakpoint_location_set_condition(lldb_breakpoint_location_t loc, const char* condition);
|
|
241
|
+
lldb_breakpoint_t lldb_breakpoint_location_get_breakpoint(lldb_breakpoint_location_t loc);
|
|
242
|
+
|
|
243
|
+
// SBValue
|
|
244
|
+
void lldb_value_destroy(lldb_value_t value);
|
|
245
|
+
int lldb_value_is_valid(lldb_value_t value);
|
|
246
|
+
const char* lldb_value_get_name(lldb_value_t value);
|
|
247
|
+
const char* lldb_value_get_value(lldb_value_t value);
|
|
248
|
+
const char* lldb_value_get_summary(lldb_value_t value);
|
|
249
|
+
const char* lldb_value_get_type_name(lldb_value_t value);
|
|
250
|
+
lldb_type_t lldb_value_get_type(lldb_value_t value);
|
|
251
|
+
uint32_t lldb_value_get_num_children(lldb_value_t value);
|
|
252
|
+
lldb_value_t lldb_value_get_child_at_index(lldb_value_t value, uint32_t index);
|
|
253
|
+
lldb_value_t lldb_value_get_child_member_with_name(lldb_value_t value, const char* name);
|
|
254
|
+
int64_t lldb_value_get_value_as_signed(lldb_value_t value);
|
|
255
|
+
uint64_t lldb_value_get_value_as_unsigned(lldb_value_t value);
|
|
256
|
+
uint64_t lldb_value_get_byte_size(lldb_value_t value);
|
|
257
|
+
int lldb_value_might_have_children(lldb_value_t value);
|
|
258
|
+
int lldb_value_get_error(lldb_value_t value, lldb_error_t error);
|
|
259
|
+
lldb_value_t lldb_value_dereference(lldb_value_t value);
|
|
260
|
+
lldb_value_t lldb_value_address_of(lldb_value_t value);
|
|
261
|
+
lldb_value_t lldb_value_cast(lldb_value_t value, lldb_type_t type);
|
|
262
|
+
uint64_t lldb_value_get_load_address(lldb_value_t value);
|
|
263
|
+
int lldb_value_get_value_type(lldb_value_t value);
|
|
264
|
+
int lldb_value_set_value_from_cstring(lldb_value_t value, const char* str, lldb_error_t error);
|
|
265
|
+
lldb_value_t lldb_value_create_child_at_offset(lldb_value_t value, const char* name, lldb_type_t type, uint32_t offset);
|
|
266
|
+
lldb_value_t lldb_value_create_value_from_address(lldb_value_t value, const char* name, uint64_t addr, lldb_type_t type);
|
|
267
|
+
lldb_value_t lldb_value_create_value_from_expression(lldb_value_t value, const char* name, const char* expr);
|
|
268
|
+
lldb_watchpoint_t lldb_value_watch(lldb_value_t value, int resolve_location, int read, int write, lldb_error_t error);
|
|
269
|
+
const char* lldb_value_get_expression_path(lldb_value_t value);
|
|
270
|
+
int lldb_value_is_pointer_type(lldb_value_t value);
|
|
271
|
+
lldb_value_t lldb_value_get_non_synthetic_value(lldb_value_t value);
|
|
272
|
+
|
|
273
|
+
// SBValueList
|
|
274
|
+
void lldb_value_list_destroy(lldb_value_list_t list);
|
|
275
|
+
int lldb_value_list_is_valid(lldb_value_list_t list);
|
|
276
|
+
uint32_t lldb_value_list_get_size(lldb_value_list_t list);
|
|
277
|
+
lldb_value_t lldb_value_list_get_value_at_index(lldb_value_list_t list, uint32_t index);
|
|
278
|
+
lldb_value_t lldb_value_list_get_first_value_by_name(lldb_value_list_t list, const char* name);
|
|
279
|
+
|
|
280
|
+
// SBError
|
|
281
|
+
lldb_error_t lldb_error_create(void);
|
|
282
|
+
void lldb_error_destroy(lldb_error_t error);
|
|
283
|
+
int lldb_error_success(lldb_error_t error);
|
|
284
|
+
int lldb_error_fail(lldb_error_t error);
|
|
285
|
+
const char* lldb_error_get_cstring(lldb_error_t error);
|
|
286
|
+
uint32_t lldb_error_get_error(lldb_error_t error);
|
|
287
|
+
void lldb_error_clear(lldb_error_t error);
|
|
288
|
+
void lldb_error_set_error_string(lldb_error_t error, const char* str);
|
|
289
|
+
|
|
290
|
+
// SBModule
|
|
291
|
+
void lldb_module_destroy(lldb_module_t module);
|
|
292
|
+
int lldb_module_is_valid(lldb_module_t module);
|
|
293
|
+
const char* lldb_module_get_file_path(lldb_module_t module);
|
|
294
|
+
const char* lldb_module_get_platform_file_path(lldb_module_t module);
|
|
295
|
+
uint32_t lldb_module_get_num_symbols(lldb_module_t module);
|
|
296
|
+
|
|
297
|
+
// SBSymbolContext
|
|
298
|
+
void lldb_symbol_context_destroy(lldb_symbol_context_t ctx);
|
|
299
|
+
int lldb_symbol_context_is_valid(lldb_symbol_context_t ctx);
|
|
300
|
+
lldb_module_t lldb_symbol_context_get_module(lldb_symbol_context_t ctx);
|
|
301
|
+
const char* lldb_symbol_context_get_function_name(lldb_symbol_context_t ctx);
|
|
302
|
+
|
|
303
|
+
// SBType
|
|
304
|
+
void lldb_type_destroy(lldb_type_t type);
|
|
305
|
+
int lldb_type_is_valid(lldb_type_t type);
|
|
306
|
+
const char* lldb_type_get_name(lldb_type_t type);
|
|
307
|
+
const char* lldb_type_get_display_type_name(lldb_type_t type);
|
|
308
|
+
uint64_t lldb_type_get_byte_size(lldb_type_t type);
|
|
309
|
+
int lldb_type_is_pointer_type(lldb_type_t type);
|
|
310
|
+
int lldb_type_is_reference_type(lldb_type_t type);
|
|
311
|
+
int lldb_type_is_array_type(lldb_type_t type);
|
|
312
|
+
int lldb_type_is_vector_type(lldb_type_t type);
|
|
313
|
+
int lldb_type_is_typedef_type(lldb_type_t type);
|
|
314
|
+
int lldb_type_is_function_type(lldb_type_t type);
|
|
315
|
+
int lldb_type_is_polymorphic_class(lldb_type_t type);
|
|
316
|
+
lldb_type_t lldb_type_get_pointer_type(lldb_type_t type);
|
|
317
|
+
lldb_type_t lldb_type_get_pointee_type(lldb_type_t type);
|
|
318
|
+
lldb_type_t lldb_type_get_reference_type(lldb_type_t type);
|
|
319
|
+
lldb_type_t lldb_type_get_dereferenced_type(lldb_type_t type);
|
|
320
|
+
lldb_type_t lldb_type_get_unqualified_type(lldb_type_t type);
|
|
321
|
+
lldb_type_t lldb_type_get_canonical_type(lldb_type_t type);
|
|
322
|
+
lldb_type_t lldb_type_get_array_element_type(lldb_type_t type);
|
|
323
|
+
uint64_t lldb_type_get_array_size(lldb_type_t type);
|
|
324
|
+
uint32_t lldb_type_get_num_fields(lldb_type_t type);
|
|
325
|
+
uint32_t lldb_type_get_num_direct_base_classes(lldb_type_t type);
|
|
326
|
+
uint32_t lldb_type_get_num_virtual_base_classes(lldb_type_t type);
|
|
327
|
+
int lldb_type_get_basic_type(lldb_type_t type);
|
|
328
|
+
|
|
329
|
+
// SBWatchpoint
|
|
330
|
+
void lldb_watchpoint_destroy(lldb_watchpoint_t wp);
|
|
331
|
+
int lldb_watchpoint_is_valid(lldb_watchpoint_t wp);
|
|
332
|
+
int32_t lldb_watchpoint_get_id(lldb_watchpoint_t wp);
|
|
333
|
+
int lldb_watchpoint_is_enabled(lldb_watchpoint_t wp);
|
|
334
|
+
void lldb_watchpoint_set_enabled(lldb_watchpoint_t wp, int enabled);
|
|
335
|
+
uint32_t lldb_watchpoint_get_hit_count(lldb_watchpoint_t wp);
|
|
336
|
+
uint32_t lldb_watchpoint_get_ignore_count(lldb_watchpoint_t wp);
|
|
337
|
+
void lldb_watchpoint_set_ignore_count(lldb_watchpoint_t wp, uint32_t count);
|
|
338
|
+
const char* lldb_watchpoint_get_condition(lldb_watchpoint_t wp);
|
|
339
|
+
void lldb_watchpoint_set_condition(lldb_watchpoint_t wp, const char* condition);
|
|
340
|
+
uint64_t lldb_watchpoint_get_watch_address(lldb_watchpoint_t wp);
|
|
341
|
+
size_t lldb_watchpoint_get_watch_size(lldb_watchpoint_t wp);
|
|
342
|
+
int lldb_watchpoint_is_watching_reads(lldb_watchpoint_t wp);
|
|
343
|
+
int lldb_watchpoint_is_watching_writes(lldb_watchpoint_t wp);
|
|
344
|
+
|
|
345
|
+
// SBCommandInterpreter
|
|
346
|
+
void lldb_command_interpreter_destroy(lldb_command_interpreter_t interp);
|
|
347
|
+
int lldb_command_interpreter_is_valid(lldb_command_interpreter_t interp);
|
|
348
|
+
int lldb_command_interpreter_handle_command(lldb_command_interpreter_t interp,
|
|
349
|
+
const char* command,
|
|
350
|
+
lldb_command_return_object_t result,
|
|
351
|
+
int add_to_history);
|
|
352
|
+
int lldb_command_interpreter_command_exists(lldb_command_interpreter_t interp, const char* command);
|
|
353
|
+
int lldb_command_interpreter_alias_exists(lldb_command_interpreter_t interp, const char* alias);
|
|
354
|
+
|
|
355
|
+
// SBCommandReturnObject
|
|
356
|
+
lldb_command_return_object_t lldb_command_return_object_create(void);
|
|
357
|
+
void lldb_command_return_object_destroy(lldb_command_return_object_t obj);
|
|
358
|
+
int lldb_command_return_object_is_valid(lldb_command_return_object_t obj);
|
|
359
|
+
const char* lldb_command_return_object_get_output(lldb_command_return_object_t obj);
|
|
360
|
+
const char* lldb_command_return_object_get_error(lldb_command_return_object_t obj);
|
|
361
|
+
int lldb_command_return_object_succeeded(lldb_command_return_object_t obj);
|
|
362
|
+
void lldb_command_return_object_clear(lldb_command_return_object_t obj);
|
|
363
|
+
|
|
364
|
+
// State constants
|
|
365
|
+
#define LLDB_STATE_INVALID 0
|
|
366
|
+
#define LLDB_STATE_UNLOADED 1
|
|
367
|
+
#define LLDB_STATE_CONNECTED 2
|
|
368
|
+
#define LLDB_STATE_ATTACHING 3
|
|
369
|
+
#define LLDB_STATE_LAUNCHING 4
|
|
370
|
+
#define LLDB_STATE_STOPPED 5
|
|
371
|
+
#define LLDB_STATE_RUNNING 6
|
|
372
|
+
#define LLDB_STATE_STEPPING 7
|
|
373
|
+
#define LLDB_STATE_CRASHED 8
|
|
374
|
+
#define LLDB_STATE_DETACHED 9
|
|
375
|
+
#define LLDB_STATE_EXITED 10
|
|
376
|
+
#define LLDB_STATE_SUSPENDED 11
|
|
377
|
+
|
|
378
|
+
// Stop reason constants
|
|
379
|
+
#define LLDB_STOP_REASON_INVALID 0
|
|
380
|
+
#define LLDB_STOP_REASON_NONE 1
|
|
381
|
+
#define LLDB_STOP_REASON_TRACE 2
|
|
382
|
+
#define LLDB_STOP_REASON_BREAKPOINT 3
|
|
383
|
+
#define LLDB_STOP_REASON_WATCHPOINT 4
|
|
384
|
+
#define LLDB_STOP_REASON_SIGNAL 5
|
|
385
|
+
#define LLDB_STOP_REASON_EXCEPTION 6
|
|
386
|
+
#define LLDB_STOP_REASON_EXEC 7
|
|
387
|
+
#define LLDB_STOP_REASON_PLAN_COMPLETE 8
|
|
388
|
+
#define LLDB_STOP_REASON_THREAD_EXITING 9
|
|
389
|
+
#define LLDB_STOP_REASON_INSTRUMENTATION 10
|
|
390
|
+
|
|
391
|
+
// Value type constants
|
|
392
|
+
#define LLDB_VALUE_TYPE_INVALID 0
|
|
393
|
+
#define LLDB_VALUE_TYPE_VARIABLE_GLOBAL 1
|
|
394
|
+
#define LLDB_VALUE_TYPE_VARIABLE_STATIC 2
|
|
395
|
+
#define LLDB_VALUE_TYPE_VARIABLE_ARGUMENT 3
|
|
396
|
+
#define LLDB_VALUE_TYPE_VARIABLE_LOCAL 4
|
|
397
|
+
#define LLDB_VALUE_TYPE_REGISTER 5
|
|
398
|
+
#define LLDB_VALUE_TYPE_REGISTER_SET 6
|
|
399
|
+
#define LLDB_VALUE_TYPE_CONSTANT_RESULT 7
|
|
400
|
+
|
|
401
|
+
// Basic type constants
|
|
402
|
+
#define LLDB_BASIC_TYPE_INVALID 0
|
|
403
|
+
#define LLDB_BASIC_TYPE_VOID 1
|
|
404
|
+
#define LLDB_BASIC_TYPE_CHAR 2
|
|
405
|
+
#define LLDB_BASIC_TYPE_SIGNED_CHAR 3
|
|
406
|
+
#define LLDB_BASIC_TYPE_UNSIGNED_CHAR 4
|
|
407
|
+
#define LLDB_BASIC_TYPE_SHORT 6
|
|
408
|
+
#define LLDB_BASIC_TYPE_UNSIGNED_SHORT 7
|
|
409
|
+
#define LLDB_BASIC_TYPE_INT 8
|
|
410
|
+
#define LLDB_BASIC_TYPE_UNSIGNED_INT 9
|
|
411
|
+
#define LLDB_BASIC_TYPE_LONG 10
|
|
412
|
+
#define LLDB_BASIC_TYPE_UNSIGNED_LONG 11
|
|
413
|
+
#define LLDB_BASIC_TYPE_LONG_LONG 12
|
|
414
|
+
#define LLDB_BASIC_TYPE_UNSIGNED_LONG_LONG 13
|
|
415
|
+
#define LLDB_BASIC_TYPE_FLOAT 15
|
|
416
|
+
#define LLDB_BASIC_TYPE_DOUBLE 16
|
|
417
|
+
#define LLDB_BASIC_TYPE_LONG_DOUBLE 17
|
|
418
|
+
#define LLDB_BASIC_TYPE_BOOL 20
|
|
419
|
+
|
|
420
|
+
#ifdef __cplusplus
|
|
421
|
+
}
|
|
422
|
+
#endif
|
|
423
|
+
|
|
424
|
+
#endif // LLDB_WRAPPER_H
|
|
Binary file
|
data/ext/lldb/mkmf.log
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
find_executable: checking for llvm-config... -------------------- no
|
|
2
|
+
|
|
3
|
+
--------------------
|
|
4
|
+
|
|
5
|
+
find_executable: checking for llvm-config-18... -------------------- no
|
|
6
|
+
|
|
7
|
+
--------------------
|
|
8
|
+
|
|
9
|
+
find_executable: checking for llvm-config-17... -------------------- no
|
|
10
|
+
|
|
11
|
+
--------------------
|
|
12
|
+
|
|
13
|
+
find_executable: checking for llvm-config-16... -------------------- no
|
|
14
|
+
|
|
15
|
+
--------------------
|
|
16
|
+
|
|
17
|
+
find_executable: checking for llvm-config-15... -------------------- no
|
|
18
|
+
|
|
19
|
+
--------------------
|
|
20
|
+
|
|
21
|
+
find_executable: checking for llvm-config-14... -------------------- no
|
|
22
|
+
|
|
23
|
+
--------------------
|
|
24
|
+
|
|
@@ -0,0 +1,233 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
# rbs_inline: enabled
|
|
4
|
+
|
|
5
|
+
module LLDB
|
|
6
|
+
class Breakpoint
|
|
7
|
+
# @rbs return: Target
|
|
8
|
+
attr_reader :target
|
|
9
|
+
|
|
10
|
+
# @rbs ptr: FFI::Pointer
|
|
11
|
+
# @rbs target: Target
|
|
12
|
+
# @rbs return: void
|
|
13
|
+
def initialize(ptr, target:)
|
|
14
|
+
@ptr = ptr # : FFI::Pointer
|
|
15
|
+
@target = target
|
|
16
|
+
ObjectSpace.define_finalizer(self, self.class.release(@ptr))
|
|
17
|
+
end
|
|
18
|
+
|
|
19
|
+
# @rbs ptr: FFI::Pointer
|
|
20
|
+
# @rbs return: ^(Integer) -> void
|
|
21
|
+
def self.release(ptr)
|
|
22
|
+
->(_id) { FFIBindings.lldb_breakpoint_destroy(ptr) unless ptr.null? }
|
|
23
|
+
end
|
|
24
|
+
|
|
25
|
+
# @rbs return: bool
|
|
26
|
+
def valid?
|
|
27
|
+
!@ptr.null? && FFIBindings.lldb_breakpoint_is_valid(@ptr) != 0
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
# @rbs return: Integer
|
|
31
|
+
def id
|
|
32
|
+
return -1 unless valid?
|
|
33
|
+
|
|
34
|
+
FFIBindings.lldb_breakpoint_get_id(@ptr)
|
|
35
|
+
end
|
|
36
|
+
|
|
37
|
+
# @rbs return: bool
|
|
38
|
+
def enabled?
|
|
39
|
+
return false unless valid?
|
|
40
|
+
|
|
41
|
+
FFIBindings.lldb_breakpoint_is_enabled(@ptr) != 0
|
|
42
|
+
end
|
|
43
|
+
|
|
44
|
+
# @rbs value: bool
|
|
45
|
+
# @rbs return: void
|
|
46
|
+
def enabled=(value)
|
|
47
|
+
raise InvalidObjectError, 'Breakpoint is not valid' unless valid?
|
|
48
|
+
|
|
49
|
+
FFIBindings.lldb_breakpoint_set_enabled(@ptr, value ? 1 : 0)
|
|
50
|
+
end
|
|
51
|
+
|
|
52
|
+
# @rbs return: void
|
|
53
|
+
def enable
|
|
54
|
+
self.enabled = true
|
|
55
|
+
end
|
|
56
|
+
|
|
57
|
+
# @rbs return: void
|
|
58
|
+
def disable
|
|
59
|
+
self.enabled = false
|
|
60
|
+
end
|
|
61
|
+
|
|
62
|
+
# @rbs return: bool
|
|
63
|
+
def one_shot?
|
|
64
|
+
return false unless valid?
|
|
65
|
+
|
|
66
|
+
FFIBindings.lldb_breakpoint_is_one_shot(@ptr) != 0
|
|
67
|
+
end
|
|
68
|
+
|
|
69
|
+
# @rbs value: bool
|
|
70
|
+
# @rbs return: void
|
|
71
|
+
def one_shot=(value)
|
|
72
|
+
raise InvalidObjectError, 'Breakpoint is not valid' unless valid?
|
|
73
|
+
|
|
74
|
+
FFIBindings.lldb_breakpoint_set_one_shot(@ptr, value ? 1 : 0)
|
|
75
|
+
end
|
|
76
|
+
|
|
77
|
+
# @rbs return: Integer
|
|
78
|
+
def hit_count
|
|
79
|
+
return 0 unless valid?
|
|
80
|
+
|
|
81
|
+
FFIBindings.lldb_breakpoint_get_hit_count(@ptr)
|
|
82
|
+
end
|
|
83
|
+
|
|
84
|
+
# @rbs return: Integer
|
|
85
|
+
def ignore_count
|
|
86
|
+
return 0 unless valid?
|
|
87
|
+
|
|
88
|
+
FFIBindings.lldb_breakpoint_get_ignore_count(@ptr)
|
|
89
|
+
end
|
|
90
|
+
|
|
91
|
+
# @rbs count: Integer
|
|
92
|
+
# @rbs return: void
|
|
93
|
+
def ignore_count=(count)
|
|
94
|
+
raise InvalidObjectError, 'Breakpoint is not valid' unless valid?
|
|
95
|
+
|
|
96
|
+
FFIBindings.lldb_breakpoint_set_ignore_count(@ptr, count)
|
|
97
|
+
end
|
|
98
|
+
|
|
99
|
+
# @rbs return: String?
|
|
100
|
+
def condition
|
|
101
|
+
return nil unless valid?
|
|
102
|
+
|
|
103
|
+
cond = FFIBindings.lldb_breakpoint_get_condition(@ptr)
|
|
104
|
+
cond.nil? || cond.empty? ? nil : cond
|
|
105
|
+
end
|
|
106
|
+
|
|
107
|
+
# @rbs expr: String?
|
|
108
|
+
# @rbs return: void
|
|
109
|
+
def condition=(expr)
|
|
110
|
+
raise InvalidObjectError, 'Breakpoint is not valid' unless valid?
|
|
111
|
+
|
|
112
|
+
FFIBindings.lldb_breakpoint_set_condition(@ptr, expr)
|
|
113
|
+
end
|
|
114
|
+
|
|
115
|
+
# @rbs return: Integer
|
|
116
|
+
def num_locations
|
|
117
|
+
return 0 unless valid?
|
|
118
|
+
|
|
119
|
+
FFIBindings.lldb_breakpoint_get_num_locations(@ptr)
|
|
120
|
+
end
|
|
121
|
+
|
|
122
|
+
# @rbs return: bool
|
|
123
|
+
def delete
|
|
124
|
+
raise InvalidObjectError, 'Breakpoint is not valid' unless valid?
|
|
125
|
+
|
|
126
|
+
target.delete_breakpoint(id)
|
|
127
|
+
end
|
|
128
|
+
|
|
129
|
+
# @rbs return: String
|
|
130
|
+
def to_s
|
|
131
|
+
"Breakpoint #{id}: enabled=#{enabled?}, hit_count=#{hit_count}, locations=#{num_locations}"
|
|
132
|
+
end
|
|
133
|
+
|
|
134
|
+
# @rbs index: Integer
|
|
135
|
+
# @rbs return: BreakpointLocation?
|
|
136
|
+
def location_at_index(index)
|
|
137
|
+
raise InvalidObjectError, 'Breakpoint is not valid' unless valid?
|
|
138
|
+
|
|
139
|
+
loc_ptr = FFIBindings.lldb_breakpoint_get_location_at_index(@ptr, index)
|
|
140
|
+
return nil if loc_ptr.nil? || loc_ptr.null?
|
|
141
|
+
|
|
142
|
+
BreakpointLocation.new(loc_ptr, breakpoint: self)
|
|
143
|
+
end
|
|
144
|
+
|
|
145
|
+
# @rbs location_id: Integer
|
|
146
|
+
# @rbs return: BreakpointLocation?
|
|
147
|
+
def find_location_by_id(location_id)
|
|
148
|
+
raise InvalidObjectError, 'Breakpoint is not valid' unless valid?
|
|
149
|
+
|
|
150
|
+
loc_ptr = FFIBindings.lldb_breakpoint_find_location_by_id(@ptr, location_id)
|
|
151
|
+
return nil if loc_ptr.nil? || loc_ptr.null?
|
|
152
|
+
|
|
153
|
+
BreakpointLocation.new(loc_ptr, breakpoint: self)
|
|
154
|
+
end
|
|
155
|
+
|
|
156
|
+
# @rbs return: Array[BreakpointLocation]
|
|
157
|
+
def locations
|
|
158
|
+
(0...num_locations).map { |i| location_at_index(i) }.compact
|
|
159
|
+
end
|
|
160
|
+
|
|
161
|
+
# @rbs return: bool
|
|
162
|
+
def hardware?
|
|
163
|
+
return false unless valid?
|
|
164
|
+
|
|
165
|
+
FFIBindings.lldb_breakpoint_is_hardware(@ptr) != 0
|
|
166
|
+
end
|
|
167
|
+
|
|
168
|
+
# @rbs return: bool
|
|
169
|
+
def auto_continue?
|
|
170
|
+
return false unless valid?
|
|
171
|
+
|
|
172
|
+
FFIBindings.lldb_breakpoint_get_auto_continue(@ptr) != 0
|
|
173
|
+
end
|
|
174
|
+
|
|
175
|
+
# @rbs value: bool
|
|
176
|
+
# @rbs return: void
|
|
177
|
+
def auto_continue=(value)
|
|
178
|
+
raise InvalidObjectError, 'Breakpoint is not valid' unless valid?
|
|
179
|
+
|
|
180
|
+
FFIBindings.lldb_breakpoint_set_auto_continue(@ptr, value ? 1 : 0)
|
|
181
|
+
end
|
|
182
|
+
|
|
183
|
+
# @rbs return: Integer
|
|
184
|
+
def thread_id
|
|
185
|
+
return 0 unless valid?
|
|
186
|
+
|
|
187
|
+
FFIBindings.lldb_breakpoint_get_thread_id(@ptr)
|
|
188
|
+
end
|
|
189
|
+
|
|
190
|
+
# @rbs value: Integer
|
|
191
|
+
# @rbs return: void
|
|
192
|
+
def thread_id=(value)
|
|
193
|
+
raise InvalidObjectError, 'Breakpoint is not valid' unless valid?
|
|
194
|
+
|
|
195
|
+
FFIBindings.lldb_breakpoint_set_thread_id(@ptr, value)
|
|
196
|
+
end
|
|
197
|
+
|
|
198
|
+
# @rbs return: String?
|
|
199
|
+
def thread_name
|
|
200
|
+
return nil unless valid?
|
|
201
|
+
|
|
202
|
+
FFIBindings.lldb_breakpoint_get_thread_name(@ptr)
|
|
203
|
+
end
|
|
204
|
+
|
|
205
|
+
# @rbs value: String?
|
|
206
|
+
# @rbs return: void
|
|
207
|
+
def thread_name=(value)
|
|
208
|
+
raise InvalidObjectError, 'Breakpoint is not valid' unless valid?
|
|
209
|
+
|
|
210
|
+
FFIBindings.lldb_breakpoint_set_thread_name(@ptr, value)
|
|
211
|
+
end
|
|
212
|
+
|
|
213
|
+
# @rbs return: Integer
|
|
214
|
+
def thread_index
|
|
215
|
+
return 0 unless valid?
|
|
216
|
+
|
|
217
|
+
FFIBindings.lldb_breakpoint_get_thread_index(@ptr)
|
|
218
|
+
end
|
|
219
|
+
|
|
220
|
+
# @rbs value: Integer
|
|
221
|
+
# @rbs return: void
|
|
222
|
+
def thread_index=(value)
|
|
223
|
+
raise InvalidObjectError, 'Breakpoint is not valid' unless valid?
|
|
224
|
+
|
|
225
|
+
FFIBindings.lldb_breakpoint_set_thread_index(@ptr, value)
|
|
226
|
+
end
|
|
227
|
+
|
|
228
|
+
# @rbs return: FFI::Pointer
|
|
229
|
+
def to_ptr
|
|
230
|
+
@ptr
|
|
231
|
+
end
|
|
232
|
+
end
|
|
233
|
+
end
|