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 /// Read memory that may be in a non-default address space.
203 size_t ReadMemory(SBProcessAddress process_addr, void *buf, size_t size,
205
206 /// Resolve an address space name to its id, or LLDB_INVALID_ADDRESS_SPACE_ID.
208
209 size_t WriteMemory(addr_t addr, const void *buf, size_t size,
211
212 size_t ReadCStringFromMemory(addr_t addr, void *char_buf, size_t size,
214
215 uint64_t ReadUnsignedFromMemory(addr_t addr, uint32_t byte_size,
217
219
220 lldb::SBAddressRangeList FindRangesInMemory(const void *buf, uint64_t size,
221 const SBAddressRangeList &ranges,
222 uint32_t alignment,
223 uint32_t max_matches,
224 SBError &error);
225
226 lldb::addr_t FindInMemory(const void *buf, uint64_t size,
227 const SBAddressRange &range, uint32_t alignment,
228 SBError &error);
229
230 // Events
232
233 static bool GetRestartedFromEvent(const lldb::SBEvent &event);
234
235 static size_t GetNumRestartedReasonsFromEvent(const lldb::SBEvent &event);
236
237 static const char *
238 GetRestartedReasonAtIndexFromEvent(const lldb::SBEvent &event, size_t idx);
239
241
242 static bool GetInterruptedFromEvent(const lldb::SBEvent &event);
243
246
247 static bool EventIsProcessEvent(const lldb::SBEvent &event);
248
249 static bool EventIsStructuredDataEvent(const lldb::SBEvent &event);
250
252
253 static const char *GetBroadcasterClass();
254
255 bool GetDescription(lldb::SBStream &description);
256
258
260
261 /// Load a shared library into this process.
262 ///
263 /// \param[in] remote_image_spec
264 /// The path for the shared library on the target what you want
265 /// to load.
266 ///
267 /// \param[out] error
268 /// An error object that gets filled in with any errors that
269 /// might occur when trying to load the shared library.
270 ///
271 /// \return
272 /// A token that represents the shared library that can be
273 /// later used to unload the shared library. A value of
274 /// LLDB_INVALID_IMAGE_TOKEN will be returned if the shared
275 /// library can't be opened.
276 uint32_t LoadImage(lldb::SBFileSpec &remote_image_spec, lldb::SBError &error);
277
278 /// Load a shared library into this process.
279 ///
280 /// \param[in] local_image_spec
281 /// The file spec that points to the shared library that you
282 /// want to load if the library is located on the host. The
283 /// library will be copied over to the location specified by
284 /// remote_image_spec or into the current working directory with
285 /// the same filename if the remote_image_spec isn't specified.
286 ///
287 /// \param[in] remote_image_spec
288 /// If local_image_spec is specified then the location where the
289 /// library should be copied over from the host. If
290 /// local_image_spec isn't specified, then the path for the
291 /// shared library on the target what you want to load.
292 ///
293 /// \param[out] error
294 /// An error object that gets filled in with any errors that
295 /// might occur when trying to load the shared library.
296 ///
297 /// \return
298 /// A token that represents the shared library that can be
299 /// later used to unload the shared library. A value of
300 /// LLDB_INVALID_IMAGE_TOKEN will be returned if the shared
301 /// library can't be opened.
302 uint32_t LoadImage(const lldb::SBFileSpec &local_image_spec,
303 const lldb::SBFileSpec &remote_image_spec,
305
306 /// Load a shared library into this process, starting with a
307 /// library name and a list of paths, searching along the list of
308 /// paths till you find a matching library.
309 ///
310 /// \param[in] image_spec
311 /// The name of the shared library that you want to load.
312 /// If image_spec is a relative path, the relative path will be
313 /// appended to the search paths.
314 /// If the image_spec is an absolute path, just the basename is used.
315 ///
316 /// \param[in] paths
317 /// A list of paths to search for the library whose basename is
318 /// local_spec.
319 ///
320 /// \param[out] loaded_path
321 /// If the library was found along the paths, this will store the
322 /// full path to the found library.
323 ///
324 /// \param[out] error
325 /// An error object that gets filled in with any errors that
326 /// might occur when trying to search for the shared library.
327 ///
328 /// \return
329 /// A token that represents the shared library that can be
330 /// later passed to UnloadImage. A value of
331 /// LLDB_INVALID_IMAGE_TOKEN will be returned if the shared
332 /// library can't be opened.
333 uint32_t LoadImageUsingPaths(const lldb::SBFileSpec &image_spec,
334 SBStringList &paths,
335 lldb::SBFileSpec &loaded_path,
337
338 lldb::SBError UnloadImage(uint32_t image_token);
339
340 lldb::SBError SendEventData(const char *data);
341
342 /// Return the number of different thread-origin extended backtraces
343 /// this process can support.
344 ///
345 /// When the process is stopped and you have an SBThread, lldb may be
346 /// able to show a backtrace of when that thread was originally created,
347 /// or the work item was enqueued to it (in the case of a libdispatch
348 /// queue).
349 ///
350 /// \return
351 /// The number of thread-origin extended backtrace types that may be
352 /// available.
354
355 /// Return the name of one of the thread-origin extended backtrace
356 /// methods.
357 ///
358 /// \param [in] idx
359 /// The index of the name to return. They will be returned in
360 /// the order that the user will most likely want to see them.
361 /// e.g. if the type at index 0 is not available for a thread,
362 /// see if the type at index 1 provides an extended backtrace.
363 ///
364 /// \return
365 /// The name at that index.
366 const char *GetExtendedBacktraceTypeAtIndex(uint32_t idx);
367
369
371
372 /// Save the state of the process in a core file.
373 ///
374 /// \param[in] file_name - The name of the file to save the core file to.
375 ///
376 /// \param[in] flavor - Specify the flavor of a core file plug-in to save.
377 /// Currently supported flavors include "mach-o" and "minidump"
378 ///
379 /// \param[in] core_style - Specify the style of a core file to save.
380 lldb::SBError SaveCore(const char *file_name, const char *flavor,
381 SaveCoreStyle core_style);
382
383 /// Save the state of the process with the a flavor that matches the
384 /// current process' main executable (if supported).
385 ///
386 /// \param[in] file_name - The name of the file to save the core file to.
387 lldb::SBError SaveCore(const char *file_name);
388
389 /// Save the state of the process with the desired settings
390 /// as defined in the options object.
391 ///
392 /// \param[in] options - The options to use when saving the core file.
394
395 /// Query the address load_addr and store the details of the memory
396 /// region that contains it in the supplied SBMemoryRegionInfo object.
397 /// To iterate over all memory regions use GetMemoryRegionList.
398 ///
399 /// \param[in] load_addr
400 /// The address to be queried.
401 ///
402 /// \param[out] region_info
403 /// A reference to an SBMemoryRegionInfo object that will contain
404 /// the details of the memory region containing load_addr.
405 ///
406 /// \return
407 /// An error object describes any errors that occurred while
408 /// querying load_addr.
410 lldb::SBMemoryRegionInfo &region_info);
411
412 /// Return the list of memory regions within the process.
413 ///
414 /// \return
415 /// A list of all witin the process memory regions.
417
418 /// Return information about the process.
419 ///
420 /// Valid process info will only be returned when the process is
421 /// alive, use SBProcessInfo::IsValid() to check returned info is
422 /// valid.
424
425 /// Get the file specification for the core file that is currently being used
426 /// for the process. If the process is not loaded from a core file, then an
427 /// invalid file specification will be returned.
428 ///
429 /// \return
430 /// The path to the core file for this target or an invalid file spec if
431 /// the process isn't loaded from a core file.
433
434 /// Check whether this process is a live debug session, as opposed to a
435 /// post-mortem session such as a core file or minidump.
436 ///
437 /// \return
438 /// \b true if the process represents a live debug session, \b false if it
439 /// is a post-mortem session (e.g. a core file) or there is no underlying
440 /// process.
441 bool IsLiveDebugSession() const;
442
443 /// \{
444 /// \group Mask Address Methods
445 ///
446 /// \a type
447 /// All of the methods in this group take \a type argument
448 /// which is an AddressMaskType enum value.
449 /// There can be different address masks for code addresses and
450 /// data addresses, this argument can select which to get/set,
451 /// or to use when clearing non-addressable bits from an address.
452 /// This choice of mask can be important for example on AArch32
453 /// systems. Where instructions where instructions start on even addresses,
454 /// the 0th bit may be used to indicate that a function is thumb code. On
455 /// such a target, the eAddressMaskTypeCode may clear the 0th bit from an
456 /// address to get the actual address Whereas eAddressMaskTypeData would not.
457 ///
458 /// \a addr_range
459 /// Many of the methods in this group take an \a addr_range argument
460 /// which is an AddressMaskRange enum value.
461 /// Needing to specify the address range is highly unusual, and the
462 /// default argument can be used in nearly all circumstances.
463 /// On some architectures (e.g., AArch64), it is possible to have
464 /// different page table setups for low and high memory, so different
465 /// numbers of bits relevant to addressing. It is possible to have
466 /// a program running in one half of memory and accessing the other
467 /// as heap, so we need to maintain two different sets of address masks
468 /// to debug this correctly.
469
470 /// Get the current address mask that will be applied to addresses
471 /// before reading from memory.
472 ///
473 /// \param[in] type
474 /// See \ref Mask Address Methods description of this argument.
475 /// eAddressMaskTypeAny is often a suitable value when code and
476 /// data masks are the same on a given target.
477 ///
478 /// \param[in] addr_range
479 /// See \ref Mask Address Methods description of this argument.
480 /// This will default to eAddressMaskRangeLow which is the
481 /// only set of masks used normally.
482 ///
483 /// \return
484 /// The address mask currently in use. Bits which are not used
485 /// for addressing will be set to 1 in the mask.
489
490 /// Set the current address mask that can be applied to addresses
491 /// before reading from memory.
492 ///
493 /// \param[in] type
494 /// See \ref Mask Address Methods description of this argument.
495 /// eAddressMaskTypeAll is often a suitable value when the
496 /// same mask is being set for both code and data.
497 ///
498 /// \param[in] mask
499 /// The address mask to set. Bits which are not used for addressing
500 /// should be set to 1 in the mask.
501 ///
502 /// \param[in] addr_range
503 /// See \ref Mask Address Methods description of this argument.
504 /// This will default to eAddressMaskRangeLow which is the
505 /// only set of masks used normally.
506 void SetAddressMask(
509
510 /// Set the number of bits used for addressing in this Process.
511 ///
512 /// On Darwin and similar systems, the addressable bits are expressed
513 /// as the number of low order bits that are relevant to addressing,
514 /// instead of a more general address mask.
515 /// This method calculates the correct mask value for a given number
516 /// of low order addressable bits.
517 ///
518 /// \param[in] type
519 /// See \ref Mask Address Methods description of this argument.
520 /// eAddressMaskTypeAll is often a suitable value when the
521 /// same mask is being set for both code and data.
522 ///
523 /// \param[in] num_bits
524 /// Number of bits that are used for addressing.
525 /// For example, a value of 42 indicates that the low 42 bits
526 /// are relevant for addressing, and that higher-order bits may
527 /// be used for various metadata like pointer authentication,
528 /// Type Byte Ignore, etc.
529 ///
530 /// \param[in] addr_range
531 /// See \ref Mask Address Methods description of this argument.
532 /// This will default to eAddressMaskRangeLow which is the
533 /// only set of masks used normally.
534 void
535 SetAddressableBits(AddressMaskType type, uint32_t num_bits,
537
538 /// Clear the non-address bits of an \a addr value and return a
539 /// virtual address in memory.
540 ///
541 /// Bits that are not used in addressing may be used for other purposes;
542 /// pointer authentication, or metadata in the top byte, or the 0th bit
543 /// of armv7 code addresses to indicate arm/thumb are common examples.
544 ///
545 /// \param[in] addr
546 /// The address that should be cleared of non-address bits.
547 ///
548 /// \param[in] type
549 /// See \ref Mask Address Methods description of this argument.
550 /// eAddressMaskTypeAny is the default value, correct when it
551 /// is unknown if the address is a code or data address.
555 /// \}
556
557 /// Allocate memory within the process.
558 ///
559 /// This function will allocate memory in the process's address space.
560 ///
561 /// \param[in] size
562 /// The size of the allocation requested.
563 ///
564 /// \param[in] permissions
565 /// Or together any of the lldb::Permissions bits. The
566 /// permissions on a given memory allocation can't be changed
567 /// after allocation. Note that a block that isn't set writable
568 /// can still be written from lldb, just not by the process
569 /// itself.
570 ///
571 /// \param[out] error
572 /// An error object that gets filled in with any errors that
573 /// might occur when trying allocate.
574 ///
575 /// \return
576 /// The address of the allocated buffer in the process, or
577 /// LLDB_INVALID_ADDRESS if the allocation failed.
578 lldb::addr_t AllocateMemory(size_t size, uint32_t permissions,
580
581 /// Deallocate memory in the process.
582 ///
583 /// This function will deallocate memory in the process's address
584 /// space that was allocated with AllocateMemory.
585 ///
586 /// \param[in] ptr
587 /// A return value from AllocateMemory, pointing to the memory you
588 /// want to deallocate.
589 ///
590 /// \return
591 /// An error object describes any errors that occurred while
592 /// deallocating.
593 ///
595
597
598 void GetStatus(SBStream &status);
599
600protected:
601 friend class SBAddress;
602 friend class SBBreakpoint;
606 friend class SBSaveCoreOptions;
607 friend class SBDebugger;
608 friend class SBExecutionContext;
609 friend class SBFunction;
610 friend class SBModule;
611 friend class SBPlatform;
612 friend class SBTarget;
613 friend class SBThread;
614 friend class SBValue;
616
618
619 SBProcess(const lldb::ProcessSP &process_sp);
620
621 lldb::ProcessSP GetSP() const;
622
623 void SetSP(const lldb::ProcessSP &process_sp);
624
626};
627
628} // namespace lldb
629
630#endif // LLDB_API_SBPROCESS_H
static size_t ReadCStringFromMemory(ExecutionContextScope *exe_scope, const Address &address, Stream *strm)
Definition Address.cpp:193
static llvm::raw_ostream & error(Stream &strm)
#define LLDB_API
Definition SBDefines.h:28
A memory address, optionally in a non-default address space.
Definition SBAddress.h:134
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:83
void AppendEventStateReport(const lldb::SBEvent &event, lldb::SBCommandReturnObject &result)
friend class SBBreakpointCallbackBaton
Definition SBProcess.h:603
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:606
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:607
friend class SBTarget
Definition SBProcess.h:612
friend class SBModule
Definition SBProcess.h:610
uint32_t GetNumQueues()
lldb::StateType GetState()
lldb::SBThread CreateOSPluginThread(lldb::tid_t tid, lldb::addr_t context)
friend class SBBreakpoint
Definition SBProcess.h:602
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:614
friend class SBAddress
Definition SBProcess.h:601
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:608
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:89
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:613
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:625
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.
bool IsLiveDebugSession() const
Check whether this process is a live debug session, as opposed to a post-mortem session such as a cor...
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:609
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:604
lldb::addr_space_t GetAddressSpaceID(const char *name, lldb::SBError &error)
Resolve an address space name to its id, or LLDB_INVALID_ADDRESS_SPACE_ID.
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:611
uint32_t GetStopID(bool include_expression_stops=false)
friend class SBCommandInterpreter
Definition SBProcess.h:605
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:84
ByteOrder
Byte ordering definitions.
std::weak_ptr< lldb_private::Process > ProcessWP
uint64_t addr_t
Definition lldb-types.h:80
uint64_t addr_space_t
Definition lldb-types.h:81
AddressMaskType
Used in the SBProcess AddressMask/FixAddress methods.
std::shared_ptr< lldb_private::File > FileSP
uint64_t tid_t
Definition lldb-types.h:85