-
Notifications
You must be signed in to change notification settings - Fork 14.5k
Closed
Labels
Description
Description:
If a vaiable named "id", it can't be referenced by command p
or expr
, and the error message was
error: expression failed to parse:
error: <lldb wrapper prefix>:45:31: no member named 'id' in namespace '$__lldb_local_vars'
using $__lldb_local_vars::id;
~~~~~~~~~~~~~~~~~~~~^
warning: <user expression 1>:1:1: declaration does not declare anything
id
^~
Environment
lldb version: lldb-1400.0.38.17
Apple clang version 14.0.0 (clang-1400.0.29.202)
OS: MacOS 12.6.7 (21G651)
Processor: 3.3 GHz Quad-Core Intel Core i5
Reproduce steps
With code
int main(int argc, char**){
int i = argc;
int id = argc;
return i - id ;
}
build command:
clang++ a.cpp -g
Steps:
$lldb ./a.out
(lldb) b main
(lldb) r aaa
(lldb) n
(lldb) n
(lldb) p i
(int) $0 = 2
(lldb) p id
error: expression failed to parse:
error: <lldb wrapper prefix>:45:31: no member named 'id' in namespace '$__lldb_local_vars'
using $__lldb_local_vars::id;
~~~~~~~~~~~~~~~~~~~~^
warning: <user expression 1>:1:1: declaration does not declare anything
id
^~