vadimcn / codelldb

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

Global variables are miscategorized as static #980

Closed tristanlabelle closed 10 months ago

tristanlabelle commented 11 months ago

OS: Windows 11 22H2 VSCode version: 1.18.1 CodeLLDB version: v1.9.2 Compiler: clang++ Debuggee: x86_64-windows / dwarf, both C++ and Swift LLDB version: From the Swift toolchain

lldb version 16.0.0
compnerd.org Swift version 5.9-dev (LLVM c8ca153def6029d, Swift 1381d9a7b2555c6)

In both C++ and Swift, global variables get miscategorized as static. It's not clear what appears in static.

image image

The problem is likely in:

image

(or is it an lldb issue that it's not reporting the expected ValueType enumerant?)

vadimcn commented 11 months ago

or is it an lldb issue that it's not reporting the expected ValueType enumerant?

Yes. Or at least that I don't understand correctly what these variants are supposed to mean.
If you can come up with a better statics vs globals filter, I'll be happy incorporate that.

vadimcn commented 10 months ago

On second look, I've concluded that I did mess up filter conditions for locals and globals. Should be fixed in 1.10.