{// Use IntelliSense to learn about possible attributes.// Hover to view descriptions of existing attributes.// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387"version":"0.2.0","configurations":[{"name":"linux kernel debug",// 注意: 如果不装 C/C++ 插件,会提示 cppdbg 找不到"type":"cppdbg","request":"launch","program":"${workspaceFolder}/vmlinux","cwd":"${workspaceFolder}","MIMode":"gdb",// 注意 : miDebuggerPath 必须是绝对路径"miDebuggerPath":"/path/to/bin/riscv64-unknown-linux-gdb","miDebuggerServerAddress":"10.37.30.85:1111"}]}
=thread-group-added,id="i1"
GNU gdb(2022-05-03_riscv64-linux-85ba823a400)8.2.50.20190522-git
Copyright(C)2019 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-pc-linux-gnu --target=riscv64-linux".
Type "show configuration"for configuration details.
For bug reporting instructions, please see:<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word".[info] Loading .Andesgdbinit.=cmd-param-changed,param="remotetimeout",value="60"[info].Andesgdbinit loaded.
Warning: Debuggee TargetArchitecture not detected, assuming x86_64.=cmd-param-changed,param="pagination",value="off"=cmd-param-changed,param="print frame-arguments",value="none"0x0000000020003738 in ??()=cmd-param-changed,param="print frame-arguments",value="scalars"
Program received signal SIGTRAP, Trace/breakpoint trap.// 我在内核中加了一条内嵌汇编,他就停下来了,这是停下来的第一句打印0xffffffff8000180a in start_kernel() at init/main.c:581581asm("c.ebreak");
Execute debugger commands using "-exec <command>",for example "-exec info registers" will list registers in use(when GDB is the debugger)-exec info registers // 这是我键入的一条命令
ra 0xffffffff800010940xffffffff80001094<_start_kernel+148>
sp 0xffffffff8079bfd00xffffffff8079bfd0
gp 0xffffffff807e66400xffffffff807e6640<tcp6_seq_afinfo>
tp 0xffffffff807a1b000xffffffff807a1b00<init_task>
t0 0xffffffff807f6670-2139134352
t1 0x159c5532
t2 0xffffffffb35db666-1285704090
fp 0xffffffff8079c0000xffffffff8079c000<vdso_data_store>
s1 0xc0000012582912
a0 0x11
a1 0x15a05536
a2 0x00
a3 0x15005376
a4 0xffffffffffffffff-1
a5 0xffffffffffffffff-1
a6 0x00
a7 0xa4164
s2 0x2000002097152
s3 0xc0000012582912
s4 0x00
s5 0x00
s6 0x8000000a00006800-9223371993905076224
s7 0x140c082112
s8 0x7f127
s9 0x1301077840
s10 0x00
s11 0x00
t3 0x77
t4 0x00
t5 0xffffffff807e6c20-2139198432
t6 0xffffffff807f666d-2139134355
pc 0xffffffff8000180a0xffffffff8000180a<start_kernel+10>