简体   繁体   中英

Difference between backtrace(backtrace_symbols) and bt in gdb

linux中的backtrace_symbols()函数需要很多时间将地址转换为字符串数组,但是gdb中的bt工作得很快。在radb中backtrace_symbols()和bt的功能有什么区别?

gdb reads symbols at startup time, and uses the data structures it builds from those symbols in subsequent command invocations, such as bt. If gdb were to repeat symbol reads for each invocation of bt, that would make bt slower, possibly comparable in speed to backtrace_symbols().

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM