简体   繁体   中英

Getting backtrace in gdb pretty printer errors

I am using custom prertty printers written in Python in gdb. If the pretty printer throws an exception, I get an error message. However, there is no backtrace, so it can be difficult to figure out the origin of the error. Is there any way to print a backtrace in this case?

Yes, put this into your ~/.gdbinit :

set python print-stack full

Then gdb will print the full Python stack trace for errors like this.

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