我正在尝试更新用于KGDB设置的目标m/c grub.cfg文件,但是在启动m/c时,它被完全挂起,而不是请求/等待远程gdb连接。以下是我加入的记项:
menuentry 'Ubuntu, with Linux 2.6.32-24-kgdb' --class ubuntu --class gnu-linux --class gnu --class os {
recordfail
insmod ext2
set root='(hd0,1)'
search --no-floppy --fs-uuid
建设7d43534625ac06ae01987113e912ffaf1aec2302后2018.02,Ubuntu 17.10主机。
我跑:
make qemu_x86_64_defconfig
printf 'BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE=\"kdb\"\n' >>.config
make olddefconfig
time make BR2_JLEVEL="$(nproc)"
其中kdb是一个具有CONFIG_KGDB=y的Linux内核配置。
然后如预期的那样:
grep '^C
我正在尝试让kgdb与使用的安卓内核一起工作。我在下面的步骤中遇到困难:
Configure kernel command line
Specify ttyGS0 as the kgdboc device. Add the following into the kernel command line (possibly in BoardConfig.mk)
kgdboc=ttyGS0 kgdbretry=4
The second option "kgdbretry=4" is a new parameter added to kgdboc.
我已经通过,pkg install gdb-7.11安装了gdb 7.11 ...当我尝试运行它时,gdb给我这个错误;
i386fbsd-kern.c:482: internal-error: _initialize_i386_kgdb_tdep: Assertion `offsetof(struct pcb, pcb_ebx) == i386fbsd_pcb_offset[I386_EBX_REGNUM]' failed.
A problem internal to GDB has been detected,
further debugging may prove unrelia
我想通过串行ttyS0从我的64位suse机器上调试一个MIPS驱动程序。使用的gdb在LAN上调试应用程序时非常出色,但在串行上却不能使用kgdb。我使用了这个和其他一些来启动调试,但没有最终结果。
我的内核是用以下设置编译的:
CONFIG_MAGIC_SYSRQ=y
CONFIG_HAVE_ARCH_KGDB=y
CONFIG_KGDB=y
CONFIG_KGDB_SERIAL_CONSOLE=y
# CONFIG_KGDB_TESTS is not set
CONFIG_CMDLINE="kgdboc=ttyS0,115200"
如果我运行gdb:
gdb vmlinu
我一直试图让内核在QEMU中执行,使用GDB对其进行远程调试,但我无法通过或设置断点。以下是GDB会话:
linux (master *) $ gdb vmlinux
GNU gdb (Debian 7.12-6) 7.12.0.20161007-git
Copyright (C) 2016 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
[LICENSE TEXT]
The target architecture
我使用kgdb通过串行电缆调试一些东西,所以我在gdb中设置了remote /dev/ttyS1,这给了我通过gdb从远程机器输出的信息。
有没有办法将输出重定向到文件而不重定向gdb的其余输出?它也不允许我启用TUI。我在用:
set logging file ~/gdb_output.log
set logging overwrite on
set logging redirect on
set logging on
谢谢!
串口是否来自我的目标机器,以及gdb是否使用stdout输出?什么使用stdin,什么使用stdoutm,什么使用stderr?