[lldb-dev] get function name from dwarf info

2016-10-07 Thread Carlo Kok via lldb-dev

Hi,

I have a piece of debuginfo containing this subfunction :

DW_TAG_subprogram [6] *
  DW_AT_low_pc [DW_FORM_addr]   (0x00437020)
  DW_AT_high_pc [DW_FORM_data4] (0x001e)
  DW_AT_frame_base [DW_FORM_exprloc](<0x1> 55 )
  DW_AT_linkage_name [DW_FORM_strp] ( .debug_str[0x00ae] = 
"mi_t11_issudebugtest.ABC2_AA")

  DW_AT_name [DW_FORM_strp] ( .debug_str[0x00cb] = "AA")
  DW_AT_decl_line [DW_FORM_data1]   (16)
DW_AT_external [DW_FORM_flag_present] (true)


It's part (a member) of this type:
DW_TAG_structure_type [2] *
  DW_AT_name [DW_FORM_strp] ( .debug_str[0x0065] = "issudebugtest.ABC")
 DW_AT_byte_size [DW_FORM_data1] (0x08)

How do I get the dw_at_name field? I don't need lldb to decypher the 
mangling I use, I just want access to the linkage name and real encoded 
name?


Also how do I get the type this is contained in (presuming there is one 
ofc)?


Lastly: How do I encode if a method is static or not, I couldn't find 
any difference in what C++ does for instance vs static.


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


Re: [lldb-dev] get function name from dwarf info

2016-10-07 Thread Abid, Hafiz via lldb-dev


> -Original Message-
> From: lldb-dev [mailto:lldb-dev-boun...@lists.llvm.org] On Behalf Of Carlo
> Kok via lldb-dev
> Sent: 07 October 2016 14:29
> To: lldb-dev@lists.llvm.org
> Subject: [lldb-dev] get function name from dwarf info
> 
> Hi,
> 
> I have a piece of debuginfo containing this subfunction :
> 
> DW_TAG_subprogram [6] *
>DW_AT_low_pc [DW_FORM_addr]   (0x00437020)
>DW_AT_high_pc [DW_FORM_data4] (0x001e)
>DW_AT_frame_base [DW_FORM_exprloc](<0x1> 55 )
>DW_AT_linkage_name [DW_FORM_strp] ( .debug_str[0x00ae] =
> "mi_t11_issudebugtest.ABC2_AA")
>DW_AT_name [DW_FORM_strp] ( .debug_str[0x00cb] = "AA")
>DW_AT_decl_line [DW_FORM_data1]   (16)
> DW_AT_external [DW_FORM_flag_present] (true)
> 
> 
> It's part (a member) of this type:
> DW_TAG_structure_type [2] *
>DW_AT_name [DW_FORM_strp] ( .debug_str[0x0065] =
> "issudebugtest.ABC")
>   DW_AT_byte_size [DW_FORM_data1] (0x08)
> 
> How do I get the dw_at_name field? I don't need lldb to decypher the
> mangling I use, I just want access to the linkage name and real encoded
> name?
> 
> Also how do I get the type this is contained in (presuming there is one
> ofc)?
I am not sure what you are trying to do. Can you elaborate a little.

> 
> Lastly: How do I encode if a method is static or not, I couldn't find
> any difference in what C++ does for instance vs static.

There is  "DW_AT_object_pointer". Debuggers can also make that decision
based on presence of "this" parameter.
 
Regards,
Abid

> 
> --
> Carlo Kok
> RemObjects Software
> ___
> 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] get function name from dwarf info

2016-10-07 Thread Carlo Kok via lldb-dev



How do I get the dw_at_name field? I don't need lldb to decypher the
mangling I use, I just want access to the linkage name and real encoded
name?

Also how do I get the type this is contained in (presuming there is one
ofc)?

I am not sure what you are trying to do. Can you elaborate a little.


I have a custom language where it's ~ equivalent to the c++ class:

class TEST{
private:
int INSTANCEFIELD;
static int STATICFIELD;
public:
void INSTANCEMETHOD() {
INSTANCEFIELD++;
}
static void STATICMETHOD() {
STATICFIELD++;
}
};

the name "STATICMETHOD" is properly encoded in the dwarf debug info 
(where linkage name is the mangled name). I want "STATICMETHOD" back as 
it would be encoded in DW_AT_NAME.


I also want to get the SBType for "TEST" when I have the SBFunction for 
INSTANCEMETHOD/STATICMETHOD.


Both things are properly encoded in dwarf (as matching the c++ output), 
however I can't seem to find the right SB method to get it.







Lastly: How do I encode if a method is static or not, I couldn't find
any difference in what C++ does for instance vs static.


There is  "DW_AT_object_pointer". Debuggers can also make that decision
based on presence of "this" parameter.



Thanks.

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


Re: [lldb-dev] Connecting to lldb-rpc-server

2016-10-07 Thread Kate Stone via lldb-dev
The RPC mechanism used in Xcode 8 is not a part of the open source LLDB project 
and should be treated as an implementation detail of Xcode.  What are you 
trying to accomplish?

Kate Stone k8st...@apple.com 
 Xcode Low Level Tools

> On Oct 6, 2016, at 6:11 PM, Rex Fenley via lldb-dev  
> wrote:
> 
> Hi! I'm trying to connect to Xcode's lldb rpc server but I'm having trouble.
> 
> This doesn't seem to work to list the hosts.
> rpcinfo -p lldb-rpc-server
> 
> Can't contact rpcbind on lldb-rpc-server
> 
> 
> rpcinfo: RPC: Unknown host
> 
> Am I doing this correctly?
> 
> -- 
> Rex Fenley  |  IOS DEVELOPER
> 
> 
> Remind.com  |  BLOG   |  
> FOLLOW US   |  LIKE US 
> ___
> 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] Connecting to lldb-rpc-server

2016-10-07 Thread Rex Fenley via lldb-dev
Hi Kate,

I'm trying to connect to the running instance of lldb in Xcode to send
commands to it from a different process :)

On Fri, Oct 7, 2016 at 10:27 AM, Kate Stone  wrote:

> The RPC mechanism used in Xcode 8 is not a part of the open source LLDB
> project and should be treated as an implementation detail of Xcode.  What
> are you trying to accomplish?
>
> Kate Stone k8st...@apple.com
>  Xcode Low Level Tools
>
> On Oct 6, 2016, at 6:11 PM, Rex Fenley via lldb-dev <
> lldb-dev@lists.llvm.org> wrote:
>
> Hi! I'm trying to connect to Xcode's lldb rpc server but I'm having
> trouble.
>
> This doesn't seem to work to list the hosts.
>
> rpcinfo -p lldb-rpc-server
>
> Can't contact rpcbind on lldb-rpc-server
>
> rpcinfo: RPC: Unknown host
>
> Am I doing this correctly?
>
> --
> Rex Fenley  |  IOS DEVELOPER
>
> Remind.com  |  BLOG   |
>  FOLLOW US   |  LIKE US
> 
> ___
> lldb-dev mailing list
> lldb-dev@lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-dev
>
>
>


-- 

Rex Fenley  |  IOS DEVELOPER

Remind.com  |  BLOG 
 |  FOLLOW
US   |  LIKE US

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


Re: [lldb-dev] Connecting to lldb-rpc-server

2016-10-07 Thread Enrico Granata via lldb-dev
I am gonna echo Kate's question, but delve one level deeper

Why do you want to send commands to LLDB from a different process?

We have a bunch of different extension points in LLDB, so it's possible that 
what you're trying to do is actually already possible

