2012-05-24 1 views
3

gdb에서 return 키를 누르면 마지막 명령이 반복됩니다. 마찬가지로 Sun/Oracle/Solaris dbx를 구성하는 방법이 있습니까?빈 명령을 마지막 명령의 반복으로 처리하도록 dbx를 구성하는 방법이 있습니까?

+0

이 질문은 dbx의 Solaris/Sun/Oracle 버전, dbx의 SGI 버전에 대한 질문 이었습니까? Solaris Studio dbx를 사용하여이 작업을 수행 할 수있는 방법이 있다고 생각합니다. 그러나 지금 당장 답을 찾지 못했습니다. Google 검색을 사용하여 참조 설명서를 찾을 수 있어야합니다. –

답변

2

dbx에서 "gdb 모드"를 활성화하면 해당 동작을 얻을 수 있습니다.

(dbx) gdb on 
(dbx) step 
stopped in main at line 4 in file "t.c" 
    4  printf("world"); 
(dbx) 
step 
stopped in main at line 5 in file "t.c" 
    5  printf("!"); 
(dbx) 
step 
stopped in main at line 6 in file "t.c" 
    6  printf("\n"); 
(dbx) 
step 
helloworld! 
stopped in main at line 7 in file "t.c" 
    7 } 

다음은 최신 dbx의 gdb 모드에 대한 도움말입니다.

 
(dbx) help gdb 
gdb (command) 
gdb on | off 
Use `gdb on' to enter the gdb command mode under which dbx will understand 
and accept gdb commands. To exit the gdb command mode and return to the dbx 
command mode, enter "gdb off". Please note that the dbx commands will not 
be accepted while in gdb command mode and vice versa. All debugging settings 
such as breakpoints are preserved across different command modes. The 
following gdb commands are not supported in the current release: 
     - commands  - define 
     - handle  - hbreak 
     - interrupt  - maintenance 
     - printf  - rbreak 
     - return  - signal 
     - tcatch  - until 
2

$ repeatmode를 사용할 수있는 것처럼 보입니다. 는 나는 또한 DBX는 GDB처럼 행동하게 다른 옵션 '에 GDB'이있을 것 같습니다 dbx-guide

Repeating Commands 

You can execute any of the commands contained in the history list. Each 
history command begins with an exclamation point (!): 

!! Repeats the previous command. If the value of the dbx 
variable $repeatmode is set to 1, then entering a carriage 
return at an empty line is equivalent to executing !!. By 
default, $repeatmode is set to 0. 

에서 다음 얻었다. dbx에 대한 액세스 권한이 없으므로이 중 하나를 시도하지 않았으므로이 기능이 작동하는지 알려주십시오.