programing

GDB에서 #defined constant를 인쇄하려면 어떻게 해야 합니까?

randomtip 2022. 8. 17. 20:55
반응형

GDB에서 #defined constant를 인쇄하려면 어떻게 해야 합니까?

주제별로.

다음과 같이 정의된 몇 가지 상수가 있습니다.

#define CONST 40

나는 내 프로그램에 중단점을 설정했다.이 상수의 값은 어떻게 인쇄합니까?(소스코드만 봐도 되는데 확실히 하고 싶다)

help macro

매크로가 로드되기 전에 -g3 플래그를 사용하여 컴파일하고 프로그램을 시작해야 합니다.

고객님의 경우:

info macro CONST

또는

macro expand CONST

상세정보 : http://sourceware.org/gdb/current/onlinedocs/gdb/Macros.html

언급URL : https://stackoverflow.com/questions/2934006/how-do-i-print-a-defined-constant-in-gdb

반응형