[lldb-dev] Why SBValue::Cast is deprecated and how to replace it with expression?

2017-01-29 Thread Roman Popov via lldb-dev
Hello, SBValue::Cast marked as deprecated in LLDB headers: // Deprecated - use the expression evaluator to perform type casting lldb::SBValue Cast(lldb::SBType type); But I can't understand how to replace it with expression evaluation. Suppose I have: auto casted_val = my_value.Cast(my_type);

[lldb-dev] RTTI does not work stable in LLDB.

2017-02-05 Thread Roman Popov via lldb-dev
Hello, I'm observing very strange LLDB behavior: it does not always shows a correct dynamic type when I ask for. Originally I was working with LLDB 3.9, but it looks like trunk version behaves the same strange way. I was able to capture this behavior in a small code snippet: #include #include

Re: [lldb-dev] RTTI does not work stable in LLDB.

2017-02-06 Thread Roman Popov via lldb-dev
X. > > Greg Clayton > > On Feb 5, 2017, at 1:19 PM, Roman Popov via lldb-dev < > lldb-dev@lists.llvm.org> wrote: > > Hello, > I'm observing very strange LLDB behavior: it does not always shows a > correct dynamic type when I ask for. > > Originally I was

Re: [lldb-dev] RTTI does not work stable in LLDB.

2017-02-06 Thread Roman Popov via lldb-dev
looking at this now. I will let you know what I find. > > > > Greg > > > > On Feb 6, 2017, at 10:00 AM, Roman Popov wrote: > > > > Yes, that was my thought. > > > > FYI, checked in GDB: it's working correctly on this testcase showing >

Re: [lldb-dev] RTTI does not work stable in LLDB.

2017-02-06 Thread Roman Popov via lldb-dev
Hello, I just found out that sometimes I don't get correct dynamic type in LLDB even if I compile with g++. How can I get typeinfo/vtable dump from LLDB to check if it is still the same name matching issue? 2017-02-06 17:04 GMT-08:00 Robinson, Paul via lldb-dev < lldb-dev@lists.llvm.org>: > Yes,

Re: [lldb-dev] RTTI does not work stable in LLDB.

2017-02-10 Thread Roman Popov via lldb-dev
Thanks Greg, So here is another case when LLDB fails to resolve dynamic type. Compiled with G++5.4 on Ubuntu 16.04. Here I want to get dynamic type for some variable apb_memories (lldb) expr -d no-run -- apb_memories (sc_core::sc_object *) $3 = 0x00cb6aa8 (lldb) memory read --format a

Re: [lldb-dev] RTTI does not work stable in LLDB.

2017-02-10 Thread Roman Popov via lldb-dev
Yes, you're right. When I replaced unsigned with signed int it works properly. 2017-02-10 19:46 GMT+03:00 Greg Clayton : > > On Feb 10, 2017, at 12:55 AM, Roman Popov wrote: > > Thanks Greg, > > So here is another case when LLDB fails to resolve dynamic type. Compiled > with G++5.4 on Ubuntu 16

[lldb-dev] Python example does not work with latest LLDBs

2017-02-11 Thread Roman Popov via lldb-dev
I'm testing example from https://lldb.llvm.org/python-reference.html (USING THE LLDB.PY MODULE IN PYTHON) on Ubuntu 16.04 For some reason it works only with LLDB 3.9, is it because LLDB 4.0/5.0 are not stable yet? #5.0 -- Does not work deb http://apt.llvm.org/xenial/ llvm-toolchain-xenial mai

Re: [lldb-dev] Breakpoint + callback performance ... Can it be faster?

2017-02-12 Thread Roman Popov via lldb-dev
Hello Benjamin , all >>I recently started using lldb to write a basic instrumentation tool for >>tracking the values of variables at various code-points in a program. I have the same problem of tracing some variables and debugging application post-mortem. Without knowing about your experience I'v

Re: [lldb-dev] Breakpoint + callback performance ... Can it be faster?

2017-02-13 Thread Roman Popov via lldb-dev
hing that would automatically intercept some function to execute > your code while the process is running (some kind of dynamic > instrumentation), then the answer is no. (But I don't see any mention > of that on the gdb page you quoted either). > > cheers, > pavel >

Re: [lldb-dev] Breakpoint + callback performance ... Can it be faster?

2017-02-13 Thread Roman Popov via lldb-dev
t; including declaring variables/types: > >> (lldb) expr -- char s[]="qwerty"; for(int i=0; i < sizeof s; ++i) > >> printf("%d: %c\n", i, s[i]); > >> 0: q > >> 1: w > >> 2: e > >> 3: r > >> 4: t > >> 5:

Re: [lldb-dev] Breakpoint + callback performance ... Can it be faster?

2017-02-13 Thread Roman Popov via lldb-dev
>> >>str[2] = 0; > >> >>msg = str; > >> >>end > >> > (gdb) c > >> > Continuing. > >> > T > >> > > >> > T > >> > > >> > T > >> > > >> > T >

Re: [lldb-dev] Python example does not work with latest LLDBs

2017-02-13 Thread Roman Popov via lldb-dev
ve a symbol, print some info for the > symbol > print symbol > > > We set the async mode to false, so target.LaunchSimple() should not return > until the process is stopped or exited. Note in your example it is > returning with "state = launchin

Re: [lldb-dev] Python example does not work with latest LLDBs

2017-02-13 Thread Roman Popov via lldb-dev
we have a symbol in the symbol table for >> where we stopped >> symbol = frame.GetSymbol(); >> if symbol: >> # We do have a symbol, print some info for the >> symbol >>

Re: [lldb-dev] Python example does not work with latest LLDBs

2017-02-13 Thread Roman Popov via lldb-dev
;>> # Now get all instructions for this function and >>> print them >>> insts = function.GetInstructions(target) >>> disassemble_instructions (insts) >>> else: >

Re: [lldb-dev] Breakpoint + callback performance ... Can it be faster?

2017-02-13 Thread Roman Popov via lldb-dev
27; will persist beyond > that expression and be available for future expressions. > - Any type returned as the result type of an expression will have its type > available > > Greg > > On Feb 13, 2017, at 6:00 AM, Roman Popov via lldb-dev < > lldb-dev@lists.llvm.org> wro