[lldb-dev] running lldb-mi with LLDB_DISABLE_PYTHON

2016-09-20 Thread Chunseok Lee via lldb-dev
Dear lldb dev team,

I am working on running lldb-mi on arm32 device(like rpi) for remote
debugging usage.
Is there any way to run lldb-mi with python disabled ?
When building lldb with LLDB_DISABLE_PYTHON, it seems that dataformatter
initialization is failed due to the following code in
MICmnLLDBDebugger.cpp:59

//++
//
// MI summary helper routines
static inline bool MI_add_summary(lldb::SBTypeCategory category,
  const char *typeName,
  lldb::SBTypeSummary::FormatCallback cb,
  uint32_t options, bool regex = false) {
#if defined(LLDB_DISABLE_PYTHON)
  return false;
#else
  lldb::SBTypeSummary summary =
  lldb::SBTypeSummary::CreateWithCallback(cb, options);
  return summary.IsValid()
 ? category.AddTypeSummary(
   lldb::SBTypeNameSpecifier(typeName, regex), summary)
 : false;
#endif
}

Thank you.

BR,
Chunseok Lee

-- 
Where Do We come from? What Are We? Where Are We Going?
___
lldb-dev mailing list
lldb-dev@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-dev


Re: [lldb-dev] running lldb-mi with LLDB_DISABLE_PYTHON

2016-09-20 Thread Chunseok Lee via lldb-dev
Do you have any idea about regression after applying workaround 1 ? (For
example, wrong output in some cases)


2016-09-20 21:37 GMT+09:00 Ilia K :

> Hi!
>
> Please see possible workarounds in https://llvm.org/bugs/show_
> bug.cgi?id=28253.
>
> On Tue, Sep 20, 2016 at 10:57 AM, Chunseok Lee via lldb-dev <
> lldb-dev@lists.llvm.org> wrote:
>
>> Dear lldb dev team,
>>
>> I am working on running lldb-mi on arm32 device(like rpi) for remote
>> debugging usage.
>> Is there any way to run lldb-mi with python disabled ?
>> When building lldb with LLDB_DISABLE_PYTHON, it seems that dataformatter
>> initialization is failed due to the following code in
>> MICmnLLDBDebugger.cpp:59
>>
>> //++
>> //--
>> --
>> // MI summary helper routines
>> static inline bool MI_add_summary(lldb::SBTypeCategory category,
>>   const char *typeName,
>>   lldb::SBTypeSummary::FormatCallback cb,
>>   uint32_t options, bool regex = false) {
>> #if defined(LLDB_DISABLE_PYTHON)
>>   return false;
>> #else
>>   lldb::SBTypeSummary summary =
>>   lldb::SBTypeSummary::CreateWithCallback(cb, options);
>>   return summary.IsValid()
>>  ? category.AddTypeSummary(
>>lldb::SBTypeNameSpecifier(typeName, regex), summary)
>>  : false;
>> #endif
>> }
>>
>> Thank you.
>>
>> BR,
>> Chunseok Lee
>>
>> --
>> Where Do We come from? What Are We? Where Are We Going?
>>
>> ___
>> lldb-dev mailing list
>> lldb-dev@lists.llvm.org
>> http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-dev
>>
>>
>
>
> --
> - Ilia
>



-- 
Where Do We come from? What Are We? Where Are We Going?
___
lldb-dev mailing list
lldb-dev@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-dev


Re: [lldb-dev] running lldb-mi with LLDB_DISABLE_PYTHON

2016-09-21 Thread Chunseok Lee via lldb-dev
oh, I just asked whether there is a poosibility of such regression since 
original code (before workaround 1) seems not allow to use lldm-mi without 
python support. 


2016. 9. 21. 오후 10:44 Abid, Hafiz  작성:

> Please provide a little bit more details about the problem. Which command is 
> giving the wrong output?
>  
> Regards,
> Abid
>  
> From: lldb-dev [mailto:lldb-dev-boun...@lists.llvm.org] On Behalf Of Chunseok 
> Lee via lldb-dev
> Sent: 21 September 2016 03:15
> To: Ilia K
> Cc: lldb-dev@lists.llvm.org
> Subject: Re: [lldb-dev] running lldb-mi with LLDB_DISABLE_PYTHON
>  
> Do you have any idea about regression after applying workaround 1 ? (For 
> example, wrong output in some cases)
> 
>  
> 2016-09-20 21:37 GMT+09:00 Ilia K :
> Hi!
>  
> Please see possible workarounds in 
> https://llvm.org/bugs/show_bug.cgi?id=28253.
>  
> On Tue, Sep 20, 2016 at 10:57 AM, Chunseok Lee via lldb-dev 
>  wrote:
> Dear lldb dev team,
> 
> I am working on running lldb-mi on arm32 device(like rpi) for remote 
> debugging usage.
> Is there any way to run lldb-mi with python disabled ?
> When building lldb with LLDB_DISABLE_PYTHON, it seems that dataformatter 
> initialization is failed due to the following code in 
> MICmnLLDBDebugger.cpp:59   
> 
> //++
> //
> // MI summary helper routines
> static inline bool MI_add_summary(lldb::SBTypeCategory category,
>   const char *typeName,
>   lldb::SBTypeSummary::FormatCallback cb,
>   uint32_t options, bool regex = false) {
> #if defined(LLDB_DISABLE_PYTHON)
>   return false;
> #else
>   lldb::SBTypeSummary summary =
>   lldb::SBTypeSummary::CreateWithCallback(cb, options);
>   return summary.IsValid()
>  ? category.AddTypeSummary(
>lldb::SBTypeNameSpecifier(typeName, regex), summary)
>  : false;
> #endif
> }
> 
> Thank you.
> 
> BR,
> Chunseok Lee
> 
> --
> Where Do We come from? What Are We? Where Are We Going?
>  
> ___
> lldb-dev mailing list
> lldb-dev@lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-dev
> 
> 
> 
>  
> --
> - Ilia
> 
> 
> 
> --
> Where Do We come from? What Are We? Where Are We Going?
___
lldb-dev mailing list
lldb-dev@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-dev


[lldb-dev] lldb-3.8.1 prebuilt binary for windows7

2016-09-21 Thread Chunseok Lee via lldb-dev
Is there any prebuilt lldb binary for windows7?
I tried snapshot llvm binary 3.8, but it does not include lldb. Note that 
latest prebuilt(4.0) contains lldb. 

나의 iPhone에서 보냄
___
lldb-dev mailing list
lldb-dev@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-dev


Re: [lldb-dev] lldb-3.8.1 prebuilt binary for windows7

2016-09-21 Thread Chunseok Lee via lldb-dev
Actually, I am trying to remote-debug from lldb(win host) to 
lldb-server(arm/x64 linux). In my case, The problem is that no lldb-sever-4.0 
is available(I only have lldb-server 3.8 for arm/x64 linux). 
Q) lldb 4.0 and lldb-server 3.8 are compatible each other?
Thank you

나의 iPhone에서 보냄

2016. 9. 22. 오후 12:23 Zachary Turner  작성:

> Does the 4.0 binary not work for you?  It is the first release that contains 
> prebuilt lldb binary.  Probably you are one of the first people to test it, 
> so if you encounter problems, let me know what they are.
> 
> The version of windows shouldn't matter as long as you are Win7 or higher.  
> No vista.
> 
>> On Wed, Sep 21, 2016 at 8:22 PM Chunseok Lee via lldb-dev 
>>  wrote:
>> Is there any prebuilt lldb binary for windows7?
>> I tried snapshot llvm binary 3.8, but it does not include lldb. Note that 
>> latest prebuilt(4.0) contains lldb.
>> 
>> 나의 iPhone에서 보냄
>> ___
>> lldb-dev mailing list
>> lldb-dev@lists.llvm.org
>> http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-dev
___
lldb-dev mailing list
lldb-dev@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-dev


