[lldb-dev] FW: Search C++ "virtual" objects

2016-08-12 Thread Lei Kong via lldb-dev
On Linux, given a core dump file, an executable and its symbols, is it possible to do the following in LLDB (maybe with a LLDB extension)? 1. Get the list of all C++ virtual types (classes with virtual function table) 2. Search the whole address space to find all instances of such objects? (false

Re: [lldb-dev] Search C++ "virtual" objects

2016-08-15 Thread Lei Kong via lldb-dev
lvm.org> Subject: Re: [lldb-dev] Search C++ "virtual" objects > On Aug 12, 2016, at 4:55 PM, Lei Kong via lldb-dev > wrote: > > On Linux, given a core dump file, an executable and its symbols, is it > possible to do the following in LLDB (maybe with a LLDB ext

Re: [lldb-dev] Search C++ "virtual" objects

2016-08-15 Thread Lei Kong via lldb-dev
Should I use lldb::SBTarget::GetModuleAtIndex() to get all modules and then lldb::SBModule::GetSymbolAtIndex() to go through all symbols? Thanks. Sent from Mail<https://go.microsoft.com/fwlink/?LinkId=550986> for Windows 10 From: Lei Kong via lldb-dev<mailto:lldb-dev@lists.llvm.

Re: [lldb-dev] Search C++ "virtual" objects

2016-08-17 Thread Lei Kong via lldb-dev
m> Cc: Lei Kong via lldb-dev<mailto:lldb-dev@lists.llvm.org> Subject: Re: [lldb-dev] Search C++ "virtual" objects > On Aug 15, 2016, at 4:59 PM, Lei Kong wrote: > > Should I use lldb::SBTarget::GetModuleAtIndex() to get all modules and then > lldb::SBModule

[lldb-dev] lldb type summary provider - SBProcess is invalid

2016-09-13 Thread Lei Kong via lldb-dev
I wrote a lldb type summary provider for wstring with 16bit wchar on Ubuntu 16.04.Things work fine if I manually do the following in lldb:(lldb) script import mytypes (lldb) type summary add -F mytypes.wstring_SummaryProvider "std::__1::wstring" I tried to make things easier with auto-loading by

Re: [lldb-dev] lldb type summary provider - SBProcess is invalid

2016-09-13 Thread Lei Kong via lldb-dev
; Sent: Tuesday, September 13, 2016 10:31 AM To: Lei Kong<mailto:leik...@msn.com> Cc: lldb-dev@lists.llvm.org<mailto:lldb-dev@lists.llvm.org> Subject: Re: [lldb-dev] lldb type summary provider - SBProcess is invalid > On Sep 13, 2016, at 10:02 AM, Lei Kong via lldb-dev > wrote:

Re: [lldb-dev] lldb type summary provider - SBProcess is invalid

2016-09-14 Thread Lei Kong via lldb-dev
gt; Date: Wed, 14 Sep 2016 09:33:20 -0700 > CC: egran...@apple.com; lldb-dev@lists.llvm.org > To: leik...@msn.com > > > > On Sep 13, 2016, at 9:50 PM, Lei Kong via lldb-dev > > wrote: > > > > Thanks! > > SBValue.process works! > > > >

[lldb-dev] OverflowError: in method 'SBProcess_ReadPointerFromMemory', argument 2 of type 'lldb::addr_t'

2016-09-16 Thread Lei Kong via lldb-dev
I ran into the error in the subject when running a python script with "script myfile.myscript()". The value addr_t parameter used is 0x01223f68, the following works fine: (lldb) scr Python Interactive Interpreter. To exit, type 'quit()', 'exit()' or Ctrl-D. >>> e = lldb.SBError() >>> pt

Re: [lldb-dev] OverflowError: in method 'SBProcess_ReadPointerFromMemory', argument 2 of type 'lldb::addr_t'

2016-09-16 Thread Lei Kong via lldb-dev
gument 2 of type 'lldb::addr_t' > From: jing...@apple.com > Date: Fri, 16 Sep 2016 17:12:24 -0700 > CC: lldb-dev@lists.llvm.org > To: leik...@msn.com > > You passed an error into ReadPointerFromMemory. In the cases where you > aren't getting what you expect, wh

Re: [lldb-dev] OverflowError: in method 'SBProcess_ReadPointerFromMemory', argument 2 of type 'lldb::addr_t'

2016-09-19 Thread Lei Kong via lldb-dev
rinting the type of the value you are passing in the line: vtableEndAddr = lldb.process.ReadPointerFromMemory(vtableAddr-8, error) print type(vtableAddr) print type(vtableAddr-8) It seems like it thinks vtableAddr doesn't fit into a lldb::addr_t which is a uint64_t > On Sep 16, 2016,

Re: [lldb-dev] OverflowError: in method 'SBProcess_ReadPointerFromMemory', argument 2 of type 'lldb::addr_t'

2016-09-19 Thread Lei Kong via lldb-dev
ject: Re: [lldb-dev] OverflowError: in method >> 'SBProcess_ReadPointerFromMemory', argument 2 of type 'lldb::addr_t' >> >> Try printing the type of the value you are passing in the line: >> >>vtableEndAddr = lldb.process.ReadPointerFromMemory