> On Oct 7, 2016, at 10:41 AM, Rex Fenley via lldb-dev 
>  wrote:
> 
> Hi Kate,
> 
> I'm trying to connect to the running instance of lldb in Xcode to send 
> commands to it from a different process :)
> 
> On Fri, Oct 7, 2016 at 10:27 AM, Kate Stone  > wrote:
> The RPC mechanism used in Xcode 8 is not a part of the open source LLDB 
> project and should be treated as an implementation detail of Xcode.  What are 
> you trying to accomplish?
> 
> Kate Stone k8st...@apple.com 
>  Xcode Low Level Tools
> 
>> On Oct 6, 2016, at 6:11 PM, Rex Fenley via lldb-dev > > wrote:
>> 
>> Hi! I'm trying to connect to Xcode's lldb rpc server but I'm having trouble.
>> 
>> This doesn't seem to work to list the hosts.
>> rpcinfo -p lldb-rpc-server
>> 
>> Can't contact rpcbind on lldb-rpc-server
>> 
>> 
>> rpcinfo: RPC: Unknown host
>> 
>> Am I doing this correctly?
>> 
>> -- 
>> Rex Fenley  |  IOS DEVELOPER
>> 
>> 
>> Remind.com  |  BLOG   |  
>> FOLLOW US   |  LIKE US 
>> ___
>> lldb-dev mailing list
>> lldb-dev@lists.llvm.org 
>> http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-dev 
>> 
> 
> 
> 
> 
> -- 
> Rex Fenley  |  IOS DEVELOPER
> 
> 
> Remind.com  |  BLOG   |  
> FOLLOW US   |  LIKE US 
> ___
> lldb-dev mailing list
> lldb-dev@lists.llvm.org 
> http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-dev 
> 

Thanks,
- Enrico
📩 egranata@.com ☎️ 27683

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


Re: [lldb-dev] Connecting to lldb-rpc-server

2016-10-07 Thread Rex Fenley via lldb-dev
I'm trying to build a separate debugging tool that can be used in unison
with Xcode it will provide buttons that are shortcuts to lldb scripts we
write.

On Fri, Oct 7, 2016 at 10:45 AM, Enrico Granata  wrote:

> I am gonna echo Kate's question, but delve one level deeper
>
> Why do you want to send commands to LLDB from a different process?
>
> We have a bunch of different extension points in LLDB, so it's possible
> that what you're trying to do is actually already possible
>
> On Oct 7, 2016, at 10:41 AM, Rex Fenley via lldb-dev <
> lldb-dev@lists.llvm.org> wrote:
>
> Hi Kate,
>
> I'm trying to connect to the running instance of lldb in Xcode to send
> commands to it from a different process :)
>
> On Fri, Oct 7, 2016 at 10:27 AM, Kate Stone  wrote:
>
>> The RPC mechanism used in Xcode 8 is not a part of the open source LLDB
>> project and should be treated as an implementation detail of Xcode.  What
>> are you trying to accomplish?
>>
>> Kate Stone k8st...@apple.com
>>  Xcode Low Level Tools
>>
>> On Oct 6, 2016, at 6:11 PM, Rex Fenley via lldb-dev <
>> lldb-dev@lists.llvm.org> wrote:
>>
>> Hi! I'm trying to connect to Xcode's lldb rpc server but I'm having
>> trouble.
>>
>> This doesn't seem to work to list the hosts.
>>
>> rpcinfo -p lldb-rpc-server
>>
>> Can't contact rpcbind on lldb-rpc-server
>>
>> rpcinfo: RPC: Unknown host
>>
>> Am I doing this correctly?
>>
>> --
>> Rex Fenley  |  IOS DEVELOPER
>>
>> Remind.com  |  BLOG 
>>  |  FOLLOW US   |  LIKE US
>> 
>> ___
>> lldb-dev mailing list
>> lldb-dev@lists.llvm.org
>> http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-dev
>>
>>
>>
>
>
> --
> Rex Fenley  |  IOS DEVELOPER
>
> Remind.com  |  BLOG   |
>  FOLLOW US   |  LIKE US
> 
> ___
> lldb-dev mailing list
> lldb-dev@lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-dev
>
>
>
> Thanks,
> *- Enrico*
> 📩 egranata@.com ☎️ 27683
>
>


-- 

Rex Fenley  |  IOS DEVELOPER

Remind.com  |  BLOG 
 |  FOLLOW
US   |  LIKE US

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


Re: [lldb-dev] Connecting to lldb-rpc-server

2016-10-07 Thread Enrico Granata via lldb-dev
I can see a couple of avenues for your use case:

- you can write custom LLDB commands (obligatory reference: 
http://lldb.llvm.org/python-reference.html 
) and have your users type these 
via the console instead of by clicking buttons
- you could write a Python script that pops up extra UI and have your buttons 
run as part of LLDB that way. I have admittedly never tried to do this, and it 
might require some tinkering, but in theory I believe it should be possible

Personally, I'd rather much have console commands I can type instead of a magic 
separate UI that might even be hidden underneath other windows or hiding useful 
information unless I drag it out of the way, but then it's annoying to reach 
for when I need it, ..., but that's me...

> On Oct 7, 2016, at 11:27 AM, Rex Fenley  wrote:
> 
> I'm trying to build a separate debugging tool that can be used in unison with 
> Xcode it will provide buttons that are shortcuts to lldb scripts we write.
> 
> On Fri, Oct 7, 2016 at 10:45 AM, Enrico Granata  > wrote:
> I am gonna echo Kate's question, but delve one level deeper
> 
> Why do you want to send commands to LLDB from a different process?
> 
> We have a bunch of different extension points in LLDB, so it's possible that 
> what you're trying to do is actually already possible
> 
>> On Oct 7, 2016, at 10:41 AM, Rex Fenley via lldb-dev 
>> mailto:lldb-dev@lists.llvm.org>> wrote:
>> 
>> Hi Kate,
>> 
>> I'm trying to connect to the running instance of lldb in Xcode to send 
>> commands to it from a different process :)
>> 
>> On Fri, Oct 7, 2016 at 10:27 AM, Kate Stone > > wrote:
>> The RPC mechanism used in Xcode 8 is not a part of the open source LLDB 
>> project and should be treated as an implementation detail of Xcode.  What 
>> are you trying to accomplish?
>> 
>> Kate Stone k8st...@apple.com 
>>  Xcode Low Level Tools
>> 
>>> On Oct 6, 2016, at 6:11 PM, Rex Fenley via lldb-dev 
>>> mailto:lldb-dev@lists.llvm.org>> wrote:
>>> 
>>> Hi! I'm trying to connect to Xcode's lldb rpc server but I'm having trouble.
>>> 
>>> This doesn't seem to work to list the hosts.
>>> rpcinfo -p lldb-rpc-server
>>> 
>>> Can't contact rpcbind on lldb-rpc-server
>>> 
>>> 
>>> rpcinfo: RPC: Unknown host
>>> 
>>> Am I doing this correctly?
>>> 
>>> -- 
>>> Rex Fenley  |  IOS DEVELOPER
>>> 
>>> 
>>> Remind.com  |  BLOG   |  
>>> FOLLOW US   |  LIKE US 
>>> ___
>>> lldb-dev mailing list
>>> lldb-dev@lists.llvm.org 
>>> http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-dev 
>>> 
>> 
>> 
>> 
>> 
>> -- 
>> Rex Fenley  |  IOS DEVELOPER
>> 
>> 
>> Remind.com  |  BLOG   |  
>> FOLLOW US   |  LIKE US 
>> ___
>> lldb-dev mailing list
>> lldb-dev@lists.llvm.org 
>> http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-dev 
>> 
> 
> Thanks,
> - Enrico
> 📩 egranata@.com ☎️ 27683
> 
> 
> 
> 
> -- 
> Rex Fenley  |  IOS DEVELOPER
> 
> 
> Remind.com  |  BLOG   |  
> FOLLOW US   |  LIKE US 
> 

