2016-10-19 7 views
2

gdb에서 "reverse-step"및 "reverse-next"명령을 사용하고 있습니다. 스택 오버플로는 "rn"과 "rs"를 원하는 실행 컨텍스트에서 "target record-full"을 실행해야한다고 알려줍니다. 그러나 일부 이상한 오류가 발생 :gdb의 "target record-full"은 "프로세스 레코드가 주소 0x7ffff7dee6e7의 명령어 0xc5를 지원하지 않습니다"라는 printf에서 "n"명령을 실패하게합니다?

1 
    2 #include<stdio.h> 
    3 int i=0; 
    4 void fa() 
    5 { 
    6 ++i; 
    7 printf("%d\n",i); 
    8 ++i; 
    9 } 
10 int main(){ 
11 fa(); 
12 return 0; 
13 } 

내가 컴파일하고이 프로그램을 실행 : 나는 실행 "기록 전체 대상"하지 않는 경우, 다음 2 "N"OK 것 잘

(gdb) b 4 
Breakpoint 1 at 0x40052a: file test02.c, line 4. 
(gdb) r 
Starting program: /home/Troskyvs/a.out 

Breakpoint 1, fa() at test02.c:6 
6  ++i; 
(gdb) target record-full 
(gdb) n 
7  printf("%d\n",i); 
(gdb) n      # Error happens here! 
Process record does not support instruction 0xc5 at address 0x7ffff7dee6e7. 
Process record: failed to record execution log. 

Program stopped. 
_dl_runtime_resolve_avx() at ../sysdeps/x86_64/dl-trampoline.h:81 
81 ../sysdeps/x86_64/dl-trampoline.h: No such file or directory. 

을 다음 줄로 가라. 나는 여기에 오류 정보를 얻지 못했다.

"target record-full"과 관련되어 있습니까? 나는 어떻게 그것을 정복 할 수 있는가?

내가 다른 접근 시도 : 당신은 매개 변수 "-static"를 추가하면

(gdb) set exec-direction reverse 
(gdb) n 

No more reverse-execution history. 
fa() at test02.c:7 
7  printf("%d\n",i); 
(gdb) n 

No more reverse-execution history. 
fa() at test02.c:7 
7  printf("%d\n",i); 
(gdb) n 

글쎄, 그것은 당신이 간단한 경우에 사실

+0

알려진 버그가있는 것 같습니다. 자세한 내용과 몇 가지 가능한 해결 방법은 [이 토론] (https://sourceware.org/ml/gdb/2016-08/msg00025.html)을 확인하십시오. 내가 볼 수있는 것에서이 버그는 아직 해결되지 않았습니다. –

답변

0

작동하지 않습니다를 기록-전체 작업을해야합니다 귀하의 gcc 컴파일 명령.