Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to solve the problem that the plugin pauses the GDB current thread ID when tentatively pausing a specified thread? #449

Open
hetaowz opened this issue Nov 6, 2024 · 0 comments

Comments

@hetaowz
Copy link

hetaowz commented Nov 6, 2024

When using the plugin for gdb debugging, I paused thread 1 in the call stack, but the thread that was paused was actually thread 4. The following are the relevant configurations
launch.json
{
"configurations": [
{
"name": "native-debug",
"type": "gdb",
"request": "attach",
"executable": "D:\cmiot\tool\vsworkapce\kkdebug\out\oneos.elf",
"gdbpath": "D:\cmiot\tool\document\arm-none-eabi-gdb.exe",
"target": "192.168.1.109:1234",
"cwd": "${workspaceRoot}",
"debugger_args": [
​ "-iex",
​ "set non-stop on"
],
"showDevDebugOutput": true,
"printCalls": true,
"remote": true,
"debugServer": 4711
}
]
}
image
image
image

GDB -> App: {"token":8,"outOfBandRecord":[],"resultRecords":{"resultClass":"done","results":[["threads",[[["id","1"],["target-id","Thread 14"],["details","user_led,prio:1,stat:SLP,errno:0,wake:1000,stackfree:7948"],["state","running"]],[["id","2"],["target-id","Thread 15"],["details","test,prio:1,stat:RDY,errno:0,wake:0,stackfree:7932"],["state","running"]],[["id","3"],["target-id","Thread 16"],["details","gdb_test,prio:1,stat:SLP,errno:0,wake:10,stackfree:7948"],["state","running"]],[["id","4"],["target-id","Thread 17"],["details","kerio_test,prio:1,stat:SLP,errno:0,wake:10,stackfree:7948"],["state","running"]]]],["current-thread-id","4"]]}}

Thread
GDB -> App: {"outOfBandRecord":[{"isStream":true,"type":"console","content":"4 stopped.\n","output":[],"asyncClass":""}]}
4 stopped.

GDB -> App: {"token":10,"outOfBandRecord":[],"resultRecords":{"resultClass":"done","results":[["threads",[[["id","1"],["target-id","Thread 14"],["details","user_led,prio:1,stat:SLP,errno:0,wake:1000,stackfree:7948"],["state","running"]],[["id","2"],["target-id","Thread 15"],["details","test,prio:1,stat:RDY,errno:0,wake:0,stackfree:7940"],["state","running"]],[["id","3"],["target-id","Thread 16"],["details","gdb_test,prio:1,stat:SLP,errno:0,wake:10,stackfree:7948"],["state","running"]],[["id","4"],["target-id","Thread 17"],["details","kerio_test,prio:1,stat:SUSP,errno:0,wake:10,stackfree:7948"],["frame",[["level","0"],["addr","0x800aff90"],["func","os_arch_context_switch"],["args",[[["name","current_task"],["value","0x80143c80 <g_os_current_task+12>"]],[["name","next_task"],["value","0x80142798 <gs_os_idle_task+3672>"]],[["name","cpu_index"],["value","3"]]]],["file","D:\cmiot\tool\code\oneos-qiyun\arch\arm\arm32\source\arch_task.c"],["fullname","D:\cmiot\tool\code\oneos-qiyun\arch\arm\arm32\source\arch_task.c"],["line","233"],["arch","armv7"]]],["state","stopped"]]]],["current-thread-id","4"]]}}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant