gdb ./pgm set logging file log set logging on ... set logging off
gdb ./pgm | tee -a log ...
file a.log a.log: data
a.log是二进制文件, less -R 可以查看, tee -a 比较好用。
less -r 分屏幕时效果好,但是cgdb 查看不友好, less -R 会有^M之类的东西,但是都是分行看的,友好。
Copyright @ 2024 桑海 Powered by .NET 9.0 on Kubernetes Powered by: .Text and ASP.NET Theme by: .NET Monster