如何模拟ARM处理器运行时环境并将Linux内核模块加载到其中? [英] How to simulate an ARM processor run-time environment and load a Linux kernel module into it?

查看:211
本文介绍了如何模拟ARM处理器运行时环境并将Linux内核模块加载到其中?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我尝试将vmlinux加载到gdb中,并使用ARM内核模拟器.

I try to load my vmlinux into gdb and use an ARM core simulator.

但是我不明白为什么会得到Undefined target command: "sim".:

But I can't understand why do I get Undefined target command: "sim".:

这是外壳程序的输出:

$ 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

推荐答案

根据此 gdb目标命令页面.

但是, gdb 配置脚本具有选项-disable-sim . crosstool-ng 项目使用此

However, the gdb configure script has an option --disable-sim. The crosstool-ng project uses this option by default. Most cross-compilers are build with this project Note1 as it is a fairly lengthy process to do by hand. It is quite possible that your gdb does not have the simulator built in.

似乎没有命令行选项可以打印 gdb 配置.但是,运行strings -n 3 arm-eabi-gdb | grep -iw sim应该验证您的 gdb 是否具有 sim 选项;如果 gdb 中没有 sim 选项,该命令将不返回任何内容.

There doesn't seem to be a command line option to print the gdb configuration. However, running strings -n 3 arm-eabi-gdb | grep -iw sim should verify whether your gdb has the sim option or not; the command returns nothing if there is no sim option in the gdb.

注意1::至少,Linaro,Ubuntu,Debian和Ltib使用 crosstool-ng .我不确定Android套件.

Note1: At least, Linaro, Ubuntu, Debian, and Ltib use crosstool-ng. I am not sure about the Android suite.

这篇关于如何模拟ARM处理器运行时环境并将Linux内核模块加载到其中?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