microsoft / microsoft/vscode-cpptools

stack walk fail: current thread changes after break

Open
#8,367 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

debugger embedded
Dominant language
TypeScript
Stars
6.2k
Forks
1.7k
Avg merge
14h 46m
Merged PRs (30d)
61

Description

Bug type: Debugger

Describe the bug

  • OS and Version: ubuntu 18.04
  • VS Code Version: 1.61.2
  • C/C++ Extension Version: 1.7.1
  • Other extensions you installed (and if the issue persists after disabling them):
  • A clear and concise description of what the bug is : The current thread changes right after break causing the command stack-list-frames to fail.

To Reproduce
Embedded linux kernel debugging

1: (49668) ->*stopped,reason="breakpoint-hit",disp="keep",bkptno="2",frame={addr="0xffffff80037a3390",func="kvx_eth_get_ethtool_stats",args=[{name="netdev",value="0xffffff804a0f0000"},{name="stats",value="0xffffff80495afbe8"},{name="data",value="0xffffff90400d5000"}],file="<path>",fullname="<path>",line="116",arch="kvx:kv3-1:64"},thread-id="10",stopped-threads=["10"]
116	{
1: (49668) <-1035-stack-list-frames 0 1000
1: (49668) ->1035^error,msg="Selected thread is running."
1: (49668) ->(gdb)
1: (49669) 1035: elapsed time 0
1: (49669) Stack walk failed on thread: 10
1: (49670) Send Event AD7MessageEvent
ERROR: Error while trying to enter break state. Debugging will now stop. Failed to find thread 10 for break event
1: (49671) <--gdb-exit

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the embedded Linux kernel debugging case described in the issue, focusing on the breakpoint stop event, the stack-list-frames command, and the reported thread-switching error. Trace the debugger handling for thread 10 and verify that stack walking succeeds after a breakpoint without reporting the selected thread as running.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp, linux, typescript, vscode
Domain
devtools, operating-systems
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.