SBSaveCoreOptions#

class lldb.SBSaveCoreOptions(*args)#

A container to specify how to save a core file.

SBSaveCoreOptions includes API’s to specify the memory regions and threads to include when generating a core file. It extends the existing SaveCoreStyle option.

  • eSaveCoreFull will save off all thread and memory regions, ignoring the memory regions and threads in

the options object.

  • eSaveCoreDirtyOnly pages will capture all threads and all rw- memory regions, in addition to the regions specified

in the options object if they are not already captured.

  • eSaveCoreStackOnly will capture all threads, but no memory regions unless specified.

  • eSaveCoreCustomOnly Custom defers entirely to the SBSaveCoreOptions object and will only save what is specified. Picking custom and specifying nothing will result in an error being returned.

Note that currently ELF Core files are not supported.

Methods Summary

AddMemoryRegionToSave(...)

Add a memory region to save, an error will be returned in the region is invalid.

AddThread(SBSaveCoreOptions self, ...)

Add an SBThread to be saved, an error will be returned if an SBThread from a different process is specified.

Clear(SBSaveCoreOptions self)

Unset all options.

GetOutputFile(SBSaveCoreOptions self)

Get an SBFileSpec corresponding to the specified output path, or none if not set.

GetPluginName(SBSaveCoreOptions self)

Get the specified plugin name, or None if the name is not set.

GetStyle(SBSaveCoreOptions self)

Get the specified lldb.SaveCoreStyle, or eSaveCoreUnspecified if not set.

GetThreadsToSave(SBSaveCoreOptions self)

Get an SBThreadCollection of all threads marked to be saved.

RemoveThread(SBSaveCoreOptions self, ...)

Remove an SBthread if present in the container, returns true if a matching thread was found and removed.

SetOutputFile(SBSaveCoreOptions self, ...)

Set the file path to save the Core file at.

SetPluginName(SBSaveCoreOptions self, ...)

Set the plugin name to save a Core file with.

SetProcess(SBSaveCoreOptions self, ...)

Set the process to save, or unset a process by providing a default SBProcess.

SetStyle(SBSaveCoreOptions self, lldb)

Set the lldb.SaveCoreStyle.

Methods Documentation

AddMemoryRegionToSave(SBSaveCoreOptions self, SBMemoryRegionInfo region) SBError#

Add a memory region to save, an error will be returned in the region is invalid. Ranges that overlap will be unioned into a single region.

AddThread(SBSaveCoreOptions self, SBThread thread) SBError#

Add an SBThread to be saved, an error will be returned if an SBThread from a different process is specified. The process is set either by the first SBThread added to the options container, or explicitly by the SetProcess call.

Clear(SBSaveCoreOptions self)#

Unset all options.

GetOutputFile(SBSaveCoreOptions self) SBFileSpec#

Get an SBFileSpec corresponding to the specified output path, or none if not set.

GetPluginName(SBSaveCoreOptions self) char const *#

Get the specified plugin name, or None if the name is not set.

GetStyle(SBSaveCoreOptions self) lldb::SaveCoreStyle#

Get the specified lldb.SaveCoreStyle, or eSaveCoreUnspecified if not set.

GetThreadsToSave(SBSaveCoreOptions self) SBThreadCollection#

Get an SBThreadCollection of all threads marked to be saved. This collection is not sorted according to insertion order.

RemoveThread(SBSaveCoreOptions self, SBThread thread) bool#

Remove an SBthread if present in the container, returns true if a matching thread was found and removed.

SetOutputFile(SBSaveCoreOptions self, SBFileSpec output_file)#

Set the file path to save the Core file at.

SetPluginName(SBSaveCoreOptions self, char const * plugin) SBError#

Set the plugin name to save a Core file with. Only plugins registered with Plugin manager will be accepted Examples are Minidump and Mach-O.

SetProcess(SBSaveCoreOptions self, SBProcess process) SBError#

Set the process to save, or unset a process by providing a default SBProcess. Resetting will result in the reset of all process specific options, such as Threads to save.

SetStyle(SBSaveCoreOptions self, lldb::SaveCoreStyle style)#

Set the lldb.SaveCoreStyle.