aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp
diff options
context:
space:
mode:
authorWalter Erquinigo <a20012251@gmail.com>2021-04-21 15:06:44 -0700
committerWalter Erquinigo <a20012251@gmail.com>2021-04-21 15:09:39 -0700
commitc9a0754b443ba73623574db880a7b0b14826fedb (patch)
tree86552a8f979273c575429076eab1339e841cd3e0 /llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp
parent3d8f2059b95d3e9d6785255949283b258d7ca121 (diff)
downloadllvm-c9a0754b443ba73623574db880a7b0b14826fedb.zip
llvm-c9a0754b443ba73623574db880a7b0b14826fedb.tar.gz
llvm-c9a0754b443ba73623574db880a7b0b14826fedb.tar.bz2
[lldb-vscode] Distinguish shadowed variables in the scopes request
VSCode doesn't render multiple variables with the same name in the variables view. It only renders one of them. This is a situation that happens often when there are shadowed variables. The nodejs debugger solves this by adding a number suffix to the variable, e.g. "x", "x2", "x3" are the different x variables in nested blocks. In this patch I'm doing something similar, but the suffix is " @ <file_name:line>), e.g. "x @ main.cpp:17", "x @ main.cpp:21". The fallback would be an address if the source and line information is not present, which should be rare. This fix is only needed for globals and locals. Children of variables don't suffer of this problem. When there are shadowed variables {F16182150} Without shadowed variables {F16182152} Modifying these variables through the UI works Reviewed By: clayborg Differential Revision: https://reviews.llvm.org/D99989
Diffstat (limited to 'llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp')
0 files changed, 0 insertions, 0 deletions