LLDB mainline
SBProcess.h
Go to the documentation of this file.
1//===-- SBProcess.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 LLDB_API_SBPROCESS_H
10#define LLDB_API_SBPROCESS_H
11
12#include "lldb/API/SBDefines.h"
13#include "lldb/API/SBError.h"
15#include "lldb/API/SBQueue.h"
16#include "lldb/API/SBTarget.h"
17#include <cstdio>
18
19namespace lldb_private {
20namespace python {
21class SWIGBridge;
22}
23} // namespace lldb_private
24
25namespace lldb {
26
27class SBEvent;
28
30public:
31 /// Broadcaster event bits definitions.
32 FLAGS_ANONYMOUS_ENUM(){eBroadcastBitStateChanged = (1 << 0),
33 eBroadcastBitInterrupt = (1 << 1),
34 eBroadcastBitSTDOUT = (1 << 2),
35 eBroadcastBitSTDERR = (1 << 3),
36 eBroadcastBitProfileData = (1 << 4),
37 eBroadcastBitStructuredData = (1 << 5)};
38
39 SBProcess();
40
41 SBProcess(const lldb::SBProcess &rhs);
42
43 const lldb::SBProcess &operator=(const lldb::SBProcess &rhs);
44
46
47 static const char *GetBroadcasterClassName();
48
49 const char *GetPluginName();
50
51 LLDB_DEPRECATED_FIXME("Use GetPluginName()", "GetPluginName()")
52 const char *GetShortPluginName();
53
54 void Clear();
55
56 explicit operator bool() const;
57
58 bool IsValid() const;
59
60 lldb::SBTarget GetTarget() const;
61
63
64 size_t PutSTDIN(const char *src, size_t src_len);
65
66 size_t GetSTDOUT(char *dst, size_t dst_len) const;
67
68 size_t GetSTDERR(char *dst, size_t dst_len) const;
69
70 size_t GetAsyncProfileData(char *dst, size_t dst_len) const;
71
72#ifndef SWIG
73 void ReportEventState(const lldb::SBEvent &event, FILE *out) const;
74#endif
75
76 void ReportEventState(const lldb::SBEvent &event, SBFile file) const;
77
78 void ReportEventState(const lldb::SBEvent &event, FileSP BORROWED) const;
79
80 void AppendEventStateReport(const lldb::SBEvent &event,
82
83 /// Remote connection related functions. These will fail if the
84 /// process is not in eStateConnected. They are intended for use
85 /// when connecting to an externally managed debugserver instance.
87
88 bool RemoteLaunch(char const **argv, char const **envp,
89 const char *stdin_path, const char *stdout_path,
90 const char *stderr_path, const char *working_directory,
91 uint32_t launch_flags, bool stop_at_entry,
93
94 // Thread related functions
95 uint32_t GetNumThreads();
96
97 lldb::SBThread GetThreadAtIndex(size_t index);
98
100
101 lldb::SBThread GetThreadByIndexID(uint32_t index_id);
102
104
105 // Function for lazily creating a thread using the current OS plug-in. This
106 // function will be removed in the future when there are APIs to create
107 // SBThread objects through the interface and add them to the process through
108 // the SBProcess API.
110
111 bool SetSelectedThread(const lldb::SBThread &thread);
112
114
115 bool SetSelectedThreadByIndexID(uint32_t index_id);
116
117 // Queue related functions
118 uint32_t GetNumQueues();
119
120 lldb::SBQueue GetQueueAtIndex(size_t index);
121
122 // Stepping related functions
123
125
126 int GetExitStatus();
127
128 const char *GetExitDescription();
129
130 /// Gets the process ID
131 ///
132 /// Returns the process identifier for the process as it is known
133 /// on the system on which the process is running. For unix systems
134 /// this is typically the same as if you called "getpid()" in the
135 /// process.
136 ///
137 /// \return
138 /// Returns LLDB_INVALID_PROCESS_ID if this object does not
139 /// contain a valid process object, or if the process has not
140 /// been launched. Returns a valid process ID if the process is
141 /// valid.
143
144 /// Gets the unique ID associated with this process object
145 ///
146 /// Unique IDs start at 1 and increment up with each new process
147 /// instance. Since starting a process on a system might always
148 /// create a process with the same process ID, there needs to be a
149 /// way to tell two process instances apart.
150 ///
151 /// \return
152 /// Returns a non-zero integer ID if this object contains a
153 /// valid process object, zero if this object does not contain
154 /// a valid process object.
155 uint32_t GetUniqueID();
156
157 uint32_t GetAddressByteSize() const;
158
160
163
165
167
169
170 lldb::SBError Detach(bool keep_stopped);
171
172 lldb::SBError Signal(int signal);
173
175
176 void SendAsyncInterrupt();
177
178 uint32_t GetStopID(bool include_expression_stops = false);
179
180 /// Gets the stop event corresponding to stop ID.
181 //
182 /// Note that it wasn't fully implemented and tracks only the stop
183 /// event for the last natural stop ID.
184 ///
185 /// \param [in] stop_id
186 /// The ID of the stop event to return.
187 ///
188 /// \return
189 /// The stop event corresponding to stop ID.
190 lldb::SBEvent GetStopEventForStopID(uint32_t stop_id);
191
192 /// If the process is a scripted process, changes its state to the new state.
193 /// No-op otherwise.
194 ///
195 /// \param [in] new_state
196 /// The new state that the scripted process should be set to.
197 ///
198 void ForceScriptedState(StateType new_state);
199
200 size_t ReadMemory(addr_t addr, void *buf, size_t size, lldb::SBError &error);
201
202 size_t WriteMemory(addr_t addr, const void *buf, size_t size,
204
205 size_t ReadCStringFromMemory(addr_t addr, void *char_buf, size_t size,
207
208 uint64_t ReadUnsignedFromMemory(addr_t addr, uint32_t byte_size,
210
212
213 lldb::SBAddressRangeList FindRangesInMemory(const void *buf, uint64_t size,
214 const SBAddressRangeList &ranges,
215 uint32_t alignment,
216 uint32_t max_matches,
217 SBError &error);
218
219 lldb::addr_t FindInMemory(const void *buf, uint64_t size,
220 const SBAddressRange &range, uint32_t alignment,
221 SBError &error);
222
223 // Events
225
226 static bool GetRestartedFromEvent(const lldb::SBEvent &event);
227
228 static size_t GetNumRestartedReasonsFromEvent(const lldb::SBEvent &event);
229
230 static const char *
231 GetRestartedReasonAtIndexFromEvent(const lldb::SBEvent &event, size_t idx);
232
234
235 static bool GetInterruptedFromEvent(const lldb::SBEvent &event);
236
239
240 static bool EventIsProcessEvent(const lldb::SBEvent &event);
241
242 static bool EventIsStructuredDataEvent(const lldb::SBEvent &event);
243
245
246 static const char *GetBroadcasterClass();
247
248 bool GetDescription(lldb::SBStream &description);
249
251
253
254 /// Load a shared library into this process.
255 ///
256 /// \param[in] remote_image_spec
257 /// The path for the shared library on the target what you want
258 /// to load.
259 ///
260 /// \param[out] error
261 /// An error object that gets filled in with any errors that
262 /// might occur when trying to load the shared library.
263 ///
264 /// \return
265 /// A token that represents the shared library that can be
266 /// later used to unload the shared library. A value of
267 /// LLDB_INVALID_IMAGE_TOKEN will be returned if the shared
268 /// library can't be opened.
269 uint32_t LoadImage(lldb::SBFileSpec &remote_image_spec, lldb::SBError &error);
270
271 /// Load a shared library into this process.
272 ///
273 /// \param[in] local_image_spec
274 /// The file spec that points to the shared library that you
275 /// want to load if the library is located on the host. The
276 /// library will be copied over to the location specified by
277 /// remote_image_spec or into the current working directory with
278 /// the same filename if the remote_image_spec isn't specified.
279 ///
280 /// \param[in] remote_image_spec
281 /// If local_image_spec is specified then the location where the
282 /// library should be copied over from the host. If
283 /// local_image_spec isn't specified, then the path for the
284 /// shared library on the target what you want to load.
285 ///
286 /// \param[out] error
287 /// An error object that gets filled in with any errors that
288 /// might occur when trying to load the shared library.
289 ///
290 /// \return
291 /// A token that represents the shared library that can be
292 /// later used to unload the shared library. A value of
293 /// LLDB_INVALID_IMAGE_TOKEN will be returned if the shared
294 /// library can't be opened.
295 uint32_t LoadImage(const lldb::SBFileSpec &local_image_spec,
296 const lldb::SBFileSpec &remote_image_spec,
298
299 /// Load a shared library into this process, starting with a
300 /// library name and a list of paths, searching along the list of
301 /// paths till you find a matching library.
302 ///
303 /// \param[in] image_spec
304 /// The name of the shared library that you want to load.
305 /// If image_spec is a relative path, the relative path will be
306 /// appended to the search paths.
307 /// If the image_spec is an absolute path, just the basename is used.
308 ///
309 /// \param[in] paths
310 /// A list of paths to search for the library whose basename is
311 /// local_spec.
312 ///
313 /// \param[out] loaded_path
314 /// If the library was found along the paths, this will store the
315 /// full path to the found library.
316 ///
317 /// \param[out] error
318 /// An error object that gets filled in with any errors that
319 /// might occur when trying to search for the shared library.
320 ///
321 /// \return
322 /// A token that represents the shared library that can be
323 /// later passed to UnloadImage. A value of
324 /// LLDB_INVALID_IMAGE_TOKEN will be returned if the shared
325 /// library can't be opened.
326 uint32_t LoadImageUsingPaths(const lldb::SBFileSpec &image_spec,
327 SBStringList &paths,
328 lldb::SBFileSpec &loaded_path,
330
331 lldb::SBError UnloadImage(uint32_t image_token);
332
333 lldb::SBError SendEventData(const char *data);
334
335 /// Return the number of different thread-origin extended backtraces
336 /// this process can support.
337 ///
338 /// When the process is stopped and you have an SBThread, lldb may be
339 /// able to show a backtrace of when that thread was originally created,
340 /// or the work item was enqueued to it (in the case of a libdispatch
341 /// queue).
342 ///
343 /// \return
344 /// The number of thread-origin extended backtrace types that may be
345 /// available.
347
348 /// Return the name of one of the thread-origin extended backtrace
349 /// methods.
350 ///
351 /// \param [in] idx
352 /// The index of the name to return. They will be returned in
353 /// the order that the user will most likely want to see them.
354 /// e.g. if the type at index 0 is not available for a thread,
355 /// see if the type at index 1 provides an extended backtrace.
356 ///
357 /// \return
358 /// The name at that index.
359 const char *GetExtendedBacktraceTypeAtIndex(uint32_t idx);
360
362
364
365 /// Save the state of the process in a core file.
366 ///
367 /// \param[in] file_name - The name of the file to save the core file to.
368 ///
369 /// \param[in] flavor - Specify the flavor of a core file plug-in to save.
370 /// Currently supported flavors include "mach-o" and "minidump"
371 ///
372 /// \param[in] core_style - Specify the style of a core file to save.
373 lldb::SBError SaveCore(const char *file_name, const char *flavor,
374 SaveCoreStyle core_style);
375
376 /// Save the state of the process with the a flavor that matches the
377 /// current process' main executable (if supported).
378 ///
379 /// \param[in] file_name - The name of the file to save the core file to.
380 lldb::SBError SaveCore(const char *file_name);
381
382 /// Save the state of the process with the desired settings
383 /// as defined in the options object.
384 ///
385 /// \param[in] options - The options to use when saving the core file.
387
388 /// Query the address load_addr and store the details of the memory
389 /// region that contains it in the supplied SBMemoryRegionInfo object.
390 /// To iterate over all memory regions use GetMemoryRegionList.
391 ///
392 /// \param[in] load_addr
393 /// The address to be queried.
394 ///
395 /// \param[out] region_info
396 /// A reference to an SBMemoryRegionInfo object that will contain
397 /// the details of the memory region containing load_addr.
398 ///
399 /// \return
400 /// An error object describes any errors that occurred while
401 /// querying load_addr.
403 lldb::SBMemoryRegionInfo &region_info);
404
405 /// Return the list of memory regions within the process.
406 ///
407 /// \return
408 /// A list of all witin the process memory regions.
410
411 /// Return information about the process.
412 ///
413 /// Valid process info will only be returned when the process is
414 /// alive, use SBProcessInfo::IsValid() to check returned info is
415 /// valid.
417
418 /// Get the file specification for the core file that is currently being used
419 /// for the process. If the process is not loaded from a core file, then an
420 /// invalid file specification will be returned.
421 ///
422 /// \return
423 /// The path to the core file for this target or an invalid file spec if
424 /// the process isn't loaded from a core file.
426
427 /// \{
428 /// \group Mask Address Methods
429 ///
430 /// \a type
431 /// All of the methods in this group take \a type argument
432 /// which is an AddressMaskType enum value.
433 /// There can be different address masks for code addresses and
434 /// data addresses, this argument can select which to get/set,
435 /// or to use when clearing non-addressable bits from an address.
436 /// This choice of mask can be important for example on AArch32
437 /// systems. Where instructions where instructions start on even addresses,
438 /// the 0th bit may be used to indicate that a function is thumb code. On
439 /// such a target, the eAddressMaskTypeCode may clear the 0th bit from an
440 /// address to get the actual address Whereas eAddressMaskTypeData would not.
441 ///
442 /// \a addr_range
443 /// Many of the methods in this group take an \a addr_range argument
444 /// which is an AddressMaskRange enum value.
445 /// Needing to specify the address range is highly unusual, and the
446 /// default argument can be used in nearly all circumstances.
447 /// On some architectures (e.g., AArch64), it is possible to have
448 /// different page table setups for low and high memory, so different
449 /// numbers of bits relevant to addressing. It is possible to have
450 /// a program running in one half of memory and accessing the other
451 /// as heap, so we need to maintain two different sets of address masks
452 /// to debug this correctly.
453
454 /// Get the current address mask that will be applied to addresses
455 /// before reading from memory.
456 ///
457 /// \param[in] type
458 /// See \ref Mask Address Methods description of this argument.
459 /// eAddressMaskTypeAny is often a suitable value when code and
460 /// data masks are the same on a given target.
461 ///
462 /// \param[in] addr_range
463 /// See \ref Mask Address Methods description of this argument.
464 /// This will default to eAddressMaskRangeLow which is the
465 /// only set of masks used normally.
466 ///
467 /// \return
468 /// The address mask currently in use. Bits which are not used
469 /// for addressing will be set to 1 in the mask.
473
474 /// Set the current address mask that can be applied to addresses
475 /// before reading from memory.
476 ///
477 /// \param[in] type
478 /// See \ref Mask Address Methods description of this argument.
479 /// eAddressMaskTypeAll is often a suitable value when the
480 /// same mask is being set for both code and data.
481 ///
482 /// \param[in] mask
483 /// The address mask to set. Bits which are not used for addressing
484 /// should be set to 1 in the mask.
485 ///
486 /// \param[in] addr_range
487 /// See \ref Mask Address Methods description of this argument.
488 /// This will default to eAddressMaskRangeLow which is the
489 /// only set of masks used normally.
490 void SetAddressMask(
493
494 /// Set the number of bits used for addressing in this Process.
495 ///
496 /// On Darwin and similar systems, the addressable bits are expressed
497 /// as the number of low order bits that are relevant to addressing,
498 /// instead of a more general address mask.
499 /// This method calculates the correct mask value for a given number
500 /// of low order addressable bits.
501 ///
502 /// \param[in] type
503 /// See \ref Mask Address Methods description of this argument.
504 /// eAddressMaskTypeAll is often a suitable value when the
505 /// same mask is being set for both code and data.
506 ///
507 /// \param[in] num_bits
508 /// Number of bits that are used for addressing.
509 /// For example, a value of 42 indicates that the low 42 bits
510 /// are relevant for addressing, and that higher-order bits may
511 /// be used for various metadata like pointer authentication,
512 /// Type Byte Ignore, etc.
513 ///
514 /// \param[in] addr_range
515 /// See \ref Mask Address Methods description of this argument.
516 /// This will default to eAddressMaskRangeLow which is the
517 /// only set of masks used normally.
518 void
519 SetAddressableBits(AddressMaskType type, uint32_t num_bits,
521
522 /// Clear the non-address bits of an \a addr value and return a
523 /// virtual address in memory.
524 ///
525 /// Bits that are not used in addressing may be used for other purposes;
526 /// pointer authentication, or metadata in the top byte, or the 0th bit
527 /// of armv7 code addresses to indicate arm/thumb are common examples.
528 ///
529 /// \param[in] addr
530 /// The address that should be cleared of non-address bits.
531 ///
532 /// \param[in] type
533 /// See \ref Mask Address Methods description of this argument.
534 /// eAddressMaskTypeAny is the default value, correct when it
535 /// is unknown if the address is a code or data address.
539 /// \}
540
541 /// Allocate memory within the process.
542 ///
543 /// This function will allocate memory in the process's address space.
544 ///
545 /// \param[in] size
546 /// The size of the allocation requested.
547 ///
548 /// \param[in] permissions
549 /// Or together any of the lldb::Permissions bits. The
550 /// permissions on a given memory allocation can't be changed
551 /// after allocation. Note that a block that isn't set writable
552 /// can still be written from lldb, just not by the process
553 /// itself.
554 ///
555 /// \param[out] error
556 /// An error object that gets filled in with any errors that
557 /// might occur when trying allocate.
558 ///
559 /// \return
560 /// The address of the allocated buffer in the process, or
561 /// LLDB_INVALID_ADDRESS if the allocation failed.
562 lldb::addr_t AllocateMemory(size_t size, uint32_t permissions,
564
565 /// Deallocate memory in the process.
566 ///
567 /// This function will deallocate memory in the process's address
568 /// space that was allocated with AllocateMemory.
569 ///
570 /// \param[in] ptr
571 /// A return value from AllocateMemory, pointing to the memory you
572 /// want to deallocate.
573 ///
574 /// \return
575 /// An error object describes any errors that occurred while
576 /// deallocating.
577 ///
579
581
582 void GetStatus(SBStream &status);
583
584protected:
585 friend class SBAddress;
586 friend class SBBreakpoint;
590 friend class SBSaveCoreOptions;
591 friend class SBDebugger;
592 friend class SBExecutionContext;
593 friend class SBFunction;
594 friend class SBModule;
595 friend class SBPlatform;
596 friend class SBTarget;
597 friend class SBThread;
598 friend class SBValue;
600
601 friend class lldb_private::python::SWIGBridge;
602
603 SBProcess(const lldb::ProcessSP &process_sp);
604
605 lldb::ProcessSP GetSP() const;
606
607 void SetSP(const lldb::ProcessSP &process_sp);
608
610};
611
612} // namespace lldb
613
614#endif // LLDB_API_SBPROCESS_H
static size_t ReadCStringFromMemory(ExecutionContextScope *exe_scope, const Address &address, Stream *strm)
Definition Address.cpp:191
static llvm::raw_ostream & error(Stream &strm)
#define LLDB_API
Definition SBDefines.h:28
static size_t GetNumRestartedReasonsFromEvent(const lldb::SBEvent &event)
lldb::SBError SendEventData(const char *data)
lldb::SBBroadcaster GetBroadcaster() const
lldb::SBError Detach()
lldb::SBThread GetThreadAtIndex(size_t index)
static const char * GetBroadcasterClassName()
Definition SBProcess.cpp:80
void AppendEventStateReport(const lldb::SBEvent &event, lldb::SBCommandReturnObject &result)
friend class SBBreakpointCallbackBaton
Definition SBProcess.h:587
lldb::SBError Continue()
uint32_t GetNumThreads()
uint32_t GetNumExtendedBacktraceTypes()
Return the number of different thread-origin extended backtraces this process can support.
size_t PutSTDIN(const char *src, size_t src_len)
lldb::SBQueue GetQueueAtIndex(size_t index)
void ReportEventState(const lldb::SBEvent &event, FILE *out) const
lldb::SBFileSpec GetCoreFile()
Get the file specification for the core file that is currently being used for the process.
const char * GetExitDescription()
lldb::SBThread GetThreadByIndexID(uint32_t index_id)
static const char * GetBroadcasterClass()
static lldb::SBStructuredData GetStructuredDataFromEvent(const lldb::SBEvent &event)
FLAGS_ANONYMOUS_ENUM()
Broadcaster event bits definitions.
Definition SBProcess.h:32
friend class SBSaveCoreOptions
Definition SBProcess.h:590
lldb::ProcessSP GetSP() const
lldb::addr_t FindInMemory(const void *buf, uint64_t size, const SBAddressRange &range, uint32_t alignment, SBError &error)
lldb::pid_t GetProcessID()
Gets the process ID.
lldb::addr_t AllocateMemory(size_t size, uint32_t permissions, lldb::SBError &error)
Allocate memory within the process.
static bool EventIsStructuredDataEvent(const lldb::SBEvent &event)
lldb::SBError UnloadImage(uint32_t image_token)
lldb::SBProcessInfo GetProcessInfo()
Return information about the process.
uint32_t GetUniqueID()
Gets the unique ID associated with this process object.
bool GetDescription(lldb::SBStream &description)
size_t GetAsyncProfileData(char *dst, size_t dst_len) const
lldb::addr_t FixAddress(lldb::addr_t addr, lldb::AddressMaskType type=lldb::eAddressMaskTypeAny)
Clear the non-address bits of an addr value and return a virtual address in memory.
friend class SBDebugger
Definition SBProcess.h:591
friend class SBTarget
Definition SBProcess.h:596
friend class SBModule
Definition SBProcess.h:594
uint32_t GetNumQueues()
lldb::StateType GetState()
lldb::SBThread CreateOSPluginThread(lldb::tid_t tid, lldb::addr_t context)
friend class SBBreakpoint
Definition SBProcess.h:586
lldb::SBError Destroy()
lldb::SBScriptObject GetScriptedImplementation()
void GetStatus(SBStream &status)
lldb::ByteOrder GetByteOrder() const
lldb::addr_t ReadPointerFromMemory(addr_t addr, lldb::SBError &error)
friend class SBValue
Definition SBProcess.h:598
friend class SBAddress
Definition SBProcess.h:585
lldb::SBError DeallocateMemory(lldb::addr_t ptr)
Deallocate memory in the process.
static lldb::StateType GetStateFromEvent(const lldb::SBEvent &event)
lldb::SBThread GetSelectedThread() const
bool SetSelectedThreadByIndexID(uint32_t index_id)
size_t ReadMemory(addr_t addr, void *buf, size_t size, lldb::SBError &error)
const char * GetExtendedBacktraceTypeAtIndex(uint32_t idx)
Return the name of one of the thread-origin extended backtrace methods.
lldb::SBThread GetThreadByID(lldb::tid_t sb_thread_id)
friend class SBExecutionContext
Definition SBProcess.h:592
bool RemoteAttachToProcessWithID(lldb::pid_t pid, lldb::SBError &error)
Remote connection related functions.
lldb::SBTarget GetTarget() const
lldb::SBAddressRangeList FindRangesInMemory(const void *buf, uint64_t size, const SBAddressRangeList &ranges, uint32_t alignment, uint32_t max_matches, SBError &error)
const char * GetPluginName()
Definition SBProcess.cpp:86
bool RemoteLaunch(char const **argv, char const **envp, const char *stdin_path, const char *stdout_path, const char *stderr_path, const char *working_directory, uint32_t launch_flags, bool stop_at_entry, lldb::SBError &error)
void SetAddressMask(lldb::AddressMaskType type, lldb::addr_t mask, lldb::AddressMaskRange addr_range=lldb::eAddressMaskRangeLow)
Set the current address mask that can be applied to addresses before reading from memory.
size_t GetSTDOUT(char *dst, size_t dst_len) const
lldb::SBEvent GetStopEventForStopID(uint32_t stop_id)
Gets the stop event corresponding to stop ID.
lldb::SBError Signal(int signal)
friend class SBThread
Definition SBProcess.h:597
static bool GetInterruptedFromEvent(const lldb::SBEvent &event)
lldb::SBError Stop()
lldb::addr_t GetAddressMask(lldb::AddressMaskType type, lldb::AddressMaskRange addr_range=lldb::eAddressMaskRangeLow)
Get the current address mask that will be applied to addresses before reading from memory.
lldb::ProcessWP m_opaque_wp
Definition SBProcess.h:609
uint32_t GetNumSupportedHardwareWatchpoints(lldb::SBError &error) const
uint32_t LoadImageUsingPaths(const lldb::SBFileSpec &image_spec, SBStringList &paths, lldb::SBFileSpec &loaded_path, lldb::SBError &error)
Load a shared library into this process, starting with a library name and a list of paths,...
uint32_t LoadImage(lldb::SBFileSpec &remote_image_spec, lldb::SBError &error)
Load a shared library into this process.
void SetAddressableBits(AddressMaskType type, uint32_t num_bits, AddressMaskRange addr_range=lldb::eAddressMaskRangeLow)
Set the number of bits used for addressing in this Process.
static const char * GetRestartedReasonAtIndexFromEvent(const lldb::SBEvent &event, size_t idx)
lldb::SBUnixSignals GetUnixSignals()
lldb::SBError Kill()
lldb::SBThreadCollection GetHistoryThreads(addr_t addr)
bool IsInstrumentationRuntimePresent(InstrumentationRuntimeType type)
bool SetSelectedThread(const lldb::SBThread &thread)
bool SetSelectedThreadByID(lldb::tid_t tid)
void SendAsyncInterrupt()
static bool GetRestartedFromEvent(const lldb::SBEvent &event)
static bool EventIsProcessEvent(const lldb::SBEvent &event)
lldb::SBError GetMemoryRegionInfo(lldb::addr_t load_addr, lldb::SBMemoryRegionInfo &region_info)
Query the address load_addr and store the details of the memory region that contains it in the suppli...
friend class SBFunction
Definition SBProcess.h:593
void SetSP(const lldb::ProcessSP &process_sp)
size_t WriteMemory(addr_t addr, const void *buf, size_t size, lldb::SBError &error)
lldb::SBError SaveCore(const char *file_name, const char *flavor, SaveCoreStyle core_style)
Save the state of the process in a core file.
lldb::SBMemoryRegionInfoList GetMemoryRegions()
Return the list of memory regions within the process.
friend class SBBreakpointLocation
Definition SBProcess.h:588
lldb::SBError ContinueInDirection(lldb::RunDirection direction)
uint32_t GetAddressByteSize() const
SBStructuredData GetExtendedCrashInformation()
LLDB_DEPRECATED_FIXME("Use GetPluginName()", "GetPluginName()") const char *GetShortPluginName()
friend class SBPlatform
Definition SBProcess.h:595
uint32_t GetStopID(bool include_expression_stops=false)
friend class SBCommandInterpreter
Definition SBProcess.h:589
uint64_t ReadUnsignedFromMemory(addr_t addr, uint32_t byte_size, lldb::SBError &error)
bool IsValid() const
void ForceScriptedState(StateType new_state)
If the process is a scripted process, changes its state to the new state.
static lldb::SBProcess GetProcessFromEvent(const lldb::SBEvent &event)
size_t GetSTDERR(char *dst, size_t dst_len) const
A class that represents a running process on the host machine.
RunDirection
Execution directions.
AddressMaskRange
Used in the SBProcess AddressMask/FixAddress methods.
StateType
Process and Thread States.
std::shared_ptr< lldb_private::Process > ProcessSP
InstrumentationRuntimeType
uint64_t pid_t
Definition lldb-types.h:83
ByteOrder
Byte ordering definitions.
std::weak_ptr< lldb_private::Process > ProcessWP
uint64_t addr_t
Definition lldb-types.h:80
AddressMaskType
Used in the SBProcess AddressMask/FixAddress methods.
std::shared_ptr< lldb_private::File > FileSP
uint64_t tid_t
Definition lldb-types.h:84