Thanks,
- Enrico
📩 egranata@.com ☎️ 27683

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


Re: [lldb-dev] Connecting to lldb-rpc-server

2016-10-07 Thread Rex Fenley via lldb-dev
We expect to have a rich user experience as this tool progresses, using
Python to generate UI will limit our development process. It would be much
simpler if we could communicate with Xcode's lldb directly from our
application.

On Fri, Oct 7, 2016 at 11:33 AM, Enrico Granata  wrote:

> I can see a couple of avenues for your use case:
>
> - you can write custom LLDB commands (obligatory reference:
> http://lldb.llvm.org/python-reference.html) and have your users type
> these via the console instead of by clicking buttons
> - you could write a Python script that pops up extra UI and have your
> buttons run as part of LLDB that way. I have admittedly never tried to do
> this, and it might require some tinkering, but in theory I believe it
> should be possible
>
> Personally, I'd rather much have console commands I can type instead of a
> magic separate UI that might even be hidden underneath other windows or
> hiding useful information unless I drag it out of the way, but then it's
> annoying to reach for when I need it, ..., but that's me...
>
> On Oct 7, 2016, at 11:27 AM, Rex Fenley  wrote:
>
> I'm trying to build a separate debugging tool that can be used in unison
> with Xcode it will provide buttons that are shortcuts to lldb scripts we
> write.
>
> On Fri, Oct 7, 2016 at 10:45 AM, Enrico Granata  w
> rote:
>
>> I am gonna echo Kate's question, but delve one level deeper
>>
>> Why do you want to send commands to LLDB from a different process?
>>
>> We have a bunch of different extension points in LLDB, so it's possible
>> that what you're trying to do is actually already possible
>>
>> On Oct 7, 2016, at 10:41 AM, Rex Fenley via lldb-dev <
>> lldb-dev@lists.llvm.org> wrote:
>>
>> Hi Kate,
>>
>> I'm trying to connect to the running instance of lldb in Xcode to send
>> commands to it from a different process :)
>>
>> On Fri, Oct 7, 2016 at 10:27 AM, Kate Stone  wrote:
>>
>>> The RPC mechanism used in Xcode 8 is not a part of the open source LLDB
>>> project and should be treated as an implementation detail of Xcode.  What
>>> are you trying to accomplish?
>>>
>>> Kate Stone k8st...@apple.com
>>>  Xcode Low Level Tools
>>>
>>> On Oct 6, 2016, at 6:11 PM, Rex Fenley via lldb-dev <
>>> lldb-dev@lists.llvm.org> wrote:
>>>
>>> Hi! I'm trying to connect to Xcode's lldb rpc server but I'm having
>>> trouble.
>>>
>>> This doesn't seem to work to list the hosts.
>>>
>>> rpcinfo -p lldb-rpc-server
>>>
>>> Can't contact rpcbind on lldb-rpc-server
>>>
>>> rpcinfo: RPC: Unknown host
>>>
>>> Am I doing this correctly?
>>>
>>> --
>>> Rex Fenley  |  IOS DEVELOPER
>>>
>>> Remind.com  |  BLOG 
>>>  |  FOLLOW US   |  LIKE US
>>> 
>>> ___
>>> lldb-dev mailing list
>>> lldb-dev@lists.llvm.org
>>> http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-dev
>>>
>>>
>>>
>>
>>
>> --
>> Rex Fenley  |  IOS DEVELOPER
>>
>> Remind.com  |  BLOG 
>>  |  FOLLOW US   |  LIKE US
>> 
>> ___
>> lldb-dev mailing list
>> lldb-dev@lists.llvm.org
>> http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-dev
>>
>>
>>
>> Thanks,
>> *- Enrico*
>> 📩 egranata@.com ☎️ 27683
>>
>>
>
>
> --
> Rex Fenley  |  IOS DEVELOPER
>
> Remind.com  |  BLOG   |
>  FOLLOW US   |  LIKE US
> 
>
>
>
> Thanks,
> *- Enrico*
> 📩 egranata@.com ☎️ 27683
>
>


-- 

Rex Fenley  |  IOS DEVELOPER

Remind.com  |  BLOG 
 |  FOLLOW
US   |  LIKE US

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


Re: [lldb-dev] Connecting to lldb-rpc-server

2016-10-07 Thread Enrico Granata via lldb-dev
It is my understanding that this is not possible in the current architecture

> On Oct 7, 2016, at 11:55 AM, Rex Fenley  wrote:
> 
> We expect to have a rich user experience as this tool progresses, using 
> Python to generate UI will limit our development process. It would be much 
> simpler if we could communicate with Xcode's lldb directly from our 
> application.
> 
> On Fri, Oct 7, 2016 at 11:33 AM, Enrico Granata  > wrote:
> I can see a couple of avenues for your use case:
> 
> - you can write custom LLDB commands (obligatory reference: 
> http://lldb.llvm.org/python-reference.html 
> ) and have your users type these 
> via the console instead of by clicking buttons
> - you could write a Python script that pops up extra UI and have your buttons 
> run as part of LLDB that way. I have admittedly never tried to do this, and 
> it might require some tinkering, but in theory I believe it should be possible
> 
> Personally, I'd rather much have console commands I can type instead of a 
> magic separate UI that might even be hidden underneath other windows or 
> hiding useful information unless I drag it out of the way, but then it's 
> annoying to reach for when I need it, ..., but that's me...
> 
>> On Oct 7, 2016, at 11:27 AM, Rex Fenley > > wrote:
>> 
>> I'm trying to build a separate debugging tool that can be used in unison 
>> with Xcode it will provide buttons that are shortcuts to lldb scripts we 
>> write.
>> 
>> On Fri, Oct 7, 2016 at 10:45 AM, Enrico Granata > > wrote:
>> I am gonna echo Kate's question, but delve one level deeper
>> 
>> Why do you want to send commands to LLDB from a different process?
>> 
>> We have a bunch of different extension points in LLDB, so it's possible that 
>> what you're trying to do is actually already possible
>> 
>>> On Oct 7, 2016, at 10:41 AM, Rex Fenley via lldb-dev 
>>> mailto:lldb-dev@lists.llvm.org>> wrote:
>>> 
>>> Hi Kate,
>>> 
>>> I'm trying to connect to the running instance of lldb in Xcode to send 
>>> commands to it from a different process :)
>>> 
>>> On Fri, Oct 7, 2016 at 10:27 AM, Kate Stone >> > wrote:
>>> The RPC mechanism used in Xcode 8 is not a part of the open source LLDB 
>>> project and should be treated as an implementation detail of Xcode.  What 
>>> are you trying to accomplish?
>>> 
>>> Kate Stone k8st...@apple.com 
>>>  Xcode Low Level Tools
>>> 
 On Oct 6, 2016, at 6:11 PM, Rex Fenley via lldb-dev 
 mailto:lldb-dev@lists.llvm.org>> wrote:
 
 Hi! I'm trying to connect to Xcode's lldb rpc server but I'm having 
 trouble.
 
 This doesn't seem to work to list the hosts.
 rpcinfo -p lldb-rpc-server
 
 Can't contact rpcbind on lldb-rpc-server
 
 
 rpcinfo: RPC: Unknown host
 
 Am I doing this correctly?
 
 -- 
 Rex Fenley  |  IOS DEVELOPER
 
 
 Remind.com  |  BLOG   |  
 FOLLOW US   |  LIKE US 
 ___
 lldb-dev mailing list
 lldb-dev@lists.llvm.org 
 http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-dev 
 
