반갑습니다.
gdb에서 script를 실행하는데
source할때 에러가 발생하네요.
소스는 스택을 출력해보려고 인터넷에서 가져온거구요..
그런데 이상한것은 gdb내에서
define stkfrm
...
...
end
입력하고,
아래와 같이 실행하면
(gdb) stkfrm
이상이 없는데,
화일 (gdb.sh)로 만들어두고,
gdb 내에서
(gdb) source ./gdb.sh [enter]
실행하면 아래와 같이 에러가 나네요.
./gdb.sh:7: Error in sourced command file:
This command cannot be used at the top level.
아래는 코드입니다.