lldb type summary provider - SBProcess is invalid -


i wrote lldb type summary provider wstring 16bit wchar on ubuntu 16.04.

things work fine if manually following in lldb:

(lldb) script import mytypes (lldb) type summary add -f mytypes.wstring_summaryprovider "std::__1::wstring" 

i tried make things easier auto-loading adding following .lldbinit:

script import mytypes type summary add -f mytypes.wstring_summaryprovider "std::__1::wstring" 

then got failure of "sbprocess invalid" when printing wstring variable.

my type summary function has following, believe error encountered:

content = lldb.process.readmemory(bufferaddr, bytecount, error) 

maybe because "process" not assigned yet when type summary added during auto-loading?

does know how make auto loading work script?

thanks much

enrico answered on lldb-dev:

http://lists.llvm.org/pipermail/lldb-dev/2016-september/011236.html

but following along here:

the lldb.process, lldb.thread etc variables meant convenience use in interactive python interpreter, , not python code gets run breakpoints, data formatters, commands, etc.

it doesn't make sense in multi-threaded debugger try present global notion of "current thread" bits of script code might run. instead, each context in script gets run knows process/thread/frame relevant it. in case of data formatters, passed value working on, , knows relevant process through sbvalue.getprocess() api.


Comments

Popular posts from this blog

javascript - Thinglink image not visible until browser resize -

firebird - Error "invalid transaction handle (expecting explicit transaction start)" executing script from Delphi -

mongodb - How to keep track of users making Stripe Payments -