gpt4 book ai didi

android - 如何模拟 ARM 处理器运行时环境并加载 Linux 内核模块?

转载 作者:太空狗 更新时间:2023-10-29 16:05:32 25 4
gpt4 key购买 nike

我尝试将我的 vmlinux 加载到 gdb 中并使用 ARM 核心模拟器。

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

这是 shell 输出:

$ 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

最佳答案

按照这个email,你的过程是正确的和 gdb target command手册页。

但是,gdb 配置脚本有一个选项--disable-simcrosstool-ng项目使用这个option by default .大多数交叉编译器都是用这个项目构建的 Note1 因为这是一个相当漫长的手工过程。很可能您的 gdb 没有内置模拟器

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

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

关于android - 如何模拟 ARM 处理器运行时环境并加载 Linux 内核模块?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16202130/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com