gdb 설정 재정의 로깅이 gdb.txt를 덮어써야 한다는 것이 맞나요?

gdb 설정 재정의 로깅이 gdb.txt를 덮어써야 한다는 것이 맞나요?

내가 찾고 있어요로그 출력이 특정 명령을 시도해 왔습니다.

set logging overwrite on

AFAI 알겠습니다. 이 명령은 gdb.txt의 내용을 덮어쓰도록 되어 있지만 그렇지 않습니다. 오류가 있거나 의미/구문을 올바르게 이해하지 못했습니다.

나는 달리고 있다 -

[$] gdb --version                                                                                                                  
GNU gdb (Debian 7.12-6) 7.12.0.20161007-git
Copyright (C) 2016 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word".

이것은 데비안에서 테스트되었습니다.

보고:불안정한 gdb 패키지의 버그(버전 7.12-6)

많은 것을 알려주지는 않지만 저는 gdb 전문가도 아니고 중급 사용자도 아닙니다. 위 동작을 인용하는 데 오류가 있는 사람이 있으면 공유해 주시고, 제가 이해가 부족한 경우에도 공유해 주세요.

갱신 -

정확한 명령은 -

$ gdb qbittorrent 
(gdb) set logging overwrite on 
(gdb) set pagination 0
(gdb) run

애플리케이션 통과 시 - 정지/충돌

QXcbConnection: XCB error: 3 (BadWindow), sequence: 16699, resource id: 14227177, major code: 40 (TranslateCoords), minor code: 0
pure virtual method called
terminate called without an active exception

Thread 1 "qbittorrent" received signal SIGABRT, Aborted.
__GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:51
51 ../sysdeps/unix/sysv/linux/raise.c: No such file or directory. 

나는 필요한 일을 했다 -

(gdb) bt
(gdb) bt full
(gdb) thread apply all bt

overwrite on이제 gdb 명령을 사용하면 현재 세션의 gdb.txt 내용을 덮어쓰고 파일의 타임스탬프도 덮어쓸 것으로 예상했지만 둘 다 발생하지 않았습니다. 다행히 세션을 닫지 않았고 디버그 세션 내용을 관리자와 업스트림에 복사하여 무슨 일이 일어나고 있는지 자세히 살펴볼 수 있었습니다.

왜 바뀌지 않는지 궁금합니다/이해가 안 되거나 잘못 이해하고 있습니다.

답변1

실제 로깅()이 누락되었습니다 set logging on.

(gdb) set logging overwrite on
(gdb) set logging on

관련 정보