[lldb-dev] [Bug 49946] New: python SBTarget.EvaluateExpression cannot call selectors prefixed with underscore
via lldb-dev
lldb-dev at lists.llvm.org
Mon Apr 12 22:25:08 PDT 2021
https://bugs.llvm.org/show_bug.cgi?id=49946
Bug ID: 49946
Summary: python SBTarget.EvaluateExpression cannot call
selectors prefixed with underscore
Product: lldb
Version: unspecified
Hardware: PC
OS: All
Status: NEW
Severity: enhancement
Priority: P
Component: All Bugs
Assignee: lldb-dev at lists.llvm.org
Reporter: matan1008 at gmail.com
CC: jdevlieghere at apple.com, llvm-bugs at lists.llvm.org
to whom it may concern,
I am using the official LLDB python api in the project hilda
(https://github.com/doronz88/hilda).
When trying to evaluate an expression in MobileSafari process I noticed that
evaluating methods prefixed with underscore has unexpected behavior.
My code was:
options = lldb.SBExpressionOptions()
options.SetIgnoreBreakpoints(True)
options.SetTryAllThreads(True)
e = target.EvaluateExpression('[NSUserDefaults _sf_safariDefaults]')
e.error.Success() # This one turns as False
When printing str(e.error) I see:
error: <user expression 15>:1:17: no known method '+_sf_safariDefaults'; cast
the message send to the method's return type
It seems that for some reason, LLDB added '+' before the _sf_safariDefaults.
Also, I tried running from the LLDB command line with 'expr -o' and it worked
well, so I think the problem might be somewhere in the API.
I would really like your help solving this problem.
Thanks for dedicating time!
Matan.
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/lldb-dev/attachments/20210413/d12d516a/attachment-0001.html>
More information about the lldb-dev
mailing list