backtrace
2015-08-26 00:00
162 查看
摘要: backtrace
Print a backtraceof the entire stack: one line per frame for all frames in the stack.
You can stop the backtraceat any time by typing the system interrupt character, normallyCtrl-c.
Similar, but print only the innermostnframes.
Similar, but print only the outermostnframes.
Print the values of the local variables also. As described above,nspecifies the number of frames to print.
Backtraces will continue past the user entry point.
Backtraces will stop when they encounter the user entry point. This is the default.
Display the current user entry point backtracepolicy.
Backtraces will continue past the internal entry point of an application. This entry point is encoded by the linker when the application is built, and is likely before the user entry point
Backtraces will stop when they encounter the internal entry point of an application. This is the default.
Display the current internal entry point backtracepolicy.
Limit the backtracetonlevels. A value of
Display the current limit on backtracelevels.
You can control how file names are displayed.
Display file names relative to the compilation directory. This is the default.
Display only basename of a filename.
Display an absolute filename.
Show the
3ff0
current way to display filenames.
Backtraces
A backtraceis a summary of how your program got where it is. It shows one line per frame, for many frames, starting with the currently executing frame (frame zero), followed by its caller (frame one), and on up the stack.backtrace
bt
Print a backtraceof the entire stack: one line per frame for all frames in the stack.
You can stop the backtraceat any time by typing the system interrupt character, normallyCtrl-c.
backtracen
btn
Similar, but print only the innermostnframes.
backtrace-n
bt-n
Similar, but print only the outermostnframes.
backtracefull
btfull
btfulln
btfull -n
Print the values of the local variables also. As described above,nspecifies the number of frames to print.
backtraceno-filters
btno-filters
btno-filtersn
btno-filters -n
btno-filters full
btno-filters fulln
btno-filters full -n
set backtracepast-main
set backtracepast-main on
Backtraces will continue past the user entry point.
set backtracepast-main off
Backtraces will stop when they encounter the user entry point. This is the default.
show backtracepast-main
Display the current user entry point backtracepolicy.
set backtracepast-entry
set backtracepast-entry on
Backtraces will continue past the internal entry point of an application. This entry point is encoded by the linker when the application is built, and is likely before the user entry point
main(or equivalent) is called.
set backtracepast-entry off
Backtraces will stop when they encounter the internal entry point of an application. This is the default.
show backtracepast-entry
Display the current internal entry point backtracepolicy.
set backtracelimitn
set backtracelimit 0
set backtracelimit unlimited
Limit the backtracetonlevels. A value of
unlimitedor zero means unlimited levels.
show backtracelimit
Display the current limit on backtracelevels.
You can control how file names are displayed.
set filename-display
set filename-display relative
Display file names relative to the compilation directory. This is the default.
set filename-display basename
Display only basename of a filename.
set filename-display absolute
Display an absolute filename.
show filename-display
Show the
3ff0
current way to display filenames.