[lldb-dev] EvaluateExpression has trailing error

Ramkumar Ramachandra via lldb-dev lldb-dev at lists.llvm.org
Sat Aug 22 11:58:20 PDT 2015


My script is simple enough:

import lldb

def pp(debugger, command, result, internal_dict):
    target = debugger.GetSelectedTarget()
    process = target.GetProcess()
    thread = process.GetSelectedThread()
    frame = thread.GetSelectedFrame()
    res = frame.EvaluateExpression("%s->dump()" % command)
    print >>result, res

def __lldb_init_module(debugger, internal_dict):
    debugger.HandleCommand('command script add -f llvm_pp.pp pp')
    print "Command pp installed"

However, when I execute it:

(lldb) pp Ty
Fn(Void -> Int)*
 = <unknown error>

When I use res.GetSummary() in place of res, I get "None" instead of
the error. What is this trailing data anyway, and how do I get rid of



More information about the lldb-dev mailing list