【问题标题】:How to change executing thread in gdb?如何更改gdb中的执行线程?
【发布时间】:2015-03-31 06:03:55
【问题描述】:

我目前正在使用 KGDB 调试内核代码。 每当我闯入时,我自然会跳到 kgdb 的中断处理程序。 在 GDB 下,我运行了以下命令。

info threads 

输出将是

7 线程 7 (rcu_sched) 0x0000000000000000 in irq_stack_union ()

6 线程 5 (kworker/0:0H) 0x0000000000000000 in irq_stack_union()

5 线程 3 (ksoftirqd/0) 0x0000000000000000 in irq_stack_union ()

4 线程 2 (kthreadd) 0x0000000000000000 in irq_stack_union ()

3 线程 1 (init) 0x0000000000000000 in irq_stack_union ()

irq_stack_union () 中的 2 线程 3754 (Xorg) 0x0000000000000000

  • 1 线程 4294967294 (shadowCPU0) kgdb_breakpoint()

    在 kernel/debug/debug_core.c:1042

然后我会跳过期望在不同线程中结束的代码(我对 Xorg 感兴趣)但是在我单步执行代码之后,下一个执行线程变为 cpu 空闲。

info thread
  • 1 线程 4294967294 (shadowCPU0) cpu_idle_loop () at kernel/cpu/idle.c:116

如何将我的调试上下文切换到 Xorg 或任何其他线程,另外 irq_stack_union () 是什么意思。线程是否空闲挂起中断?

【问题讨论】:

    标签: linux gdb kgdb


    【解决方案1】:

    根据官方文档只是thread threadno https://sourceware.org/gdb/onlinedocs/gdb/Threads.html

    【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2016-06-18
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2013-08-24
    • 1970-01-01
    相关资源
    最近更新 更多