vadimcn / codelldb

A native debugger extension for VSCode based on LLDB
https://marketplace.visualstudio.com/items?itemName=vadimcn.vscode-lldb
MIT License
2.49k stars 236 forks source link

Incorrect size reported for STL queue while debugging cpp file #553

Open Yachint opened 2 years ago

Yachint commented 2 years ago

OS: macOS BigSur 11.6 VSCode version: September 2021 (version 1.61.2) CodeLLDB version: 1.6.8 Compiler: clang++/g++ System: Apple M1

The bug is related to queue size being shown as 1 even though the queue is empty. I have noticed that push and pop operations for queue are not being reported correctly in the debugger even though program runs as expected. A sample code is provided below to replicate the issue:

Screenshot 2021-10-21 at 7 34 33 PM

Below is my Launch.json config: "configurations": [ { "name": "Launch", "type": "lldb", "request": "launch", "program": "${workspaceFolder}/Sketchpad/sketchpad", "args": ["-arg1", "-arg2"] }

And also the command I use with code runner to compile: cd $dir && clang++ $fileName -o $fileNameWithoutExt -std=c++14 -g && $dir$fileNameWithoutExt

vadimcn commented 2 years ago

Confirmed, however, data formatters for C++ come from upstream LLDB, you should report it there.

Yachint commented 2 years ago

Sure, please let me know the name of the repository I can report the issue on. Also thanks for your work on this repo, much appreciated 👍

vadimcn commented 2 years ago

It's at https://bugs.llvm.org/