>>> 
>>> 
>>> 
>>> 
>>> -- 
>>> Rex Fenley  |  IOS DEVELOPER
>>> 
>>> 
>>> Remind.com  |  BLOG   |  
>>> FOLLOW US   |  LIKE US 
>>> ___
>>> lldb-dev mailing list
>>> lldb-dev@lists.llvm.org 
>>> http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-dev 
>>> 
>> 
>> Thanks,
>> - Enrico
>> 📩 egranata@.com ☎️ 27683
>> 
>> 
>> 
>> 
>> -- 
>> Rex Fenley  |  IOS DEVELOPER
>> 
>> 
>> Remind.com  |  BLOG   |  
>> FOLLOW US   |  LIKE US 
>> 
> 
> Thanks,
> - Enrico
> 📩 egranata@.com ☎️ 27683
> 
> 
> 
> 
> -- 
> Rex Fenley  |  IOS DEVELOPER
> 
> 
> Remind.com  |  BLOG   |  
> FOLLOW US   |  LIKE US 
> 

Thanks,
- Enrico
📩 egranata@.com ☎️ 27683

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


Re: [lldb-dev] Connecting to lldb-rpc-server

2016-10-07 Thread Rex Fenley via lldb-dev
https://media4.giphy.com/media/l2Je27KfKp8x71qAo/200.gif

On Fri, Oct 7, 2016 at 12:01 PM, Enrico Granata  wrote:

> It is my understanding that this is not possible in the current
> architecture
>
> On Oct 7, 2016, at 11:55 AM, Rex Fenley  wrote:
>
> We expect to have a rich user experience as this tool progresses, using
> Python to generate UI will limit our development process. It would be much
> simpler if we could communicate with Xcode's lldb directly from our
> application.
>
> On Fri, Oct 7, 2016 at 11:33 AM, Enrico Granata  w
> rote:
>
>> I can see a couple of avenues for your use case:
>>
>> - you can write custom LLDB commands (obligatory reference:
>> http://lldb.llvm.org/python-reference.html) and have your users type
>> these via the console instead of by clicking buttons
>> - you could write a Python script that pops up extra UI and have your
>> buttons run as part of LLDB that way. I have admittedly never tried to do
>> this, and it might require some tinkering, but in theory I believe it
>> should be possible
>>
>> Personally, I'd rather much have console commands I can type instead of a
>> magic separate UI that might even be hidden underneath other windows or
>> hiding useful information unless I drag it out of the way, but then it's
>> annoying to reach for when I need it, ..., but that's me...
>>
>> On Oct 7, 2016, at 11:27 AM, Rex Fenley  wrote:
>>
>> I'm trying to build a separate debugging tool that can be used in unison
>> with Xcode it will provide buttons that are shortcuts to lldb scripts we
>> write.
>>
>> On Fri, Oct 7, 2016 at 10:45 AM, Enrico Granata  w
>> rote:
>>
>>> I am gonna echo Kate's question, but delve one level deeper
>>>
>>> Why do you want to send commands to LLDB from a different process?
>>>
>>> We have a bunch of different extension points in LLDB, so it's possible
>>> that what you're trying to do is actually already possible
>>>
>>> On Oct 7, 2016, at 10:41 AM, Rex Fenley via lldb-dev <
>>> lldb-dev@lists.llvm.org> wrote:
>>>
>>> Hi Kate,
>>>
>>> I'm trying to connect to the running instance of lldb in Xcode to send
>>> commands to it from a different process :)
>>>
>>> On Fri, Oct 7, 2016 at 10:27 AM, Kate Stone  wrote:
>>>
 The RPC mechanism used in Xcode 8 is not a part of the open source LLDB
 project and should be treated as an implementation detail of Xcode.  What
 are you trying to accomplish?

 Kate Stone k8st...@apple.com
  Xcode Low Level Tools

 On Oct 6, 2016, at 6:11 PM, Rex Fenley via lldb-dev <
 lldb-dev@lists.llvm.org> wrote:

 Hi! I'm trying to connect to Xcode's lldb rpc server but I'm having
 trouble.

 This doesn't seem to work to list the hosts.

 rpcinfo -p lldb-rpc-server

 Can't contact rpcbind on lldb-rpc-server

 rpcinfo: RPC: Unknown host

 Am I doing this correctly?

 --
 Rex Fenley  |  IOS DEVELOPER

 Remind.com  |  BLOG 
  |  FOLLOW US   |  LIKE US
 
 ___
 lldb-dev mailing list
 lldb-dev@lists.llvm.org
 http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-dev



>>>
>>>
>>> --
>>> Rex Fenley  |  IOS DEVELOPER
>>>
>>> Remind.com  |  BLOG 
>>>  |  FOLLOW US   |  LIKE US
>>> 
>>> ___
>>> lldb-dev mailing list
>>> lldb-dev@lists.llvm.org
>>> http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-dev
>>>
>>>
>>>
>>> Thanks,
>>> *- Enrico*
>>> 📩 egranata@.com ☎️ 27683
>>>
>>>
>>
>>
>> --
>> Rex Fenley  |  IOS DEVELOPER
>>
>> Remind.com  |  BLOG 
>>  |  FOLLOW US   |  LIKE US
>> 
>>
>>
>>
>> Thanks,
>> *- Enrico*
>> 📩 egranata@.com ☎️ 27683
>>
>>
>
>
> --
> Rex Fenley  |  IOS DEVELOPER
>
> Remind.com  |  BLOG   |
>  FOLLOW US   |  LIKE US
> 
>
>
>
> Thanks,
> *- Enrico*
> 📩 egranata@.com ☎️ 27683
>
>


-- 

Rex Fenley  |  IOS DEVELOPER

Remind.com  |  BLOG 
 |  FOLLOW
US   |  LIKE US

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


Re: [lldb-dev] Connecting to lldb-rpc-server

2016-10-07 Thread Jim Ingham via lldb-dev
Enrico is right.  At present, each connection to the lldb-rpc-server gets its 
own SBDebugger, so you wouldn't be able to talk to the debugger that Xcode is 
using for its process.

Even if that was changed, then you'd run into other problems, for instance, at 
present only one Listener can wait for process events from the debugger, so you 
would not be able to control execution or coordinate with Xcode's running of 
the process.  But this is probably just the tip of the iceberg of things that 
would go wrong if you try to do this.  

If you have lots of resources to devote to hacking on lldb itself, I'm sure you 
could make this work, but this is a very tricky part of lldb, so the 
engineering work would be non-trivial to say the least.  I don't know your 
circumstances, but I doubt it would end up being worthwhile for you.

Enrico's suggestion of making Python commands to do the job is probably the 
best way to go.

Note, it used to be tricky to get a plain command tool (lldb-rpc-server) to 
connect to the Window Server and put up UI.  I haven't tried that since I 
worked on Tcl/Tk way back in the day, so it may be easier now.  But you should 
probably also experiment with that to make sure that's possible before you go 
too far down this route.

Jim