Re: [lldb-dev] lldb-3.8.1 prebuilt binary for windows7

2016-09-22 Thread Chunseok Lee via lldb-dev
Thank you for kind help. 
It seems to work nicely(from lldb4.0(win) to lldbserver3.8) for me. 

나의 iPhone에서 보냄

2016. 9. 22. 오후 7:45 Pavel Labath  작성:

> On 22 September 2016 at 04:51, Chunseok Lee via lldb-dev
>  wrote:
>> Actually, I am trying to remote-debug from lldb(win host) to
>> lldb-server(arm/x64 linux). In my case, The problem is that no
>> lldb-sever-4.0 is available(I only have lldb-server 3.8 for arm/x64 linux).
>> Q) lldb 4.0 and lldb-server 3.8 are compatible each other?
> 
> The gdb-remote protocol is generally backward-compatible, but this
> isn't a configuration that we are explicitly testing. I think there is
> a good chance that it will work, but if it doesn't you're on your own.
> :)
> 
> pl
___
lldb-dev mailing list
lldb-dev@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-dev


[lldb-dev] MI command for connecting remote target

2016-09-22 Thread Chunseok Lee via lldb-dev
Is there any MI command for connecting remote target ?

Using platform and target command with lldb, It works fine as follows:

-host log--
twoflower@js1-desktop ~/local-hello> ls
a.out*  hello.cpp
twoflower@js1-desktop ~/local-hello> lldb-3.8.1
(lldb) platform select remote-linux
  Platform: remote-linux
 Connected: no
(lldb) platform connect connect://10.113.62.251:1234
  Platform: remote-linux
Triple: x86_64-*-linux-gnu
OS Version: 3.19.0 (3.19.0-32-generic)
Kernel: #37~14.04.1-Ubuntu SMP Thu Oct 22 09:41:40 UTC 2015
  Hostname: twoflower
 Connected: yes
