microsoft / microsoft/vscode-cpptools

expression breakpoint not working as expected

オープン
#9,503 コメント 3 件 リアクション 1 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

debugger more info needed
主要言語
TypeScript
スター
6.2k
フォーク
1.7k
平均マージ
14時間 46分
マージ済み PR(30日)
61

説明

Environment
  • OS and version: Ubuntu 20.04.4 LTS
  • VS Code: 1.68.0
  • C/C++ extension: 1.10.7
  • OS and version of remote machine (if applicable): both on local linux and remote to linux(from mac or win),but local mac and win is working as expected
  • GDB / LLDB version:9.2
Bug Summary and Steps to Reproduce

Bug Summary:
If I use expression breakpoint and expression contains strcmp, when this breakpoint is hit, gdb will crash unexpectedly
image

Steps to reproduce:

  1. Only on Linux environment(both local and remote to it via remote-ssh), it works well on local windows environment
  2. Just a demo project will reproduce this issue

Besides, if I don't use strcmp and just set very simple expression like 1==1, breakpoint will be hit successfully and there's no error.

Sorry to let you guys work on this, looking forward to your reply.

Debugger Configurations
{
    // 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": "C++ Launch",
            "type": "cppdbg",
            "request": "launch",
            "program": "${workspaceFolder}/${fileBasenameNoExtension}.exe",
            "stopAtEntry": false,
            "cwd": ".",
            "launchCompleteCommand": "exec-run",
            "linux": {
                "MIMode": "gdb",
                "miDebuggerPath": "/usr/bin/gdb"
            },
            "preLaunchTask": "default compile",
            "externalConsole": false
        }
    ]
}
Debugger Logs
Loaded '/lib64/ld-linux-x86-64.so.2'. Symbols loaded.

Breakpoint 1, main () at /home/eric/Dev/c-test/test.c:5
5	{
Loaded '/lib/x86_64-linux-gnu/libc.so.6'. Symbols loaded.
ERROR: GDB exited unexpectedly. Debugging will now abort.
The program '/home/eric/Dev/c-test/test.exe' has exited with code -1 (0xffffffff).
Other Extensions

Other extensions have been disabled when I test on this

Additional Information

No response

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

調査の方向性

まず、Linux 上で GDB 9.2 を使用し、提供された起動構成で test.c の失敗を再現します。その際、strcmp を含む式と 1==1 を比較します。デバッガーログを使用して、GDB が予期せず終了する理由を特定します。失敗する式のブレークポイントによってデバッグが中断されなくなり、その動作がリグレッションテストでカバーされれば完了です。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
cpp, vscode
領域
devtools, operating-systems
issue の種類
バグ
難易度
4/5
見積もり時間
3〜5日
活発さ
停滞
明瞭さ
おおむね明確
初心者へのやさしさ
35/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。