> On Oct 7, 2016, at 12:05 PM, Rex Fenley via lldb-dev 
>  wrote:
> 
> https://media4.giphy.com/media/l2Je27KfKp8x71qAo/200.gif
> 
> On Fri, Oct 7, 2016 at 12:01 PM, Enrico Granata  wrote:
> It is my understanding that this is not possible in the current architecture
> 
>> On Oct 7, 2016, at 11:55 AM, Rex Fenley  wrote:
>> 
>> We expect to have a rich user experience as this tool progresses, using 
>> Python to generate UI will limit our development process. It would be much 
>> simpler if we could communicate with Xcode's lldb directly from our 
>> application.
>> 
>> On Fri, Oct 7, 2016 at 11:33 AM, Enrico Granata  wrote:
>> I can see a couple of avenues for your use case:
>> 
>> - you can write custom LLDB commands (obligatory reference: 
>> http://lldb.llvm.org/python-reference.html) and have your users type these 
>> via the console instead of by clicking buttons
>> - you could write a Python script that pops up extra UI and have your 
>> buttons run as part of LLDB that way. I have admittedly never tried to do 
>> this, and it might require some tinkering, but in theory I believe it should 
>> be possible
>> 
>> Personally, I'd rather much have console commands I can type instead of a 
>> magic separate UI that might even be hidden underneath other windows or 
>> hiding useful information unless I drag it out of the way, but then it's 
>> annoying to reach for when I need it, ..., but that's me...
>> 
>>> On Oct 7, 2016, at 11:27 AM, Rex Fenley  wrote:
>>> 
>>> I'm trying to build a separate debugging tool that can be used in unison 
>>> with Xcode it will provide buttons that are shortcuts to lldb scripts we 
>>> write.
>>> 
>>> On Fri, Oct 7, 2016 at 10:45 AM, Enrico Granata  wrote:
>>> I am gonna echo Kate's question, but delve one level deeper
>>> 
>>> Why do you want to send commands to LLDB from a different process?
>>> 
>>> We have a bunch of different extension points in LLDB, so it's possible 
>>> that what you're trying to do is actually already possible
>>> 
 On Oct 7, 2016, at 10:41 AM, Rex Fenley via lldb-dev 
  wrote:
 
 Hi Kate,
 
 I'm trying to connect to the running instance of lldb in Xcode to send 
 commands to it from a different process :)
 
 On Fri, Oct 7, 2016 at 10:27 AM, Kate Stone  wrote:
 The RPC mechanism used in Xcode 8 is not a part of the open source LLDB 
 project and should be treated as an implementation detail of Xcode.  What 
 are you trying to accomplish?
 
 Kate Stone k8st...@apple.com
  Xcode Low Level Tools
 
> On Oct 6, 2016, at 6:11 PM, Rex Fenley via lldb-dev 
>  wrote:
> 
> Hi! I'm trying to connect to Xcode's lldb rpc server but I'm having 
> trouble.
> 
> This doesn't seem to work to list the hosts.
> rpcinfo -p lldb-rpc-server
> 
> Can't contact rpcbind on lldb-rpc-server
> 
> 
> rpcinfo: RPC: Unknown host
> 
> Am I doing this correctly?
> 
> -- 
> Rex Fenley  |  IOS DEVELOPER
> 
> 
> Remind.com |  BLOG  |  FOLLOW US  |  LIKE US
> ___
> lldb-dev mailing list
> lldb-dev@lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-dev
 
 
 
 
 -- 
 Rex Fenley  |  IOS DEVELOPER
 
 
 Remind.com |  BLOG  |  FOLLOW US  |  LIKE US
 ___
 lldb-dev mailing list
 lldb-dev@lists.llvm.org
 http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-dev
>>> 
>>> 
>>> Thanks,
>>> - Enrico
>>> 📩 egranata@.com ☎️ 27683
>>> 
>>> 
>>> 
>>> 
>>> -- 
>>> Rex Fenley  |  IOS DEVELOPER
>>> 
>>> 
>>> Remind.com |  BLOG  |  FOLLO

Re: [lldb-dev] Connecting to lldb-rpc-server

2016-10-07 Thread Rex Fenley via lldb-dev
Ok, thanks for all the info, it's really helpful. We may instead pursue
running lldb from the toolchain downloaded from the swift website within
our process for the time being and skip having it work in unison with
Xcode. We've been having trouble setting that up too however but it's
already being discussed in a different email thread :)

On Fri, Oct 7, 2016 at 12:29 PM, Jim Ingham  wrote:

> Enrico is right.  At present, each connection to the lldb-rpc-server gets
> its own SBDebugger, so you wouldn't be able to talk to the debugger that
> Xcode is using for its process.
>
> Even if that was changed, then you'd run into other problems, for
> instance, at present only one Listener can wait for process events from the
> debugger, so you would not be able to control execution or coordinate with
> Xcode's running of the process.  But this is probably just the tip of the
> iceberg of things that would go wrong if you try to do this.
>
> If you have lots of resources to devote to hacking on lldb itself, I'm
> sure you could make this work, but this is a very tricky part of lldb, so
> the engineering work would be non-trivial to say the least.  I don't know
> your circumstances, but I doubt it would end up being worthwhile for you.
>
> Enrico's suggestion of making Python commands to do the job is probably
> the best way to go.
>
> Note, it used to be tricky to get a plain command tool (lldb-rpc-server)
> to connect to the Window Server and put up UI.  I haven't tried that since
> I worked on Tcl/Tk way back in the day, so it may be easier now.  But you
> should probably also experiment with that to make sure that's possible
> before you go too far down this route.
>
> Jim
>
>
> > On Oct 7, 2016, at 12:05 PM, Rex Fenley via lldb-dev <
> lldb-dev@lists.llvm.org> wrote:
> >
> > https://media4.giphy.com/media/l2Je27KfKp8x71qAo/200.gif
> >
> > On Fri, Oct 7, 2016 at 12:01 PM, Enrico Granata 
> wrote:
> > It is my understanding that this is not possible in the current
> architecture
> >
> >> On Oct 7, 2016, at 11:55 AM, Rex Fenley  wrote:
> >>
> >> We expect to have a rich user experience as this tool progresses, using
> Python to generate UI will limit our development process. It would be much
> simpler if we could communicate with Xcode's lldb directly from our
> application.
> >>
> >> On Fri, Oct 7, 2016 at 11:33 AM, Enrico Granata 
> wrote:
> >> I can see a couple of avenues for your use case:
> >>
> >> - you can write custom LLDB commands (obligatory reference:
> http://lldb.llvm.org/python-reference.html) and have your users type
> these via the console instead of by clicking buttons
> >> - you could write a Python script that pops up extra UI and have your
> buttons run as part of LLDB that way. I have admittedly never tried to do
> this, and it might require some tinkering, but in theory I believe it
> should be possible
> >>
> >> Personally, I'd rather much have console commands I can type instead of
> a magic separate UI that might even be hidden underneath other windows or
> hiding useful information unless I drag it out of the way, but then it's
> annoying to reach for when I need it, ..., but that's me...
> >>
> >>> On Oct 7, 2016, at 11:27 AM, Rex Fenley  wrote:
> >>>
> >>> I'm trying to build a separate debugging tool that can be used in
> unison with Xcode it will provide buttons that are shortcuts to lldb
> scripts we write.
> >>>
> >>> On Fri, Oct 7, 2016 at 10:45 AM, Enrico Granata 
> wrote:
> >>> I am gonna echo Kate's question, but delve one level deeper
> >>>
> >>> Why do you want to send commands to LLDB from a different process?
> >>>
> >>> We have a bunch of different extension points in LLDB, so it's
> possible that what you're trying to do is actually already possible
> >>>
>  On Oct 7, 2016, at 10:41 AM, Rex Fenley via lldb-dev <
> lldb-dev@lists.llvm.org> wrote:
> 
>  Hi Kate,
> 
>  I'm trying to connect to the running instance of lldb in Xcode to
> send commands to it from a different process :)
> 
>  On Fri, Oct 7, 2016 at 10:27 AM, Kate Stone 
> wrote:
>  The RPC mechanism used in Xcode 8 is not a part of the open source
> LLDB project and should be treated as an implementation detail of Xcode.
> What are you trying to accomplish?
> 
>  Kate Stone k8st...@apple.com
>   Xcode Low Level Tools
> 
> > On Oct 6, 2016, at 6:11 PM, Rex Fenley via lldb-dev <
> lldb-dev@lists.llvm.org> wrote:
> >
> > Hi! I'm trying to connect to Xcode's lldb rpc server but I'm having
> trouble.
> >
> > This doesn't seem to work to list the hosts.
> > rpcinfo -p lldb-rpc-server
> >
> > Can't contact rpcbind on lldb-rpc-server
> >
> >
> > rpcinfo: RPC: Unknown host
> >
> > Am I doing this correctly?
> >
> > --
> > Rex Fenley  |  IOS DEVELOPER
> >
> >
> > Remind.com |  BLOG  |  FOLLOW US  |  LIKE US
> > ___
> > lldb-dev mailing list
> >

Re: [lldb-dev] Connecting to lldb-rpc-server

2016-10-07 Thread Sean Callanan via lldb-dev
Once you have Python commands, could you make them into a simple RPC service 
and set up a new socket connection to your program from the LLDB side, all 
implemented in Python?

Sean

> On Oct 7, 2016, at 12:29 PM, Jim Ingham via lldb-dev 
>  wrote:
> 
> Enrico is right.  At present, each connection to the lldb-rpc-server gets its 
> own SBDebugger, so you wouldn't be able to talk to the debugger that Xcode is 
> using for its process.
> 
> Even if that was changed, then you'd run into other problems, for instance, 
> at present only one Listener can wait for process events from the debugger, 
> so you would not be able to control execution or coordinate with Xcode's 
> running of the process.  But this is probably just the tip of the iceberg of 
> things that would go wrong if you try to do this.  
> 
> If you have lots of resources to devote to hacking on lldb itself, I'm sure 
> you could make this work, but this is a very tricky part of lldb, so the 
> engineering work would be non-trivial to say the least.  I don't know your 
> circumstances, but I doubt it would end up being worthwhile for you.
> 
> Enrico's suggestion of making Python commands to do the job is probably the 
> best way to go.
> 
> Note, it used to be tricky to get a plain command tool (lldb-rpc-server) to 
> connect to the Window Server and put up UI.  I haven't tried that since I 
> worked on Tcl/Tk way back in the day, so it may be easier now.  But you 
> should probably also experiment with that to make sure that's possible before 
> you go too far down this route.
> 
> Jim
> 
> 
>> On Oct 7, 2016, at 12:05 PM, Rex Fenley via lldb-dev 
>>  wrote:
>> 
>> https://media4.giphy.com/media/l2Je27KfKp8x71qAo/200.gif
>> 
>> On Fri, Oct 7, 2016 at 12:01 PM, Enrico Granata  wrote:
>> It is my understanding that this is not possible in the current architecture
>> 
>>> On Oct 7, 2016, at 11:55 AM, Rex Fenley  wrote:
>>> 
>>> We expect to have a rich user experience as this tool progresses, using 
>>> Python to generate UI will limit our development process. It would be much 
>>> simpler if we could communicate with Xcode's lldb directly from our 
>>> application.
>>> 
>>> On Fri, Oct 7, 2016 at 11:33 AM, Enrico Granata  wrote:
>>> I can see a couple of avenues for your use case:
>>> 
>>> - you can write custom LLDB commands (obligatory reference: 
>>> http://lldb.llvm.org/python-reference.html) and have your users type these 
>>> via the console instead of by clicking buttons
>>> - you could write a Python script that pops up extra UI and have your 
>>> buttons run as part of LLDB that way. I have admittedly never tried to do 
>>> this, and it might require some tinkering, but in theory I believe it 
>>> should be possible
>>> 
>>> Personally, I'd rather much have console commands I can type instead of a 
>>> magic separate UI that might even be hidden underneath other windows or 
>>> hiding useful information unless I drag it out of the way, but then it's 
>>> annoying to reach for when I need it, ..., but that's me...
>>> 
 On Oct 7, 2016, at 11:27 AM, Rex Fenley  wrote:
 
 I'm trying to build a separate debugging tool that can be used in unison 
 with Xcode it will provide buttons that are shortcuts to lldb scripts we 
 write.
 
 On Fri, Oct 7, 2016 at 10:45 AM, Enrico Granata  wrote:
 I am gonna echo Kate's question, but delve one level deeper
 
 Why do you want to send commands to LLDB from a different process?
 
 We have a bunch of different extension points in LLDB, so it's possible 
 that what you're trying to do is actually already possible
 
> On Oct 7, 2016, at 10:41 AM, Rex Fenley via lldb-dev 
>  wrote:
> 
> Hi Kate,
> 
> I'm trying to connect to the running instance of lldb in Xcode to send 
> commands to it from a different process :)
> 
> On Fri, Oct 7, 2016 at 10:27 AM, Kate Stone  wrote:
> The RPC mechanism used in Xcode 8 is not a part of the open source LLDB 
> project and should be treated as an implementation detail of Xcode.  What 
> are you trying to accomplish?
> 
> Kate Stone k8st...@apple.com
>  Xcode Low Level Tools
> 
>> On Oct 6, 2016, at 6:11 PM, Rex Fenley via lldb-dev 
>>  wrote:
>> 
>> Hi! I'm trying to connect to Xcode's lldb rpc server but I'm having 
>> trouble.
>> 
>> This doesn't seem to work to list the hosts.
>> rpcinfo -p lldb-rpc-server
>> 
>> Can't contact rpcbind on lldb-rpc-server
>> 
>> 
>> rpcinfo: RPC: Unknown host
>> 
>> Am I doing this correctly?
>> 
>> -- 
>> Rex Fenley  |  IOS DEVELOPER
>> 
>> 
>> Remind.com |  BLOG  |  FOLLOW US  |  LIKE US
>> ___
>> lldb-dev mailing list
>> lldb-dev@lists.llvm.org
>> http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-dev
> 
> 
> 
> 
> -- 
> Rex Fenley  |  IOS DEVELOPER
>

Re: [lldb-dev] Connecting to lldb-rpc-server

2016-10-07 Thread Rex Fenley via lldb-dev
That actually seems really doable! Thanks for the info, we'll give that a
shot!

On Fri, Oct 7, 2016 at 1:40 PM, Sean Callanan  wrote:

> Once you have Python commands, could you make them into a simple RPC
> service and set up a new socket connection to your program from the LLDB
> side, all implemented in Python?
>
> Sean
>
> > On Oct 7, 2016, at 12:29 PM, Jim Ingham via lldb-dev <
> lldb-dev@lists.llvm.org> wrote:
> >
> > Enrico is right.  At present, each connection to the lldb-rpc-server
> gets its own SBDebugger, so you wouldn't be able to talk to the debugger
> that Xcode is using for its process.
> >
> > Even if that was changed, then you'd run into other problems, for
> instance, at present only one Listener can wait for process events from the
> debugger, so you would not be able to control execution or coordinate with
> Xcode's running of the process.  But this is probably just the tip of the
> iceberg of things that would go wrong if you try to do this.
> >
> > If you have lots of resources to devote to hacking on lldb itself, I'm
> sure you could make this work, but this is a very tricky part of lldb, so
> the engineering work would be non-trivial to say the least.  I don't know
> your circumstances, but I doubt it would end up being worthwhile for you.
> >
> > Enrico's suggestion of making Python commands to do the job is probably
> the best way to go.
> >
> > Note, it used to be tricky to get a plain command tool (lldb-rpc-server)
> to connect to the Window Server and put up UI.  I haven't tried that since
> I worked on Tcl/Tk way back in the day, so it may be easier now.  But you
> should probably also experiment with that to make sure that's possible
> before you go too far down this route.
> >
> > Jim
> >
> >
> >> On Oct 7, 2016, at 12:05 PM, Rex Fenley via lldb-dev <
> lldb-dev@lists.llvm.org> wrote:
> >>
> >> https://media4.giphy.com/media/l2Je27KfKp8x71qAo/200.gif
> >>
> >> On Fri, Oct 7, 2016 at 12:01 PM, Enrico Granata 
> wrote:
> >> It is my understanding that this is not possible in the current
> architecture
> >>
> >>> On Oct 7, 2016, at 11:55 AM, Rex Fenley  wrote:
> >>>
> >>> We expect to have a rich user experience as this tool progresses,
> using Python to generate UI will limit our development process. It would be
> much simpler if we could communicate with Xcode's lldb directly from our
> application.
> >>>
> >>> On Fri, Oct 7, 2016 at 11:33 AM, Enrico Granata 
> wrote:
> >>> I can see a couple of avenues for your use case:
> >>>
> >>> - you can write custom LLDB commands (obligatory reference:
> http://lldb.llvm.org/python-reference.html) and have your users type
> these via the console instead of by clicking buttons
> >>> - you could write a Python script that pops up extra UI and have your
> buttons run as part of LLDB that way. I have admittedly never tried to do
> this, and it might require some tinkering, but in theory I believe it
> should be possible
> >>>
> >>> Personally, I'd rather much have console commands I can type instead
> of a magic separate UI that might even be hidden underneath other windows
> or hiding useful information unless I drag it out of the way, but then it's
> annoying to reach for when I need it, ..., but that's me...
> >>>
>  On Oct 7, 2016, at 11:27 AM, Rex Fenley  wrote:
> 
>  I'm trying to build a separate debugging tool that can be used in
> unison with Xcode it will provide buttons that are shortcuts to lldb
> scripts we write.
> 
>  On Fri, Oct 7, 2016 at 10:45 AM, Enrico Granata 
> wrote:
>  I am gonna echo Kate's question, but delve one level deeper
> 
>  Why do you want to send commands to LLDB from a different process?
> 
>  We have a bunch of different extension points in LLDB, so it's
> possible that what you're trying to do is actually already possible
> 
> > On Oct 7, 2016, at 10:41 AM, Rex Fenley via lldb-dev <
> lldb-dev@lists.llvm.org> wrote:
> >
> > Hi Kate,
> >
> > I'm trying to connect to the running instance of lldb in Xcode to
> send commands to it from a different process :)
> >
> > On Fri, Oct 7, 2016 at 10:27 AM, Kate Stone 
> wrote:
> > The RPC mechanism used in Xcode 8 is not a part of the open source
> LLDB project and should be treated as an implementation detail of Xcode.
> What are you trying to accomplish?
> >
> > Kate Stone k8st...@apple.com
> >  Xcode Low Level Tools
> >
> >> On Oct 6, 2016, at 6:11 PM, Rex Fenley via lldb-dev <
> lldb-dev@lists.llvm.org> wrote:
> >>
> >> Hi! I'm trying to connect to Xcode's lldb rpc server but I'm having
> trouble.
> >>
> >> This doesn't seem to work to list the hosts.
> >> rpcinfo -p lldb-rpc-server
> >>
> >> Can't contact rpcbind on lldb-rpc-server
> >>
> >>
> >> rpcinfo: RPC: Unknown host
> >>
> >> Am I doing this correctly?
> >>
> >> --
> >> Rex Fenley  |  IOS DEVELOPER
> >>
> >>
> >> Remind.com |  BLOG  

[lldb-dev] LLDB can't find source...but it can?

2016-10-07 Thread Ted Woodward via lldb-dev
Background - I'm working on getting LLDB to run on Hexagon Linux, built with
an LLVM toolchain. We're using libc++ and MUSL. The loader is a bit
squirrelly right now, so I've built LLDB statically.

 

I've got full source debugging in the driver, but when I step into
SBDebugger::Create, I don't have any source. I've got symbols:

(lldb) bt

* thread #1: tid = 1, 0x00114730 lldb`lldb::SBDebugger::Create(bool) + 16,
stop reason = breakpoint 2.1

  * frame #0: 0x00114730 lldb`lldb::SBDebugger::Create(bool) + 16

frame #1: 0x01dc lldb`Driver::Driver(this=0x7ffefc50) + 124 at
Driver.cpp:150

frame #2: 0x6aa0 lldb`main(argc=1, argv=0x7ffefd34) + 240 at
Driver.cpp:1350

frame #3: 0x04744384 lldb`__libc_start_main + 48

 

list SBDebugger::Create fails, but list SBDebugger::Create(bool) gives me
source.

(lldb) list SBDebugger::Create

(lldb) list SBDebugger::Create(bool)

File:
\local\mnt\workspace\ted\linux\llvm\tools\lldb\source\API\SBDebugger.cpp

   172  return SBDebugger::Create(false, nullptr, nullptr);

   173  }

   174

   175  SBDebugger

   176  SBDebugger::Create(bool source_init_files)

   177  {

   178  return SBDebugger::Create (source_init_files, nullptr, nullptr);

   179  }

   180

   181  SBDebugger

   182  SBDebugger::Create(bool source_init_files, lldb::LogOutputCallback
callback, void *baton)

   183

 

Finally, I try to list based on the address of the function:

(lldb) list 0x114720

error: address resolves to lldb[0x00114720], but there is no line
table information available for this address.

 

But there is line table information for 0x114720 (from llvm-dwarfdump):

0x00114720177  0 80   0 0  is_stmt

0x00114730178 32 80   0 0  is_stmt
prologue_end

0x00114734178 12 80   0 0 

0x00114754178  5 80   0 0

 

 

 

My breakpoint at SBDebugger::Create resolved to prologue_end:

(lldb) break list

Current breakpoints:

1: name = 'main', locations = 1, resolved = 1, hit count = 1

  1.1: where = lldb`main + 32 at Driver.cpp:1335, address = 0x69d0,
resolved, hit count = 1

 

2: name = 'SBDebugger::Create', locations = 3, resolved = 3, hit count = 1

  2.1: where = lldb`lldb::SBDebugger::Create(bool) + 16, address =
0x00114730, resolved, hit count = 1

  2.2: where = lldb`lldb::SBDebugger::Create() + 8, address = 0x001143c0,
resolved, hit count = 0

  2.3: where = lldb`lldb::SBDebugger::Create(bool, void (*)(char const*,
void*), void*) + 40, address = 0x00114404, resolved, hit count = 0

 

 

So - why can LLDB find the source when I specify the function explicitly, or
find the line table info when I set a breakpoint, but not when I am in the
function or list an address?

 

 

Ted

 

--

Qualcomm Innovation Center, Inc.

The Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a
Linux Foundation Collaborative Project

 

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


Re: [lldb-dev] fate of TimeValue

2016-10-07 Thread Pavel Labath via lldb-dev
The llvm-dev thread seems to have fizzed out - I would assume they are
not interested in std::chrono. In any case, I've put the more
interesting patches I have in my stack up for review, so you have a
better idea of what I have in mind. and then we can decide what is the
fate of the utility functions there.

cheers,
pl

On 6 October 2016 at 18:01, Pavel Labath  wrote:
> I see one usage of of chrono in the Fuzzer, and that's about it.
>
> On 6 October 2016 at 17:46, Zachary Turner  wrote:
>>
>> I'd love to move over to chrono. For Utility functions such as those you
>> propose probably we should consider whether they should go into llvm. Does
>> llvm currently use anything from chrono or have any chrono support functions
>> yet?
>> On Thu, Oct 6, 2016 at 5:39 PM Pavel Labath via lldb-dev
>>  wrote:
>>>
>>> Hello all,
>>>
>>> in line with the "deinventing the wheel" movement, I'd like to remove the
>>> TimeValue class from LLDB. I've done some research on a flight this week,
>>> and as far as I can tell all functionality can be easily replaced with
>>> appropriate usage of std::chrono::duration and time_point.
>>>
>>> The only parts that are missing are the ability to convert to/from legacy
>>> C types (struct timevalue, struct timespec), which can be replaced by
>>> utility functions.
>>>
>>> Also, I've found one use case particularly cumbersome to write in the c++
>>> way: writing out a duration as a fractional number of units (e.g.
>>> milliseconds). So, I'd propose adding the following utility function as well
>>> (unless someone knows a cleaner way to write this):
>>>
>>> template
>>> double float_duration(DurIn dur) {
>>>   return std::chrono::duration_cast>> DurOut::period>>(dur).count();
>>> }
>>>
>>> Then, you can write float_duration(dur) to get the duration
>>> as a fractional number of milliseconds (used in printing time deltas in a
>>> human readable fashion).
>>>
>>> Any thoughts or objections?
>>>
>>> pl
>>> ___
>>> 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] fate of TimeValue

2016-10-07 Thread Mehdi Amini via lldb-dev

> On Oct 7, 2016, at 9:30 PM, Pavel Labath via lldb-dev 
>  wrote:
> 
> The llvm-dev thread seems to have fizzed out - I would assume they are
> not interested in std::chrono.

I suggest a totally different course of action: any utility (except specific to 
the debugger for some reason) should be submitted into LLVM (Support?). 
I may be happy to have it available next months in LLVM, and I may not think 
about looking in every subproject.

The question is not if “they” (I rather have you guys say “we”) are not 
interested, but rather “is anyone opposing to having utilities wrapping / 
manipulating std::chrono in LLVM”. 

Thanks,

— 
Mehdi


> In any case, I've put the more
> interesting patches I have in my stack up for review, so you have a
> better idea of what I have in mind. and then we can decide what is the
> fate of the utility functions there.
> cheers,
> pl
> 
> On 6 October 2016 at 18:01, Pavel Labath  wrote:
>> I see one usage of of chrono in the Fuzzer, and that's about it.
>> 
>> On 6 October 2016 at 17:46, Zachary Turner  wrote:
>>> 
>>> I'd love to move over to chrono. For Utility functions such as those you
>>> propose probably we should consider whether they should go into llvm. Does
>>> llvm currently use anything from chrono or have any chrono support functions
>>> yet?
>>> On Thu, Oct 6, 2016 at 5:39 PM Pavel Labath via lldb-dev
>>>  wrote:
 
 Hello all,
 
 in line with the "deinventing the wheel" movement, I'd like to remove the
 TimeValue class from LLDB. I've done some research on a flight this week,
 and as far as I can tell all functionality can be easily replaced with
 appropriate usage of std::chrono::duration and time_point.
 
 The only parts that are missing are the ability to convert to/from legacy
 C types (struct timevalue, struct timespec), which can be replaced by
 utility functions.
 
 Also, I've found one use case particularly cumbersome to write in the c++
 way: writing out a duration as a fractional number of units (e.g.
 milliseconds). So, I'd propose adding the following utility function as 
 well
 (unless someone knows a cleaner way to write this):
 
 template
 double float_duration(DurIn dur) {
  return std::chrono::duration_cast>>> DurOut::period>>(dur).count();
 }
 
 Then, you can write float_duration(dur) to get the duration
 as a fractional number of milliseconds (used in printing time deltas in a
 human readable fashion).
 
 Any thoughts or objections?
 
 pl
 ___
 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 mailing list
lldb-dev@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-dev


Re: [lldb-dev] fate of TimeValue

2016-10-07 Thread Pavel Labath via lldb-dev
On 7 October 2016 at 21:42, Mehdi Amini  wrote:
>
>> On Oct 7, 2016, at 9:30 PM, Pavel Labath via lldb-dev 
>>  wrote:
>>
>> The llvm-dev thread seems to have fizzed out - I would assume they are
>> not interested in std::chrono.
>
> I suggest a totally different course of action: any utility (except specific 
> to the debugger for some reason) should be submitted into LLVM (Support?).
> I may be happy to have it available next months in LLVM, and I may not think 
> about looking in every subproject.
>
> The question is not if “they” (I rather have you guys say “we”) are not 
> interested, but rather “is anyone opposing to having utilities wrapping / 
> manipulating std::chrono in LLVM”.
>

I like that idea. I've added you to the reviews so you can see what
kind of utility functions I am talking about. BTW, LLVM seems to have
a TimeValue class as well (presumably because not all compilers used
to support std::chrono) - one possibility would be to start using that
instead, although I would prefer std::chrono.
___
lldb-dev mailing list
lldb-dev@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-dev


Re: [lldb-dev] fate of TimeValue

2016-10-07 Thread Mehdi Amini via lldb-dev

> On Oct 7, 2016, at 10:19 PM, Pavel Labath  wrote:
> 
> On 7 October 2016 at 21:42, Mehdi Amini  wrote:
>> 
>>> On Oct 7, 2016, at 9:30 PM, Pavel Labath via lldb-dev 
>>>  wrote:
>>> 
>>> The llvm-dev thread seems to have fizzed out - I would assume they are
>>> not interested in std::chrono.
>> 
>> I suggest a totally different course of action: any utility (except specific 
>> to the debugger for some reason) should be submitted into LLVM (Support?).
>> I may be happy to have it available next months in LLVM, and I may not think 
>> about looking in every subproject.
>> 
>> The question is not if “they” (I rather have you guys say “we”) are not 
>> interested, but rather “is anyone opposing to having utilities wrapping / 
>> manipulating std::chrono in LLVM”.
>> 
> 
> I like that idea. I've added you to the reviews so you can see what
> kind of utility functions I am talking about. BTW, LLVM seems to have
> a TimeValue class as well (presumably because not all compilers used
> to support std::chrono)

I believe TimeValue was created before std::chrono was standardized (first 
committed in 2004!)

> - one possibility would be to start using that
> instead, although I would prefer std::chrono.

Indeed, I believe we tend to move to the standard version of our utilities when 
the feature is complete in the compiler versions we support. 

It is also possible that not all of TimeValue features are supported by 
std::chrono, I haven't compared in detail.

— 
Mehdi

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