WorkingDir: /home/twoflower/remote-hello
(lldb) target create -r /home/twoflower/remote-hello/a.out a.out
Current executable set to 'a.out' (x86_64).
(lldb) b main
Breakpoint 1: where = a.out`main, address = 0x0040052d
(lldb) r
Process 14524 launched:
'/home/twoflower/.lldb/module_cache/remote-linux/.cache/BB42308F-4677-5DC0-AFC2-097CDFE91A83-3612C4F8/a.out'
(x86_64)
Process 14524 stopped
* thread #1: tid = 14524, 0x0040052d a.out`main, name = 'a.out',
stop reason = breakpoint 1.1
frame #0: 0x0040052d a.out`main
a.out`main:
->  0x40052d <+0>: pushq  %rbp
0x40052e <+1>: movq   %rsp, %rbp
0x400531 <+4>: movl   $0x4005d4, %edi   ; imm = 0x4005D4
0x400536 <+9>: movl   $0x0, %eax
(lldb) c
Process 14524 resuming
Process 14524 exited with status = 0 (0x)
(lldb) q
twoflower@js1-desktop ~/local-hello>

--remote log ---
twoflower@twoflower ~/remote-hello> ls
a.out*  hello.cpp
twoflower@twoflower ~/remote-hello> lldb-server-3.8 p --listen "*:1234"
Connection established.
error: lost connection
lldb-server exiting...

--

However, when I try the same thing with lldb-mi, I cannot connect to remote
target as follows:

--- host log 
twoflower@js1-desktop ~/local-hello> lldb-mi-3.8.1
(gdb)
-target-select remote 10.113.62.251:1234
^error,msg="Command 'target-select'. Current SBTarget is invalid"
(gdb)

--  remote log --
twoflower@twoflower ~/remote-hello> lldb-server-3.8 p --listen "*:1234"

The remote side seems not to receive any msg at all.
I am not sure that it is proper use for -target-select command.

BR,
Chunseok Lee

-- 
Where Do We come from? What Are We? Where Are We Going?
___
lldb-dev mailing list
lldb-dev@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-dev


[lldb-dev] lldb-mi stopped after '-target-select remote'

2016-10-18 Thread Chunseok Lee via lldb-dev
I have noticed that lldb-mi stopped after executing "-target-select remote".
My execution step is like:
-
$ lldb-server g --platform=remote-linux "*:1234"

$ lldb-mi
(gdb)
-file-exec-and-symbols /home/twoflower/a.out
(gdb)
-target-select remote localhost:1234
.
(gdb)
*stopped,reason="signal-received",signal-name="SIGSTOP",signal-meaning="Stop",frame={level="0",addr="0x7f4bdf53e2d0",func="??",file="??",fullname="??",line="-1"},thread-id="1",stopped-threads="all"
-

In my project, I dont want to stop there.
Where is a good point to investigate the code triggering SIGSTOP ?


BR,
Chunseok Lee

-- 
Where Do We come from? What Are We? Where Are We Going?
___
lldb-dev mailing list
lldb-dev@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-dev


[lldb-dev] process launch fail with msg "not contain any host architecture"

2017-03-22 Thread Chunseok Lee via lldb-dev
Hello.

I am working on running lldb-server on tizen x86 emulator platform.
I got the following error when I start to run lldb with any binary.
Here is an example log :
---
sh-3.2# file lldb-server-3.8.1
lldb-server-3.8.1: ELF 32-bit LSB executable, Intel 80386, version 1
(GNU/Linux), dynamically linked, interpreter /lib/ld-linux.so.2, for
GNU/Linux 2.6.32, BuildID[sha1]=7e396312e789fa54c0d33cccd7c6cf3e402fb1cf,
stripped
sh-3.2# file /bin/sleep
/bin/sleep: ELF 32-bit LSB shared object, Intel 80386, version 1 (SYSV),
dynamically linked, interpreter /lib/ld-linux.so.2, for GNU/Linux 2.6.32,
BuildID[sha1]=58dbc7ded306d9c33cc7ae83033b90ec2d8628d7, stripped
sh-3.2# uname -a
Linux localhost 4.4.35 #1 SMP PREEMPT Wed Jan 18 19:39:39 KST 2017 i686
GNU/Linux
sh-3.2# ./lldb-server-3.8.1 g --platform=host *:12345 -- /bin/sleep
using platform: host
LaunchProcess: failed to launch executable /bin/sleeperror: failed to
launch '/bin/sleep': '/bin/sleep' doesn't contain any 'host' platform
architectures: i686
--
While /bin/sleep is 80386(i386) type, host has i686 architecture. IMHO,
i386 seems to be  compatible to i686.
Please let me know any information about this issue.

Thank you.

BR,
Chunseok Lee


-- 
Where Do We come from? What Are We? Where Are We Going?
___
lldb-dev mailing list
lldb-dev@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-dev


[lldb-dev] lldb command like gdb's "set auto-solib-add off"

2017-05-22 Thread Chunseok Lee via lldb-dev
Hello. 

In gdb, I can toggle auto symbol loading using "set auto-solib-add off" command.
I wonder that lldb has similar command for disabling auto shared library symbol 
loading? 
If not, where is the good starting point to review the source code to implement 
this feature?

BR,
Chunseok Lee___
lldb-dev mailing list
lldb-dev@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-dev


Re: [lldb-dev] lldb command like gdb's "set auto-solib-add off"

2017-05-22 Thread Chunseok Lee via lldb-dev


Thank you for your help. 
It would be really helpful to me. 

The reason behind the question is exactly what you mentioned. I am wokring on 
debugging in devices and it seems that shared library loading(I do not know 
lldb loads symbols lazyly) runs very slowly since my testing program depends on 
so many shared libs.  since I am debuggging with gdbjit feature, I do not need 
shared library loading except one shared lib(which contains 
__jit_debug_register_code symbol)
Thus, I want to turn off shred lib loading except one shared lib. Is it 
possible?

Thank you. 

BR,
Chunseok Lee



2017. 5. 23. 오전 3:24 Jim Ingham  작성:

> We designed lldb to be as lazy as possible in loading symbol information from 
> the shared libraries as they get loaded.  If this is causing you problems, 
> the first thing to do is to figure out why lldb is pulling in more 
> information than you need.  For instance, it looks like on Linux the gdb JIT 
> loading breakpoint is getting set with a global search which is pulling in 
> all the symbols from all the initially loaded shared libraries.  It would be 
> better to fix things so that only explicit user actions (which can be scoped 
> to shared libraries to limit the search) pull in symbols so we don't have to 
> fiddle around with turning off and on the loading of shared libraries.  Back 
> when we were supporting gdb for MacOS I did a lot of work to try to get this 
> right (there are times you really need the shared library info - e.g. when 
> something shows up in a backtrace) so you have to judiciously re-introduce 
> symbols, or the user experience is noticeably degraded.
> 
> It also depends on how far you want to go turning this off.  There's "don't 
> look at shared libraries at all" which is what the auto-solib-add variable 
> does IIRC.  We also had a fairly extensive mechanism to specify "load-levels" 
> for various libraries, which  was more user-friendly but much more work to 
> support.  Anyway, it would be easy to just turn this shared library 
> notifications - just don't set the dyld load notification breakpoint.  That 
> would be the easy part.  But as I said above, you're also going to have to 
> make sure you turn it back on for users when some action they request 
> requires it.
> 
> Note, there is a setting to determine how much symbol information to read in 
> from libraries loaded from memory (since in device debugging this can be 
> quite slow.)  That is the target.memory-module-load-level setting.  You might 
> look at that for some hints as to how to proceed.
> 
> Jim
> 
>> On May 22, 2017, at 8:02 AM, Chunseok Lee via lldb-dev 
>>  wrote:
>> 
>> Hello. 
>> 
>> In gdb, I can toggle auto symbol loading using "set auto-solib-add off" 
>> command.
>> I wonder that lldb has similar command for disabling auto shared library 
>> symbol loading? 
>> If not, where is the good starting point to review the source code to 
>> implement this feature?
>> 
>> BR,
>> Chunseok Lee
>> ___
>> lldb-dev mailing list
>> lldb-dev@lists.llvm.org
>> http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-dev
> 
___
lldb-dev mailing list
lldb-dev@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-dev


[lldb-dev] Core file on arm32

2017-06-27 Thread Chunseok Lee via lldb-dev
Hello,

I am running lldb-3.8 on rpi2.
When I load coredump file, lldb exited with seg fault.
After digging into this issue, I found that loading core file for 32bit arch 
does not work well.
Last commit for 32bit arch corefile is 

" From 109a39c9709dbc2bd689469f1ba15efee098ee41 Mon Sep 17 00:00:00 2001
From: Dimitar Vlahovski 
Date: Fri, 29 Jul 2016 13:18:09 +
Subject: [PATCH] Add/fix support for i386 elf core files"

Here, it seems that arm32 support is still missing in relase 4.0 branch.

Is there any plan to support coredump on arm32 ? or am I missing something ?

BR,
Chunseok Lee


___
lldb-dev mailing list
lldb-dev@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-dev


[lldb-dev] Disable shared lib loading

2017-07-28 Thread Chunseok Lee via lldb-dev
Hello

I am debugging an program which depends a huge set of shared libs. For 
performance i like to skip shlib load on lldb if possible. 
Is there any way to do it?

BR,
Lee

나의 iPhone에서 보냄
___
lldb-dev mailing list
lldb-dev@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-dev