【无标题】backtrace_symbols

          backtrace, backtrace_symbols, backtrace_symbols_fd - support for application self-debugging

SYNOPSIS
       #include <execinfo.h>

       int backtrace(void **buffer, int size);

       char **backtrace_symbols(void *const *buffer, int size);

       void backtrace_symbols_fd(void *const *buffer, int size, int fd);

DESCRIPTION
       backtrace()  returns  a  backtrace  for the calling program, in the array pointed to by buffer.  A
       backtrace is the series of currently active function calls for the  program.   Each  item  in  the
       array  pointed  to  by  buffer is of type void *, and is the return address from the corresponding
       stack frame.  The size argument specifies the maximum number of addresses that can  be  stored  in
BACKTRACE(3)                            Linux Programmer's Manual                            BACKTRACE(3)

NAME
       backtrace, backtrace_symbols, backtrace_symbols_fd - support for application self-debugging

SYNOPSIS
       #include <execinfo.h>

       int backtrace(void **buffer, int size);

       char **backtrace_symbols(void *const *buffer, int size);

       void backtrace_symbols_fd(void *const *buffer, int size, int fd);

DESCRIPTION
       backtrace()  returns  a  backtrace  for the calling program, in the array pointed to by buffer.  A
       backtrace is the series of currently active function calls for the  program.   Each  item  in  the
 Manual page backtrace_symbols(3) line 1/163 13% (press h for help or q to quit)
       should not be freed.)

       backtrace_symbols_fd() takes the same  buffer  and  size  arguments  as  backtrace_symbols(),  but
       instead  of  returning  an array of strings to the caller, it writes the strings, one per line, to
       the file descriptor fd.  backtrace_symbols_fd() does not call malloc(3), and so can be employed in
       situations where the latter function might fail.

RETURN VALUE
       backtrace()  returns  the  number of addresses returned in buffer, which is not greater than size.
       If the return value is less than size, then the full backtrace was stored; if it is equal to size,
       then  it  may  have been truncated, in which case the addresses of the oldest stack frames are not
       returned.

       On success, backtrace_symbols() returns a pointer to the array malloc(3)ed by the call; on  error,
       NULL is returned.

VERSIONS
       backtrace(),  backtrace_symbols(),  and backtrace_symbols_fd() are provided in glibc since version
       2.1.

ATTRIBUTES
       For an explanation of the terms used in this section, see attributes(7).

       ┌───────────────────────┬───────────────┬─────────┐
       │Interface              │ Attribute     │ Value   │
       ├───────────────────────┼───────────────┼─────────┤
       │backtrace(),           │ Thread safety │ MT-Safe │
       │backtrace_symbols(),   │               │         │
       │backtrace_symbols_fd() │               │         │
       └───────────────────────┴───────────────┴─────────┘
CONFORMING TO
       These functions are GNU extensions.

 Manual page backtrace_symbols(3) line 47/163 59% (press h for help or q to quit)
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值