⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 writecoredump.man

📁 能把所有线程的数据和环境记录到文件,方便调试.
💻 MAN
字号:
'\" t.TH WRITECOREDUMP 3 "Feb 15, 2007".SH NAMEWriteCoreDump, WriteCoreDumpLimited, WriteCompressedCoreDump \- writesa snapshot of the current process.SH SYNOPSIS.ad l.PP.B "#include \*(lqgoogle/coredumper.h\*(rq".PP.BI int\~WriteCoreDump(const\~char\~* file_name );.PP.BI int\~WriteCoreDumpLimited(const\~char\ \:* file_name ,\ \:size_t\~ \    \:max_length );.HP 28.BI int\~Write\%Compressed\%Core\%Dump(const\~char\ \:* file_name \    ,\ \:size_t\ \: max_length ,\ \:const\~struct\~Coredumper\%Compressor\ \    \:compressors [],\ \:struct\~Coredumper\%Compressor\ \:** \    selected_compressor );.PP.ad b.SH DESCRIPTIONThe \fBWriteCoreDump\fP() function writes a core file to.IR file_name .The calling process continues running after the file has beenwritten..PPThe \fBWriteCoreDumpLimited\fP() function restricts the maximum lengthof the written file. This is similar to what setting calling.BR setrlimit (2)does for system-generated core files..PPThe \fBWriteCompressedCoreDump\fP() function attempts to compress thecore file on the fly, if a suitable.I compressorcould be located..PPIf.IR selected_compressoris non-NULL, it will be set to the actual.I CoredumperCompressorobject used..PPThe.I filenameautomatically has a suitable suffix appended to it. Normally thiswould be \*(lq.bz2\*(rq for.BR bzip2 (1)compression, \*(lq.gz\*(rq for.BR gzip (1)compression, or \*(lq.Z\*(rq for.BR compress (1)compression. This behavior can be changed by defining custom.I CoredumperCompressordescriptions. See the manual page for.BR GetCoreDump (3)for more details..SH RETURN VALUE\fBWriteCoreDump\fP(), \fBWriteCoreDumpLimited\fP(), and\fBWriteCompressedCoreDump\fP() return zero on success and \-1 onfailure. In case of failure,.I errnowill be set appropriately..SH ERRORSThe most common reason for failure is for another process to alreadyuse the debugging API that is needed to generate the corefiles. This could, for instance, be.BR gdb (1),or.BR strace(1)..SH NOTESThe coredumper functions momentarily suspend all threads, whilecreating a COW (copy-on-write) copy of the process's address space..PPThe functions are neither reentrant nor async signal safe. Callersshould wrap a mutex around their invocation, if necessary..PPThe current implementation tries very hard to behave reasonably whencalled from a signal handler, but no guarantees are made that thiswill always work. Most importantly, it is the caller's responsibilityto make sure that there are never more than one instance of functionsfrom the \fBGetCoreDump\fP() or \fBWriteCoreDump\fP() family executingconcurrently..SH "SEE ALSO".BR GetCoreDump (3),and.BR GetCompressedCoreDump(3).

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -