Documentation
¶
Index ¶
- Variables
- type AdditionalDetails
- type BackTraceKext
- type BinaryImage
- type BundleInfo
- type Config
- type Core
- type CrashLog
- type DB
- type EpochTime
- type EpochTimeSec
- type Exception
- type Field
- type Frame
- type IPSPayload
- type Ips
- type IpsMetadata
- type LastStartedKext
- type LoadedKext
- type LoadedKexts
- type LogType
- type LogTypes
- type MemoryStatus
- type OsVersion
- type Panic210
- type PanicFrame
- type PanickedTask
- type PanickedThread
- type Platform
- type PostSampleVMStats
- type Process
- type Range
- type Register
- type State
- type StoreInfo
- type TPIDRx_ELy
- type Termination
- type Thread
- type ThreadState
- type Timestamp
- type UserThread
- type ZoneInfo
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrDone = errors.New("done")
Functions ¶
This section is empty.
Types ¶
type AdditionalDetails ¶
type AdditionalDetails struct {
StackshotDurationOuterNsec int `json:"stackshot_duration_outer_nsec,omitempty"`
StackshotInFlags int `json:"stackshot_in_flags,omitempty"`
StackshotThreadsCount int `json:"stackshot_threads_count,omitempty"`
StackshotDurationPriorNsec int `json:"stackshot_duration_prior_nsec,omitempty"`
StackshotSizeEstimateAdj int `json:"stackshot_size_estimate_adj,omitempty"`
StackshotOutFlags int `json:"stackshot_out_flags,omitempty"`
StackshotTasksCount int `json:"stackshot_tasks_count,omitempty"`
StackshotInPid int `json:"stackshot_in_pid,omitempty"`
StackshotSizeEstimate int `json:"stackshot_size_estimate,omitempty"`
StackshotTries int `json:"stackshot_tries,omitempty"`
StackshotDurationNsec int `json:"stackshot_duration_nsec,omitempty"`
SystemStateFlags int `json:"system_state_flags,omitempty"`
}
type BackTraceKext ¶
type BinaryImage ¶
type BinaryImage struct {
Arch string `json:"arch,omitempty"`
Base uint64 `json:"base,omitempty"`
Name string `json:"name,omitempty"`
Path string `json:"path,omitempty"`
Size uint64 `json:"size,omitempty"`
Source string `json:"source,omitempty"`
UUID string `json:"uuid,omitempty"`
Slide uint64 `json:"slide,omitempty"`
}
func (*BinaryImage) UnmarshalJSON ¶
func (bi *BinaryImage) UnmarshalJSON(b []byte) error
type BundleInfo ¶
type Config ¶
type Config struct {
All bool
Running bool
Process string
Unslid bool
KernelSlide uint64 // Custom KASLR slide to apply to kernel frames for live debugging
DSCSlide uint64 // Custom slide to apply to dyld_shared_cache frames for live debugging
Demangle bool
Hex bool
Verbose bool
Peek bool
PeekCount int // Number of instructions to show with --peek (default 5)
PemDB string
SignaturesDir string
ExtrasDir string
IDAScript bool // Generate IDAPython script to mark panic frames
CrashlogPath string // Path to the crashlog file (set automatically by OpenIPS)
}
type CrashLog ¶
type CrashLog struct {
ReportVersion int
HardwareModel string
OSVersion string
OSBuild string
Process string
PID int
ExceptionType string
ExceptionSubtype []string
TerminationSignal string
TerminationReason string
TerminatingProcess string
Images []image
Threads []thread
CrashedThread int
// contains filtered or unexported fields
}
CrashLog is a crashlog object
type EpochTime ¶
type EpochTime struct {
Boot EpochTimeSec
Sleep EpochTimeSec
Wake EpochTimeSec
Calendar EpochTimeSec
}
type EpochTimeSec ¶
func (EpochTimeSec) String ¶
func (e EpochTimeSec) String() string
type IPSPayload ¶
type IPSPayload struct {
/* Kernelspace Fields */
Build string `json:"build,omitempty"`
Product string `json:"product,omitempty"`
SocID string `json:"socId,omitempty"`
Kernel string `json:"kernel,omitempty"`
Incident string `json:"incident,omitempty"`
CrashReporterKey string `json:"crashReporterKey,omitempty"`
Date string `json:"date,omitempty"`
PanicString string `json:"panicString,omitempty"`
MacOSPanicString string `json:"macOSPanicString,omitempty"`
PanicFlags string `json:"panicFlags,omitempty"`
OtherString string `json:"otherString,omitempty"`
MemoryStatus MemoryStatus `json:"memoryStatus"`
ProcessByPid map[int]Process `json:"processByPid,omitempty"`
BinaryImages []BinaryImage `json:"binaryImages,omitempty"`
Notes []string `json:"notes,omitempty"`
/* Userspace Fields */
Asi map[string][]string `json:"asi,omitempty"` // Additional application-specific logging. The properties of this object include an array of log strings.
// For more information, see Diagnostic messages. This appears in a translated report under Application Specific Information.
// https://developer.apple.com/documentation/xcode/examining-the-fields-in-a-crash-report#Diagnostic-messages
IsCorpse any `json:"isCorpse,omitempty"`
IsNonFatal string `json:"isNonFatal,omitempty"`
IsSimulated string `json:"isSimulated,omitempty"`
Uptime int `json:"uptime,omitempty"`
Translated bool `json:"translated,omitempty"`
ProcName string `json:"procName,omitempty"`
ProcPath string `json:"procPath,omitempty"`
ProcRole string `json:"procRole,omitempty"`
ProcLaunch string `json:"procLaunch,omitempty"`
ProcStartAbsTime int64 `json:"procStartAbsTime,omitempty"`
ProcExitAbsTime int64 `json:"procExitAbsTime,omitempty"`
UserID int `json:"userID,omitempty"`
DeployVersion int `json:"deployVersion,omitempty"`
ModelCode string `json:"modelCode,omitempty"`
CoalitionID int `json:"coalitionID,omitempty"`
OsVersion OsVersion `json:"osVersion"`
CaptureTime string `json:"captureTime,omitempty"`
PID int `json:"pid,omitempty"`
CPUType string `json:"cpuType,omitempty"`
RootsInstalled int `json:"roots_installed,omitempty"`
BugType string `json:"bug_type,omitempty"`
BundleInfo BundleInfo `json:"bundleInfo"`
StoreInfo StoreInfo `json:"storeInfo"`
ParentProc string `json:"parentProc,omitempty"`
ParentPid int `json:"parentPid,omitempty"`
CoalitionName string `json:"coalitionName,omitempty"`
LockdownMode int `json:"ldm,omitempty"`
WasUnlockedSinceBoot int `json:"wasUnlockedSinceBoot,omitempty"`
IsLocked int `json:"isLocked,omitempty"`
InstructionByteStream struct {
BeforePC string `json:"beforePC,omitempty"`
AtPC string `json:"atPC,omitempty"`
} `json:"instructionByteStream"`
CodeSigningID string `json:"codeSigningID,omitempty"`
CodeSigningTeamID string `json:"codeSigningTeamID,omitempty"`
CodeSigningFlags int `json:"codeSigningFlags,omitempty"`
CodeSigningValidationCategory int `json:"codeSigningValidationCategory,omitempty"`
CodeSigningTrustLevel int `json:"codeSigningTrustLevel,omitempty"`
CodeSigningMonitor int `json:"codeSigningMonitor,omitempty"`
ThrottleTimeout int64 `json:"throttleTimeout,omitempty"`
BasebandVersion string `json:"basebandVersion,omitempty"`
Exception any `json:"exception,omitempty"`
LastExceptionBacktrace []Frame `json:"lastExceptionBacktrace,omitempty"`
FaultingThread int `json:"faultingThread,omitempty"`
Threads []UserThread `json:"threads,omitempty"`
UsedImages []struct {
Arch string `json:"arch,omitempty"`
Base uint64 `json:"base,omitempty"`
Name string `json:"name,omitempty"`
Path string `json:"path,omitempty"`
Size uint64 `json:"size,omitempty"`
Source string `json:"source,omitempty"`
UUID string `json:"uuid,omitempty"`
} `json:"usedImages,omitempty"`
Base uint64 `json:"base,omitempty"`
Size uint64 `json:"size,omitempty"`
UUID string `json:"uuid,omitempty"`
} `json:"sharedCache"`
LegacyInfo struct {
ThreadTriggered struct {
Queue string `json:"queue,omitempty"`
} `json:"threadTriggered"`
} `json:"legacyInfo"`
TrialInfo struct {
Rollouts []struct {
RolloutID string `json:"rolloutId,omitempty"`
FactorPackIds struct {
} `json:"factorPackIds"`
DeploymentID int `json:"deploymentId,omitempty"`
} `json:"rollouts,omitempty"`
Experiments []struct {
TreatmentID string `json:"treatmentId,omitempty"`
ExperimentID string `json:"experimentId,omitempty"`
DeploymentID int `json:"deploymentId,omitempty"`
} `json:"experiments,omitempty"`
} `json:"trialInfo"`
DTAppStoreToolsBuild string `json:"DTAppStoreToolsBuild,omitempty"`
Version int `json:"version,omitempty"`
VMSummary string `json:"vmSummary,omitempty"`
VmRegionInfo string `json:"vmregioninfo,omitempty"`
Termination Termination `json:"termination"`
AbsoluteTime int `json:"absoluteTime,omitempty"`
PostSampleVMStats PostSampleVMStats `json:"postSampleVMStats"`
AdditionalDetails AdditionalDetails `json:"additionalDetails"`
// contains filtered or unexported fields
}
type Ips ¶
type Ips struct {
Header IpsMetadata
Payload IPSPayload
Config *Config
}
func (*Ips) Symbolicate210 ¶
func (*Ips) Symbolicate210WithDatabase ¶
type IpsMetadata ¶
type IpsMetadata struct {
Name string `json:"name,omitempty"`
AppName string `json:"app_name,omitempty"`
AppVersion string `json:"app_version,omitempty"`
BugType string `json:"bug_type,omitempty"`
BugTypeDesc string `json:"bug_type_desc,omitempty"`
OsVersion string `json:"os_version,omitempty"`
BundleID string `json:"bundleID,omitempty"`
BuildVersion string `json:"build_version,omitempty"`
IncidentID string `json:"incident_id,omitempty"`
Platform Platform `json:"platform,omitempty"`
Timestamp Timestamp `json:"timestamp"`
SliceUUID string `json:"slice_uuid,omitempty"`
IsFirstParty int `json:"is_first_party,omitempty"`
RootsInstalled int `json:"roots_installed,omitempty"`
}
func ParseHeader ¶
func ParseHeader(in string) (hdr *IpsMetadata, err error)
func (IpsMetadata) Build ¶
func (m IpsMetadata) Build() string
func (IpsMetadata) Version ¶
func (m IpsMetadata) Version() string
type LastStartedKext ¶
type LastStartedKext struct {
StartedAt uint64
Name string
Version string
Address uint64
Size uint64
}
func (*LastStartedKext) String ¶
func (l *LastStartedKext) String() string
type LoadedKext ¶
func (LoadedKext) String ¶
func (l LoadedKext) String() string
type LoadedKexts ¶
type LoadedKexts []LoadedKext
func (LoadedKexts) String ¶
func (l LoadedKexts) String() string
type LogType ¶
type LogType struct {
Name string `json:"name"`
Comment string `json:"comment,omitempty"`
Extention string `json:"ext,omitempty"`
EOS bool `json:"eOS,omitempty"`
Gm bool `json:"gm,omitempty"`
Legacy bool `json:"legacy,omitempty"`
MacOS bool `json:"macOS,omitempty"`
Disabled bool `json:"disabled,omitempty"`
WatchSync bool `json:"watchSync,omitempty"`
Limit int `json:"limit,omitempty"`
Radar string `json:"radar,omitempty"`
Seed bool `json:"seed,omitempty"`
Routing string `json:"routing,omitempty"`
Subrouting string `json:"subrouting,omitempty"`
}
type LogTypes ¶
LogTypes from /System/Library/PrivateFrameworks/OSAnalytics.framework/Versions/A/Resources/submissionConfig.plist
func GetLogTypes ¶
type MemoryStatus ¶
type MemoryStatus struct {
BusyBufferCount int64 `json:"busyBufferCount,omitempty"`
Compressions int64 `json:"compressions,omitempty"`
CompressorSize int64 `json:"compressorSize,omitempty"`
Decompressions int64 `json:"decompressions,omitempty"`
MemoryPages struct {
Active int64 `json:"active,omitempty"`
FileBacked int64 `json:"fileBacked,omitempty"`
Free int64 `json:"free,omitempty"`
Inactive int64 `json:"inactive,omitempty"`
Purgeable int64 `json:"purgeable,omitempty"`
Speculative int64 `json:"speculative,omitempty"`
Throttled int64 `json:"throttled,omitempty"`
Wired int64 `json:"wired,omitempty"`
} `json:"memoryPages"`
MemoryPressure bool `json:"memoryPressure,omitempty"`
MemoryPressureDetails struct {
PagesReclaimed int64 `json:"pagesReclaimed,omitempty"`
PagesWanted int64 `json:"pagesWanted,omitempty"`
} `json:"memoryPressureDetails"`
PageSize int64 `json:"pageSize,omitempty"`
}
func (MemoryStatus) String ¶
func (ms MemoryStatus) String() string
type Panic210 ¶
type Panic210 struct {
Panic string
DebuggerMessage *Field // string
MemoryID *Field // uint64
OsReleaseType *Field // string
OsVersion *Field // string
KernelVersion *Field // string
FilesetKernelCacheUUID *Field // string
KernelCacheUUID *Field // string
KernelUUID *Field // string
BootSessionUUID *Field // string
IBootVersion *Field // string
SecureBoot *Field // bool
RootsInstalled *Field // bool
PaniclogVersion *Field // string
KernelCacheSlide *Field // uint64
KernelCacheBase *Field // uint64
KernelSlide *Field // uint64
KernelTextBase *Field // uint64
KernelTextExecSlide *Field // uint64
KernelTextExecBase *Field // uint64
SptmLoadAddress *Field // uint64
SptmUUID *Field // string
TxmLoadAddress *Field // uint64
TxmUUID *Field // string
DebugHdrAddress *Field // uint64
DebugHdrEntryCount *Field // uint64
DebugHdrKernelCacheLoadAddress *Field // uint64
DebugHdrKernelCacheUUID *Field // string
MachAbsoluteTime *Field // uint64
EpochTime EpochTime
ZoneInfo ZoneInfo
TPIDRx_ELy TPIDRx_ELy
Cores []Core
CompressorInfo *Field // string
PanickedTask PanickedTask
PanickedThread PanickedThread
LastStartedKext *LastStartedKext
LoadedKexts LoadedKexts
// contains filtered or unexported fields
}
type PanicFrame ¶
type PanicFrame struct {
ImageIndex uint64 `json:"imageIndex,omitempty"`
ImageName string `json:"imageName,omitempty"`
ImageOffset uint64 `json:"imageOffset,omitempty"`
Symbol string `json:"symbol,omitempty"`
SymbolLocation uint64 `json:"symbolLocation,omitempty"`
Slide uint64 `json:"slide,omitempty"`
// PeekBytes holds ARM64 instructions around the frame address for --peek disassembly
PeekBytes []byte `json:"-"`
// PeekAddr is the starting address of PeekBytes
PeekAddr uint64 `json:"-"`
// PeekFrameIdx is the index of the frame instruction within PeekBytes (in instructions, not bytes)
PeekFrameIdx int `json:"-"`
}
func (*PanicFrame) UnmarshalJSON ¶
func (pf *PanicFrame) UnmarshalJSON(b []byte) error
type PanickedTask ¶
func (PanickedTask) String ¶
func (p PanickedTask) String() string
type PanickedThread ¶
type PanickedThread struct {
TID int
Backtrace uint64
Address uint64
CallStack []State
Kexts []BackTraceKext
}
func (PanickedThread) String ¶
func (p PanickedThread) String() string
type Platform ¶
type Platform int
const ( PlatformMacOS Platform = 1 PlatformIOS Platform = 2 // (includes iOS apps running under macOS on Apple silicon) PlatformTVOS Platform = 3 PlatformWatch Platform = 4 PlatformMacCatalyst Platform = 6 PlatformIOSSimulator Platform = 7 PlatformTVOSSimulator Platform = 8 PlatformWatchOSSimulator Platform = 9 )
type PostSampleVMStats ¶
type PostSampleVMStats struct {
Faults int `json:"faults,omitempty"`
ActiveCount int `json:"active_count,omitempty"`
CompressorPageCount int `json:"compressorPageCount,omitempty"`
TotalUncompressedPagesInCompressor int `json:"total_uncompressed_pages_in_compressor,omitempty"`
Hits int `json:"hits,omitempty"`
Decompressions int `json:"decompressions,omitempty"`
Swapouts int `json:"swapouts,omitempty"`
WireCount int `json:"wire_count,omitempty"`
Lookups int `json:"lookups,omitempty"`
Purges int `json:"purges,omitempty"`
Pageouts int `json:"pageouts,omitempty"`
Pageins int `json:"pageins,omitempty"`
ExternalPageCount int `json:"external_page_count,omitempty"`
ZeroFillCount int `json:"zero_fill_count,omitempty"`
FreeCount int `json:"free_count,omitempty"`
CowFaults int `json:"cow_faults,omitempty"`
SpeculativeCount int `json:"speculative_count,omitempty"`
Swapins int `json:"swapins,omitempty"`
Compressions int `json:"compressions,omitempty"`
Reactivations int `json:"reactivations,omitempty"`
InactiveCount int `json:"inactive_count,omitempty"`
ThrottledCount int `json:"throttled_count,omitempty"`
PurgeableCount int `json:"purgeable_count,omitempty"`
InternalPageCount int `json:"internal_page_count,omitempty"`
}
type Process ¶
type Process struct {
ID int `json:"pid"`
Name string `json:"procname"`
TimesThrottled int `json:"timesThrottled"`
TurnstileInfo []string `json:"turnstileInfo"`
PageIns int `json:"pageIns"`
WaitInfo []string `json:"waitInfo"`
TimesDidThrottle int `json:"timesDidThrottle"`
CopyOnWriteFaults int `json:"copyOnWriteFaults"`
PageFaults int `json:"pageFaults"`
UserTimeTask float64 `json:"userTimeTask"`
SystemTimeTask float64 `json:"systemTimeTask"`
Flags []string `json:"flags"`
ResidentMemoryBytes int `json:"residentMemoryBytes"`
ThreadByID map[int]Thread `json:"threadById,omitempty"`
}
type Register ¶
type StoreInfo ¶
type StoreInfo struct {
ItemID string `json:"itemID,omitempty"`
StoreCohortMetadata string `json:"storeCohortMetadata,omitempty"`
DistributorID string `json:"distributorID,omitempty"`
ApplicationVariant string `json:"applicationVariant,omitempty"`
DeviceIdentifierForVendor string `json:"deviceIdentifierForVendor,omitempty"`
SoftwareVersionExternalIdentifier string `json:"softwareVersionExternalIdentifier,omitempty"`
ThirdParty bool `json:"thirdParty,omitempty"`
}
type TPIDRx_ELy ¶
func (TPIDRx_ELy) String ¶
func (t TPIDRx_ELy) String() string
type Termination ¶
type Termination struct {
ByPid int `json:"byPid,omitempty"`
ByProc string `json:"byProc,omitempty"`
Code int `json:"code,omitempty"`
Flags int `json:"flags,omitempty"` // https://opensource.apple.com/source/xnu/xnu-3789.21.4/bsd/sys/reason.h.auto.html
Indicator string `json:"indicator,omitempty"`
Namespace string `json:"namespace,omitempty"`
}
type Thread ¶
type Thread struct {
ID int `json:"id"`
Name string `json:"name,omitempty"`
State []string `json:"state"`
Continuation []int `json:"continuation,omitempty"`
Queue string `json:"queue,omitempty"`
DispatchQueueLabel string `json:"dispatch_queue_label,omitempty"`
SchedFlags []string `json:"schedFlags,omitempty"`
BasePriority int `json:"basePriority"`
UserFrames []PanicFrame `json:"userFrames"`
KernelFrames []PanicFrame `json:"kernelFrames,omitempty"`
WaitEvent []float64 `json:"waitEvent,omitempty"`
QosRequested string `json:"qosRequested,omitempty"`
QosEffective string `json:"qosEffective,omitempty"`
UserTime float64 `json:"userTime"`
UserUsec int `json:"user_usec"`
SystemTime float64 `json:"systemTime"`
SystemUsec int `json:"system_usec"`
SchedPriority int `json:"schedPriority"`
}
type ThreadState ¶
type ThreadState struct {
X []Register `json:"x,omitempty"`
Flavor string `json:"flavor,omitempty"`
LR Register `json:"lr"`
CPSR Register `json:"cpsr"`
FP Register `json:"fp"`
SP Register `json:"sp"`
ESR Register `json:"esr"`
PC Register `json:"pc"`
FAR Register `json:"far"`
}
func (ThreadState) HasSymbols ¶
func (s ThreadState) HasSymbols() bool
func (ThreadState) String ¶
func (s ThreadState) String() string
type UserThread ¶
Click to show internal directories.
Click to hide internal directories.