2013-04-24 3 views
2

vmlinuxgdb에로드하고 ARM 코어 시뮬레이터를 사용하려고합니다. 내가 Undefined target command: "sim".를 얻을 왜ARM 프로세서 런타임 환경을 시뮬레이트하고 Linux 커널 모듈을로드하는 방법은 무엇입니까?

그러나 나는 이해할 수 없다 :

다음

쉘 출력 :

$ arm-eabi-gdb vmlinux 
GNU gdb (GDB) 7.3.1-gg2 
Copyright (C) 2011 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 "--host=x86_64-linux-gnu --target=arm-linux-android". 
For bug reporting instructions, please see: 
<http://www.gnu.org/software/gdb/bugs/>... 
Reading symbols from /repo/kernel/kernel/vmlinux...done. 
(gdb) target sim 
Undefined target command: "sim". Try "help target". 
(gdb) help target 
Connect to a target machine or process. 
The first argument is the type or protocol of the target machine. 
Remaining arguments are interpreted by the target protocol. For more 
information on the arguments for a particular protocol, type 
`help target ' followed by the protocol name. 

List of target subcommands: 

target core -- Use a core file as a target 
target exec -- Use an executable file as a target 
target extended-remote -- Use a remote computer via a serial line 
target record -- Log program while executing and replay execution from log 
target record-core -- Log program while executing and replay execution from log 
target remote -- Use a remote computer via a serial line 
target tfile -- Use a trace file as a target 
+0

내 질문 어디에서 시뮬레이터를 얻을 수 있습니까? 어떻게 gdb와 함께 사용합니까? 안드로이드 패키지에 들어 있지 않다는 것을 안다. – 0x90

+0

http://files.meetup.com/1590495/debugging-with-qemu.pdf – 0x90

+0

https://wiki.ubuntu.com/ARM/BuildArmPackages – 0x90

답변

3

귀하의 과정이 email 및 설명서의 gdb target command 페이지 당 맞습니다.

그러나, GDB 구성 스크립트 옵션 --disable-SIM 있습니다. crosstool-ng 프로젝트는이 option by default을 사용합니다. 대부분의 크로스 컴파일러는이 프로젝트로 빌드되어 있습니다. 참고 1 수작업으로 처리하는 데 꽤 긴 시간이 걸리기 때문입니다. 당신의 GDBGDB 구성을 인쇄하는 명령 행 옵션이있을하지 않는 것 시뮬레이터가에.

내장이없는 것을 확실히 가능하다. 그러나 strings -n 3 arm-eabi-gdb | grep -iw sim을 실행하면 gdbsim 옵션이 있는지 여부를 확인해야합니다. gdbsim 옵션이 없으면 아무 것도 반환하지 않습니다.

주 :는 적어도, 리나로는, 우분투, 데비안, 그리고 Ltib 사용 crosstool-ng를을. 나는 안드로이드 제품군에 대해 잘 모르겠습니다.

+0

안드로이드는 자체 툴 체인 varient는 안드로이드 소스와 함께 유지 관리됩니다. 실제로는 하나 이상의 응용 프로그램 개발자가 jni 라이브러리를 만드는 데 사용되는 널리 배포 된 패키지는 장치 개발자가 커널을 만드는 데 사용하는 것과 다릅니다. –

+0

리나로도 [안드로이드 지원] (http://android.git.linaro.org/gitweb?p=toolchain/build.git;a=blob;f=README;hb=HEAD)이 있습니다. 외관상으로는 스크립트가 많이 다르지만'gcc '가 * - disable-sim *으로 설정되어 있으면 작동하지 않을 것이라는 사실은 변하지 않습니다. –

3

GDB의 ARM 시뮬레이터는 Linux 커널을 실행할 수있는 ARM 응용 프로그램 프로세서를 에뮬레이션하지 않습니다. 나는 그것이 메모리 관리 유닛을 모방하지 않는다고 생각한다. 리눅스를 실행하려면 대신 QEMU와 내장 된 gdb 서버를 사용하십시오. https://plus.google.com/100386424363328269117/posts/RhdQmjz4gBJ

관련 문제