Re: [Lldb-commits] [PATCH] D14740: Define LLDB_DISABLE_CURSES as a fallback for missing curses(3) or panel(3)

2015-11-17 Thread Pavel Labath via lldb-commits
labath added a subscriber: labath.
labath requested changes to this revision.
labath added a reviewer: labath.
labath added a comment.
This revision now requires changes to proceed.

I don't approve of automagic dependencies. With this patch it won't be possible 
to force curses usage. Even if you specify -DLLDB_DISABLE_CURSES=0, it will 
still build (sure, it will show a message about not being found, but who reads 
those...) even if it can't find the library, leading to surprises further down 
the line. I recommend doing one of the following:

- Leave things as they are. It is already possible to disable curses with the 
right switch
- Tweak the error message to inform the user of possible actions (but leave it 
a fatal error). E.g., "Curses library not found. Please install the library or 
reconfigure with LLDB_DISABLE_CURSES=0."
- set LLDB_DISABLE_CURSES=1 on netbsd only. (less magic, it only depends on the 
platform, not it's runtime properties, which can change randomly)


Repository:
  rL LLVM

http://reviews.llvm.org/D14740



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


Re: [Lldb-commits] [PATCH] D14633: [LLDB][MIPS] Clear bug 25194 - LLDB-Server Assertion raised when single stepping on MIPS

2015-11-17 Thread Sagar Thakur via lldb-commits
sagar added a comment.

Hi @tberghammer,

I tried using RegisterValue::SetUInt() instead of RegisterValue::SetBytes(). 
When using RegisterValue::SetUInt() all register values we get are zero in case 
of mips32 big endian machine. The 
GDBRemoteCommunicationServerLLGS::SendStopReplyPacketForThread() and 
GDBRemoteCommunicationServerLLGS::Handle_p() function implementations retrieve 
a pointer to register value by calling RegisterValue::GetBytes() which in turn 
retrieves a pointer to value from Scalar::GetBytes() in cases if type of 
RegisterValue is eTypeUInt*. But Scalar::GetBytes() does not seem to handle 
endianness correctly. As a workaround I made RegisterValue::GetBytes() retrieve 
the pointer to register value from its bytes buffer for all cases and also 
called SetBytes from RegisterValue::SetUInt() like this :

> diff --git a/source/Core/RegisterValue.cpp b/source/Core/RegisterValue.cpp

> index d4ba998..ec8bfb8 100644

> --- a/source/Core/RegisterValue.cpp

> +++ b/source/Core/RegisterValue.cpp

> @@ -822,7 +822,7 @@ RegisterValue::GetBytes () const

>  case eTypeUInt128:

>  case eTypeFloat:

>  case eTypeDouble:

> -case eTypeLongDouble:   return m_scalar.GetBytes();

> +case eTypeLongDouble:

>  case eTypeBytes:return buffer.bytes;

>  }

>  return NULL;

> @@ -841,7 +841,7 @@ RegisterValue::GetBytes ()

>  case eTypeUInt128:

>  case eTypeFloat:

>  case eTypeDouble:

> -case eTypeLongDouble:   return m_scalar.GetBytes();

> +case eTypeLongDouble:

>  case eTypeBytes:return buffer.bytes;

>  }

>  return NULL;

> @@ -896,6 +896,7 @@ RegisterValue::SetUInt (uint64_t uint, uint32_t byte_size)

>  }

>  else

>  return false;

> +SetBytes (&uint, byte_size, GetByteOrder());

>  return true;

>  }


If this looks good I will submit a separate patch for the same.
Should we use the above mentioned workaround or use RegisterValue::SetBytes as 
before? Kindly let me know if you have any other suggestions.

Regards,
Sagar


Repository:
  rL LLVM

http://reviews.llvm.org/D14633



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


Re: [Lldb-commits] [PATCH] D14740: Define LLDB_DISABLE_CURSES as a fallback for missing curses(3) or panel(3)

2015-11-17 Thread Kamil Rytarowski via lldb-commits
krytarowski abandoned this revision.
krytarowski added a comment.

I resign from this change. I will just go for -DLLDB_DISABLE_CURSES from 
command line on NetBSD-7.0.


Repository:
  rL LLVM

http://reviews.llvm.org/D14740



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


Re: [Lldb-commits] New llvm build server account request

2015-11-17 Thread Kamil Rytarowski via lldb-commits
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

Hello Ying,

Regarding the NetBSD buildbot for LLDB one NetBSD we need a tweak.

Please test for the existence (only on NetBSD) of a file
/usr/include/panel.h. If it's missing please add
'-DLLDB_DISABLE_CURSES' to CMake configure arguments.

if [ ! -f /usr/include/panel.h ]; then
# Add this line to the CMake configure arguments on NetBSD
echo "-DLLDB_DISABLE_CURSES"
fi

This change is for both: staging and master build farm. I'm going to
switch the NetBSD7 buildbot to the master one soon, once it will build
the sources properly.
-BEGIN PGP SIGNATURE-
Version: GnuPG v2

iQIcBAEBCAAGBQJWSxDFAAoJEEuzCOmwLnZsvDQQAKJKGGvRUIVACZmcYQbhcWuE
Ee6iH+aWFp0fg+my6krKGEPHFSgQ0J5/Hq7Ud/lJZLeJq990UNMhybXFlntPDZgb
GmGTHgNgTzH/J1+QXE4/3rqO4oKWMqynPPfDDvNyv0D8CDlFzToL+40lFdKk1We+
icRJM1L4eUzPa3NDFKoPB17KS4l9unb1A0WdrK8XHwuxaxrkTtA79teXc+5bWjvX
DyDk/Q9Awnjx6M30WL2yqQ1AWaMKUEjAPh4nl29b/q4vr+JxP0xEhOfq1bOqs4z8
NsNwd3bLJN9xlngWL12RFwOSeB4o4LTzvfRrA1shZhPN1dwYs5oH7T/0GtnC2i4U
FMVQDpYTXpymZXJznuzGvTDYhUO2On76BklUevLxciPhpwhap+80aLq44kP3XxTK
+BonLN35thYlruHoPD52OFds+nXbytU6tC9vCVZXgK+4Nhryag/ffmQ8XGkyxL9c
CrTmAQVV5FsVuwwZVLKR7U6ohHJAkHEbHXchP0Y9DHWCh7eSpI4OYcBhWUEtrWYq
EddvRoSqbD5P5tmiOMExIh9SdYCgMSf9FHJ7wdTZY6Ye5kmmP305+JZu4QGdbrgx
4LW0rzBOVRScaKm6KGrJDYIyPQBDY5J8vIuWSlUK7oYVq7/3/9Lny9dcyPhGmrS4
EUJ/75S1VItcntQhqX4l
=QhzH
-END PGP SIGNATURE-
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


Re: [Lldb-commits] [PATCH] D14633: [LLDB][MIPS] Clear bug 25194 - LLDB-Server Assertion raised when single stepping on MIPS

2015-11-17 Thread Tamas Berghammer via lldb-commits
tberghammer added a comment.

As far as I know the gdb remote protocol says that the registers in the 'p' 
packet should be displayed in target byte order, but the protocol isn't too 
well specified (and in my opinion target byte order is a silly decision).

If we accept that the 'p' packet is in target byte order then I think using 
SetUInt works as intended in the current implementation and then we should fix 
the client side to interpret the register value as target byte order.

I am also happy with the option of saying that we always send the register 
values as little endian but in that case my preferred way would be to use 
SetUInt without changing it's meaning and then doing the byte swapping (if 
needed) when we write the data into the response buffer 
(WriteRegisterValueInHexFixedWidth). The reason behind it is that if we want to 
use the ReadRegister call in lldb-server (e.g. software single stepping) then I 
would expect it to return the data in target byte order and this change would 
break this assumption.

Additional info is that the current implementation works well if the client and 
the server use the same byte order. If we fix the communication to be in little 
endian then we will still have to fix the server 
(GDBRemoteRegisterContext::PrivateSetRegisterValue) to handle the case when 
lldb runs on a big endian machine.


Repository:
  rL LLVM

http://reviews.llvm.org/D14633



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


Re: [Lldb-commits] [lldb] r253317 - Add Pythonic language binding wrapper generation script.

2015-11-17 Thread Zachary Turner via lldb-commits
Is there any way to have the step that runs the swig executable not be part
of this script?  Seems like running swig should be a build step, and
running these scripts on the output of swig should be a step that follows

On Mon, Nov 16, 2015 at 11:20 PM Todd Fiala via lldb-commits <
lldb-commits@lists.llvm.org> wrote:

> Author: tfiala
> Date: Tue Nov 17 01:17:38 2015
> New Revision: 253317
>
> URL: http://llvm.org/viewvc/llvm-project?rev=253317&view=rev
> Log:
> Add Pythonic language binding wrapper generation script.
>
> This is only used by Xcode at the moment.  It replaces the
> buildSwigWrapperClasses.py and related per-script-language
> scripts.  It also fixes a couple bugs in those w/r/t Xcode
> usage:
>
> * the presence of the GCC_PREPROCESSOR_DEFINITIONS env var
>   should not be short-circuiting generation of the language
>   binding; rather, only if LLDB_DISABLE_PYTHON is present
>   within that environment variable.
>
> * some logic around what to do when building in "non-Makefile"
>   mode.  I've switched the handling of that to be on a
>   "--framework" flag - if specified, we build an OS X-style
>   framework; otherwise, we go with non.
>
> Putting this up now only attached to the Xcode build so
> others can look at it but not be affected by it yet.
> After this, I'll tackle the finalizer, along with trying
> it locally on Linux.
>
> Added:
> lldb/trunk/scripts/Python/prepare_binding_Python.py
> lldb/trunk/scripts/prepare_bindings.py   (with props)
> Modified:
> lldb/trunk/lldb.xcodeproj/project.pbxproj
>
> Modified: lldb/trunk/lldb.xcodeproj/project.pbxproj
> URL:
> http://llvm.org/viewvc/llvm-project/lldb/trunk/lldb.xcodeproj/project.pbxproj?rev=253317&r1=253316&r2=253317&view=diff
>
> ==
> --- lldb/trunk/lldb.xcodeproj/project.pbxproj (original)
> +++ lldb/trunk/lldb.xcodeproj/project.pbxproj Tue Nov 17 01:17:38 2015
> @@ -5984,7 +5984,7 @@
> isa = PBXNativeTarget;
> buildConfigurationList = 2668020B115FD0EE008E1FE4
> /* Build configuration list for PBXNativeTarget "LLDB" */;
> buildPhases = (
> -   26DC6A5813380D4300FF7998 /* Build swig
> wrapper classes */,
> +   26DC6A5813380D4300FF7998 /* Prepare Swig
> Bindings */,
> 26680202115FD0ED008E1FE4 /* Headers */,
> 26680203115FD0ED008E1FE4 /* Resources */,
> 26680204115FD0ED008E1FE4 /* Sources */,
> @@ -6214,19 +6214,19 @@
> shellPath = /bin/sh;
> shellScript = "perl $SRCROOT/scripts/build-llvm.pl
> ";
> };
> -   26DC6A5813380D4300FF7998 /* Build swig wrapper classes */
> = {
> +   26DC6A5813380D4300FF7998 /* Prepare Swig Bindings */ = {
> isa = PBXShellScriptBuildPhase;
> buildActionMask = 2147483647;
> files = (
> );
> inputPaths = (
> );
> -   name = "Build swig wrapper classes";
> +   name = "Prepare Swig Bindings";
> outputPaths = (
> );
> runOnlyForDeploymentPostprocessing = 0;
> -   shellPath = /bin/sh;
> -   shellScript =
> "$SRCROOT/scripts/build-swig-wrapper-classes.sh $SRCROOT $TARGET_BUILD_DIR
> $CONFIGURATION_BUILD_DIR \"\"\n";
> +   shellPath = /bin/bash;
> +   shellScript = "/usr/bin/python
> $SRCROOT/scripts/prepare_bindings.py --framework --src-root $SRCROOT
> --target-dir $TARGET_BUILD_DIR --config-build-dir $CONFIGURATION_BUILD_DIR
> --swig-executable `which swig`";
> };
> 4959511A1A1ACE9500F6F8FC /* Install Clang compiler headers
> */ = {
> isa = PBXShellScriptBuildPhase;
>
> Added: lldb/trunk/scripts/Python/prepare_binding_Python.py
> URL:
> http://llvm.org/viewvc/llvm-project/lldb/trunk/scripts/Python/prepare_binding_Python.py?rev=253317&view=auto
>
> ==
> --- lldb/trunk/scripts/Python/prepare_binding_Python.py (added)
> +++ lldb/trunk/scripts/Python/prepare_binding_Python.py Tue Nov 17
> 01:17:38 2015
> @@ -0,0 +1,435 @@
> +"""
> + The LLVM Compiler Infrastructure
> +
> +This file is distributed under the University of Illinois Open Source
> +License. See LICENSE.TXT for details.
> +
> +Python binding preparation script.
> +"""
> +
> +# Python modules:
> +from __future__ import print_function
> +
> +import logging
> +import os
> +import re
> +import shutil
> +import subprocess
> +import sys
> +
> +
> +class SwigSettings(object):
> +"""Provides 

Re: [Lldb-commits] [lldb] r253317 - Add Pythonic language binding wrapper generation script.

2015-11-17 Thread Todd Fiala via lldb-commits
Yes, I am planning on separating out the usage of the swig output from the
massaging of that into the build.

Right now I'm just in phase 1, which is to clean up the existing process
without modifying it, and adopting it on Xcode.

Humorously, with our recent removal of the searching for swig in the python
scripts (which our OS X CI depends on, but since we weren't using the
Python ones, I didn't detect), I ended breaking our CI.  I'm adding the
searching back in.

On Tue, Nov 17, 2015 at 8:12 AM, Zachary Turner  wrote:

> Is there any way to have the step that runs the swig executable not be
> part of this script?  Seems like running swig should be a build step, and
> running these scripts on the output of swig should be a step that follows
>
> On Mon, Nov 16, 2015 at 11:20 PM Todd Fiala via lldb-commits <
> lldb-commits@lists.llvm.org> wrote:
>
>> Author: tfiala
>> Date: Tue Nov 17 01:17:38 2015
>> New Revision: 253317
>>
>> URL: http://llvm.org/viewvc/llvm-project?rev=253317&view=rev
>> Log:
>> Add Pythonic language binding wrapper generation script.
>>
>> This is only used by Xcode at the moment.  It replaces the
>> buildSwigWrapperClasses.py and related per-script-language
>> scripts.  It also fixes a couple bugs in those w/r/t Xcode
>> usage:
>>
>> * the presence of the GCC_PREPROCESSOR_DEFINITIONS env var
>>   should not be short-circuiting generation of the language
>>   binding; rather, only if LLDB_DISABLE_PYTHON is present
>>   within that environment variable.
>>
>> * some logic around what to do when building in "non-Makefile"
>>   mode.  I've switched the handling of that to be on a
>>   "--framework" flag - if specified, we build an OS X-style
>>   framework; otherwise, we go with non.
>>
>> Putting this up now only attached to the Xcode build so
>> others can look at it but not be affected by it yet.
>> After this, I'll tackle the finalizer, along with trying
>> it locally on Linux.
>>
>> Added:
>> lldb/trunk/scripts/Python/prepare_binding_Python.py
>> lldb/trunk/scripts/prepare_bindings.py   (with props)
>> Modified:
>> lldb/trunk/lldb.xcodeproj/project.pbxproj
>>
>> Modified: lldb/trunk/lldb.xcodeproj/project.pbxproj
>> URL:
>> http://llvm.org/viewvc/llvm-project/lldb/trunk/lldb.xcodeproj/project.pbxproj?rev=253317&r1=253316&r2=253317&view=diff
>>
>> ==
>> --- lldb/trunk/lldb.xcodeproj/project.pbxproj (original)
>> +++ lldb/trunk/lldb.xcodeproj/project.pbxproj Tue Nov 17 01:17:38 2015
>> @@ -5984,7 +5984,7 @@
>> isa = PBXNativeTarget;
>> buildConfigurationList = 2668020B115FD0EE008E1FE4
>> /* Build configuration list for PBXNativeTarget "LLDB" */;
>> buildPhases = (
>> -   26DC6A5813380D4300FF7998 /* Build swig
>> wrapper classes */,
>> +   26DC6A5813380D4300FF7998 /* Prepare Swig
>> Bindings */,
>> 26680202115FD0ED008E1FE4 /* Headers */,
>> 26680203115FD0ED008E1FE4 /* Resources */,
>> 26680204115FD0ED008E1FE4 /* Sources */,
>> @@ -6214,19 +6214,19 @@
>> shellPath = /bin/sh;
>> shellScript = "perl $SRCROOT/scripts/
>> build-llvm.pl";
>> };
>> -   26DC6A5813380D4300FF7998 /* Build swig wrapper classes */
>> = {
>> +   26DC6A5813380D4300FF7998 /* Prepare Swig Bindings */ = {
>> isa = PBXShellScriptBuildPhase;
>> buildActionMask = 2147483647;
>> files = (
>> );
>> inputPaths = (
>> );
>> -   name = "Build swig wrapper classes";
>> +   name = "Prepare Swig Bindings";
>> outputPaths = (
>> );
>> runOnlyForDeploymentPostprocessing = 0;
>> -   shellPath = /bin/sh;
>> -   shellScript =
>> "$SRCROOT/scripts/build-swig-wrapper-classes.sh $SRCROOT $TARGET_BUILD_DIR
>> $CONFIGURATION_BUILD_DIR \"\"\n";
>> +   shellPath = /bin/bash;
>> +   shellScript = "/usr/bin/python
>> $SRCROOT/scripts/prepare_bindings.py --framework --src-root $SRCROOT
>> --target-dir $TARGET_BUILD_DIR --config-build-dir $CONFIGURATION_BUILD_DIR
>> --swig-executable `which swig`";
>> };
>> 4959511A1A1ACE9500F6F8FC /* Install Clang compiler
>> headers */ = {
>> isa = PBXShellScriptBuildPhase;
>>
>> Added: lldb/trunk/scripts/Python/prepare_binding_Python.py
>> URL:
>> http://llvm.org/viewvc/llvm-project/lldb/trunk/scripts/Python/prepare_binding_Python.py?rev=253317&view=auto
>>
>> ===

Re: [Lldb-commits] [lldb] r253317 - Add Pythonic language binding wrapper generation script.

2015-11-17 Thread Todd Fiala via lldb-commits
Breaking out the binding generation into a separate step will also be
important for a couple reasons:

* (from before) I want to eliminate the requirement for the vast majority
of the builds to have a swig on their system, and

* (not stated before) we'd like to move away from swig for binding
generation at some point.

-Todd

On Tue, Nov 17, 2015 at 8:15 AM, Todd Fiala  wrote:

> Yes, I am planning on separating out the usage of the swig output from the
> massaging of that into the build.
>
> Right now I'm just in phase 1, which is to clean up the existing process
> without modifying it, and adopting it on Xcode.
>
> Humorously, with our recent removal of the searching for swig in the
> python scripts (which our OS X CI depends on, but since we weren't using
> the Python ones, I didn't detect), I ended breaking our CI.  I'm adding the
> searching back in.
>
> On Tue, Nov 17, 2015 at 8:12 AM, Zachary Turner 
> wrote:
>
>> Is there any way to have the step that runs the swig executable not be
>> part of this script?  Seems like running swig should be a build step, and
>> running these scripts on the output of swig should be a step that follows
>>
>> On Mon, Nov 16, 2015 at 11:20 PM Todd Fiala via lldb-commits <
>> lldb-commits@lists.llvm.org> wrote:
>>
>>> Author: tfiala
>>> Date: Tue Nov 17 01:17:38 2015
>>> New Revision: 253317
>>>
>>> URL: http://llvm.org/viewvc/llvm-project?rev=253317&view=rev
>>> Log:
>>> Add Pythonic language binding wrapper generation script.
>>>
>>> This is only used by Xcode at the moment.  It replaces the
>>> buildSwigWrapperClasses.py and related per-script-language
>>> scripts.  It also fixes a couple bugs in those w/r/t Xcode
>>> usage:
>>>
>>> * the presence of the GCC_PREPROCESSOR_DEFINITIONS env var
>>>   should not be short-circuiting generation of the language
>>>   binding; rather, only if LLDB_DISABLE_PYTHON is present
>>>   within that environment variable.
>>>
>>> * some logic around what to do when building in "non-Makefile"
>>>   mode.  I've switched the handling of that to be on a
>>>   "--framework" flag - if specified, we build an OS X-style
>>>   framework; otherwise, we go with non.
>>>
>>> Putting this up now only attached to the Xcode build so
>>> others can look at it but not be affected by it yet.
>>> After this, I'll tackle the finalizer, along with trying
>>> it locally on Linux.
>>>
>>> Added:
>>> lldb/trunk/scripts/Python/prepare_binding_Python.py
>>> lldb/trunk/scripts/prepare_bindings.py   (with props)
>>> Modified:
>>> lldb/trunk/lldb.xcodeproj/project.pbxproj
>>>
>>> Modified: lldb/trunk/lldb.xcodeproj/project.pbxproj
>>> URL:
>>> http://llvm.org/viewvc/llvm-project/lldb/trunk/lldb.xcodeproj/project.pbxproj?rev=253317&r1=253316&r2=253317&view=diff
>>>
>>> ==
>>> --- lldb/trunk/lldb.xcodeproj/project.pbxproj (original)
>>> +++ lldb/trunk/lldb.xcodeproj/project.pbxproj Tue Nov 17 01:17:38 2015
>>> @@ -5984,7 +5984,7 @@
>>> isa = PBXNativeTarget;
>>> buildConfigurationList =
>>> 2668020B115FD0EE008E1FE4 /* Build configuration list for PBXNativeTarget
>>> "LLDB" */;
>>> buildPhases = (
>>> -   26DC6A5813380D4300FF7998 /* Build swig
>>> wrapper classes */,
>>> +   26DC6A5813380D4300FF7998 /* Prepare Swig
>>> Bindings */,
>>> 26680202115FD0ED008E1FE4 /* Headers */,
>>> 26680203115FD0ED008E1FE4 /* Resources */,
>>> 26680204115FD0ED008E1FE4 /* Sources */,
>>> @@ -6214,19 +6214,19 @@
>>> shellPath = /bin/sh;
>>> shellScript = "perl $SRCROOT/scripts/
>>> build-llvm.pl";
>>> };
>>> -   26DC6A5813380D4300FF7998 /* Build swig wrapper classes
>>> */ = {
>>> +   26DC6A5813380D4300FF7998 /* Prepare Swig Bindings */ = {
>>> isa = PBXShellScriptBuildPhase;
>>> buildActionMask = 2147483647;
>>> files = (
>>> );
>>> inputPaths = (
>>> );
>>> -   name = "Build swig wrapper classes";
>>> +   name = "Prepare Swig Bindings";
>>> outputPaths = (
>>> );
>>> runOnlyForDeploymentPostprocessing = 0;
>>> -   shellPath = /bin/sh;
>>> -   shellScript =
>>> "$SRCROOT/scripts/build-swig-wrapper-classes.sh $SRCROOT $TARGET_BUILD_DIR
>>> $CONFIGURATION_BUILD_DIR \"\"\n";
>>> +   shellPath = /bin/bash;
>>> +   shellScript = "/usr/bin/python
>>> $SRCROOT/scripts/prepare_bindings.py --framework --src-root $SRCROOT
>>> --target-dir $TARGET_BUILD_DIR --config-build-dir

[Lldb-commits] [lldb] r253346 - Added --find-swig option to allow searching for swig in path or other likely locations.

2015-11-17 Thread Todd Fiala via lldb-commits
Author: tfiala
Date: Tue Nov 17 11:13:06 2015
New Revision: 253346

URL: http://llvm.org/viewvc/llvm-project?rev=253346&view=rev
Log:
Added --find-swig option to allow searching for swig in path or other likely 
locations.

Modified:
lldb/trunk/scripts/prepare_bindings.py

Modified: lldb/trunk/scripts/prepare_bindings.py
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/scripts/prepare_bindings.py?rev=253346&r1=253345&r2=253346&view=diff
==
--- lldb/trunk/scripts/prepare_bindings.py (original)
+++ lldb/trunk/scripts/prepare_bindings.py Tue Nov 17 11:13:06 2015
@@ -13,6 +13,7 @@ to see a description of the supported co
 import argparse
 import logging
 import os
+import platform
 import sys
 
 
@@ -117,6 +118,13 @@ def process_args(args):
 "Configuration build dir, will use python module path "
 "if unspecified."))
 parser.add_argument(
+"--find-swig",
+action="store_true",
+help=(
+"Indicates the swig executable should be searched for "
+"if not eplicitly provided.  Either this or the explicit "
+"swig executable option must be provided."))
+parser.add_argument(
 "--framework",
 action="store_true",
 help="Prepare as OS X-style framework.")
@@ -170,6 +178,63 @@ def process_args(args):
 return options
 
 
+def find_file_in_paths(paths, exe_basename):
+"""Returns the full exe path for the first path match.
+
+@params paths the list of directories to search for the exe_basename
+executable
+@params exe_basename the name of the file for which to search.
+e.g. "swig" or "swig.exe".
+
+@return the full path to the executable if found in one of the
+given paths; otherwise, returns None.
+"""
+for path in paths:
+trial_exe_path = os.path.join(path, exe_basename)
+if os.path.exists(trial_exe_path):
+return os.path.normcase(trial_exe_path)
+return None
+
+
+def find_swig_executable(options):
+"""Finds the swig executable in the PATH or known good locations.
+
+Replaces options.swig_executable with the full swig executable path.
+"""
+# Figure out what we're looking for.
+if platform.system() == 'Windows':
+exe_basename = "swig.exe"
+extra_dirs = []
+else:
+exe_basename = "swig"
+extra_dirs = ["/usr/local/bin"]
+
+# Figure out what paths to check.
+path_env = os.environ.get("PATH", None)
+if path_env is not None:
+paths_to_check = path_env.split(os.path.pathsep)
+else:
+paths_to_check = []
+
+# Add in the extra dirs
+paths_to_check.extend(extra_dirs)
+if len(paths_to_check) < 1:
+logging.error(
+"swig executable was not specified, PATH has no "
+"contents, and there are no extra directories to search")
+sys.exit(-6)
+
+# Find the swig executable
+options.swig_executable = find_file_in_paths(paths_to_check, exe_basename)
+if not options.swig_executable or len(options.swig_executable) < 1:
+logging.error(
+"failed to find exe='%s' in paths='%s'",
+exe_basename,
+paths_to_check)
+sys.exit(-6)
+logging.info("found swig executable: %s", options.swig_executable)
+
+
 def main(args):
 """Drives the main script preparation steps.
 
@@ -179,6 +244,17 @@ def main(args):
 options = process_args(args)
 logging.debug("Processed args: options=%s", options)
 
+# Ensure we have a swig executable.
+if not options.swig_executable or len(options.swig_executable) == 0:
+if options.find_swig:
+find_swig_executable(options)
+else:
+logging.error(
+"The --find-swig option must be specified "
+"when the swig executable location is not "
+"explicitly provided.")
+sys.exit(-12)
+
 # Check if the swig file exists.
 swig_path = os.path.normcase(
 os.path.join(options.src_root, "scripts", "lldb.swig"))


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


[Lldb-commits] [lldb] r253347 - Reinstate Xcode project usage of prepare_bindings.py, with new --find-swig option set.

2015-11-17 Thread Todd Fiala via lldb-commits
Author: tfiala
Date: Tue Nov 17 11:13:09 2015
New Revision: 253347

URL: http://llvm.org/viewvc/llvm-project?rev=253347&view=rev
Log:
Reinstate Xcode project usage of prepare_bindings.py, with new --find-swig 
option set.

Modified:
lldb/trunk/lldb.xcodeproj/project.pbxproj

Modified: lldb/trunk/lldb.xcodeproj/project.pbxproj
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/lldb.xcodeproj/project.pbxproj?rev=253347&r1=253346&r2=253347&view=diff
==
--- lldb/trunk/lldb.xcodeproj/project.pbxproj (original)
+++ lldb/trunk/lldb.xcodeproj/project.pbxproj Tue Nov 17 11:13:09 2015
@@ -5984,7 +5984,7 @@
isa = PBXNativeTarget;
buildConfigurationList = 2668020B115FD0EE008E1FE4 /* 
Build configuration list for PBXNativeTarget "LLDB" */;
buildPhases = (
-   26DC6A5813380D4300FF7998 /* Build swig wrapper 
classes */,
+   26DC6A5813380D4300FF7998 /* Prepare Swig 
Bindings */,
26680202115FD0ED008E1FE4 /* Headers */,
26680203115FD0ED008E1FE4 /* Resources */,
26680204115FD0ED008E1FE4 /* Sources */,
@@ -6214,19 +6214,19 @@
shellPath = /bin/sh;
shellScript = "perl $SRCROOT/scripts/build-llvm.pl";
};
-   26DC6A5813380D4300FF7998 /* Build swig wrapper classes */ = {
+   26DC6A5813380D4300FF7998 /* Prepare Swig Bindings */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
);
-   name = "Build swig wrapper classes";
+   name = "Prepare Swig Bindings";
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
-   shellPath = /bin/sh;
-   shellScript = 
"$SRCROOT/scripts/build-swig-wrapper-classes.sh $SRCROOT $TARGET_BUILD_DIR 
$CONFIGURATION_BUILD_DIR \"\"\n";
+   shellPath = /bin/bash;
+   shellScript = "/usr/bin/python 
$SRCROOT/scripts/prepare_bindings.py --find-swig --framework --src-root 
$SRCROOT --target-dir $TARGET_BUILD_DIR --config-build-dir 
$CONFIGURATION_BUILD_DIR --swig-executable `which swig`";
};
4959511A1A1ACE9500F6F8FC /* Install Clang compiler headers */ = 
{
isa = PBXShellScriptBuildPhase;


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


Re: [Lldb-commits] [PATCH] D14633: [LLDB][MIPS] Clear bug 25194 - LLDB-Server Assertion raised when single stepping on MIPS

2015-11-17 Thread Greg Clayton via lldb-commits
clayborg added a comment.

GDB remote protocol specifies that register values are sent in target byte 
order. We shouldn't change this. A big endian system should not send things as 
little endian. That being said, the current register context assumes you have a 
buffer that can contain all registers and that buffer is encoded using the byte 
order that is specified in the DataExtractor.

It is also quite silly that the MIPS register context is reading all registers 
from the ptrace wrapper just to get one single register. RegisterContextDarwin 
reads all GPRs in a single call and marks all of them valid at once and then 
extracting a register goes something like:

if (RegisterIsGPR(value.info))
{

  ReadGPRsIfWeAlreadyHavent();
  // Extract register from buffer.

}
else if (RegiserIsFPU(value.info))
{

  ReadFPUsIfWeAlreadyHavent();
  // Extract register from buffer.

}

etc..


Repository:
  rL LLVM

http://reviews.llvm.org/D14633



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


[Lldb-commits] [lldb] r253353 - Remove --swig-executable `which swig` from Xcode prepare_bindings.py call.

2015-11-17 Thread Todd Fiala via lldb-commits
Author: tfiala
Date: Tue Nov 17 12:10:54 2015
New Revision: 253353

URL: http://llvm.org/viewvc/llvm-project?rev=253353&view=rev
Log:
Remove --swig-executable `which swig` from Xcode prepare_bindings.py call.

This is no longer needed with --find-swig, and although innocuous on systems 
with
swig in the path, it blows up when there is no swig in the path.  This should
have been removed in the prior check-in.

Modified:
lldb/trunk/lldb.xcodeproj/project.pbxproj

Modified: lldb/trunk/lldb.xcodeproj/project.pbxproj
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/lldb.xcodeproj/project.pbxproj?rev=253353&r1=253352&r2=253353&view=diff
==
--- lldb/trunk/lldb.xcodeproj/project.pbxproj (original)
+++ lldb/trunk/lldb.xcodeproj/project.pbxproj Tue Nov 17 12:10:54 2015
@@ -6226,7 +6226,7 @@
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/bash;
-   shellScript = "/usr/bin/python 
$SRCROOT/scripts/prepare_bindings.py --find-swig --framework --src-root 
$SRCROOT --target-dir $TARGET_BUILD_DIR --config-build-dir 
$CONFIGURATION_BUILD_DIR --swig-executable `which swig`";
+   shellScript = "/usr/bin/python 
$SRCROOT/scripts/prepare_bindings.py --find-swig --framework --src-root 
$SRCROOT --target-dir $TARGET_BUILD_DIR --config-build-dir 
$CONFIGURATION_BUILD_DIR";
};
4959511A1A1ACE9500F6F8FC /* Install Clang compiler headers */ = 
{
isa = PBXShellScriptBuildPhase;


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


Re: [Lldb-commits] [lldb] r253317 - Add Pythonic language binding wrapper generation script.

2015-11-17 Thread Zachary Turner via lldb-commits
On Tue, Nov 17, 2015 at 8:18 AM Todd Fiala  wrote:

> Breaking out the binding generation into a separate step will also be
> important for a couple reasons:
>
> * (from before) I want to eliminate the requirement for the vast majority
> of the builds to have a swig on their system, and
>
> * (not stated before) we'd like to move away from swig for binding
> generation at some point.
>
> -Todd
>

Unless these plans (i.e. moving away from swig) are imminent, I would
prefer to keep the binding generation step automatic so people can use
whatever swig version is installed on their system.  I know there are pros
and cons to each, but at the end of the day, we need various bugfixes from
newer versions of SWIG for the Python 3 stuff, and if someone decides they
want bindings for Go, or Rust, or some other languages, they too might need
a different minimum SWIG version.  We could start checking in multiple sets
of generated bindings, but then we start having multiple maintainers, and
the checked in bindings become out of sync with each other, and it's more
trouble than it's worth.

We have buildbots building and testing the various configurations, so if
someone uses something that is incompatible we shoudl catch it.  And just
yesterday I added some options to the @expectedFailure and @skipIf
decorators that allow you to skip tests based on the SWIG version and/or
python version.

Letting people using the SWIG on their system is the easiest way to ensure
that everyone's needs are still met while still getting early notification
when someone does something incompatible, and it can be fixed.
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [lldb] r253364 - Move this back to a pid_t; this file is OSX only anyway, and the signedness of pid_t is actually a thing we want here

2015-11-17 Thread Enrico Granata via lldb-commits
Author: enrico
Date: Tue Nov 17 13:35:26 2015
New Revision: 253364

URL: http://llvm.org/viewvc/llvm-project?rev=253364&view=rev
Log:
Move this back to a pid_t; this file is OSX only anyway, and the signedness of 
pid_t is actually a thing we want here

Modified:

lldb/trunk/source/Plugins/Platform/MacOSX/PlatformiOSSimulatorCoreSimulatorSupport.mm

Modified: 
lldb/trunk/source/Plugins/Platform/MacOSX/PlatformiOSSimulatorCoreSimulatorSupport.mm
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Platform/MacOSX/PlatformiOSSimulatorCoreSimulatorSupport.mm?rev=253364&r1=253363&r2=253364&view=diff
==
--- 
lldb/trunk/source/Plugins/Platform/MacOSX/PlatformiOSSimulatorCoreSimulatorSupport.mm
 (original)
+++ 
lldb/trunk/source/Plugins/Platform/MacOSX/PlatformiOSSimulatorCoreSimulatorSupport.mm
 Tue Nov 17 13:35:26 2015
@@ -47,7 +47,7 @@ using namespace lldb_utility;
 - (NSUInteger) state;
 - (BOOL) shutdownWithError:(NSError **)error;
 - (NSUUID *) UDID;
-- (lldb::pid_t) spawnWithPath:(NSString *)path options:(NSDictionary *)options 
terminationHandler:(void (^)(int status)) terminationHandler error:(NSError 
**)error;
+- (pid_t) spawnWithPath:(NSString *)path options:(NSDictionary *)options 
terminationHandler:(void (^)(int status)) terminationHandler error:(NSError 
**)error;
 @end
 
 CoreSimulatorSupport::Process::Process (lldb::pid_t p) :
@@ -661,7 +661,7 @@ CoreSimulatorSupport::Device::Spawn (Pro
 
 NSError* nserror;
 
-lldb::pid_t pid = [m_dev spawnWithPath: [NSString stringWithUTF8String: 
launch_info.GetExecutableFile().GetPath().c_str()]
+pid_t pid = [m_dev spawnWithPath: [NSString stringWithUTF8String: 
launch_info.GetExecutableFile().GetPath().c_str()]
  options: options
   terminationHandler: nil
error: &nserror];


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


Re: [Lldb-commits] New llvm build server account request

2015-11-17 Thread Ying Chen via lldb-commits
Done.
Please let me know if it works for you.

Thanks,
Ying

On Tue, Nov 17, 2015 at 3:34 AM, Kamil Rytarowski  wrote:

> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA256
>
> Hello Ying,
>
> Regarding the NetBSD buildbot for LLDB one NetBSD we need a tweak.
>
> Please test for the existence (only on NetBSD) of a file
> /usr/include/panel.h. If it's missing please add
> '-DLLDB_DISABLE_CURSES' to CMake configure arguments.
>
> if [ ! -f /usr/include/panel.h ]; then
> # Add this line to the CMake configure arguments on NetBSD
> echo "-DLLDB_DISABLE_CURSES"
> fi
>
> This change is for both: staging and master build farm. I'm going to
> switch the NetBSD7 buildbot to the master one soon, once it will build
> the sources properly.
> -BEGIN PGP SIGNATURE-
> Version: GnuPG v2
>
> iQIcBAEBCAAGBQJWSxDFAAoJEEuzCOmwLnZsvDQQAKJKGGvRUIVACZmcYQbhcWuE
> Ee6iH+aWFp0fg+my6krKGEPHFSgQ0J5/Hq7Ud/lJZLeJq990UNMhybXFlntPDZgb
> GmGTHgNgTzH/J1+QXE4/3rqO4oKWMqynPPfDDvNyv0D8CDlFzToL+40lFdKk1We+
> icRJM1L4eUzPa3NDFKoPB17KS4l9unb1A0WdrK8XHwuxaxrkTtA79teXc+5bWjvX
> DyDk/Q9Awnjx6M30WL2yqQ1AWaMKUEjAPh4nl29b/q4vr+JxP0xEhOfq1bOqs4z8
> NsNwd3bLJN9xlngWL12RFwOSeB4o4LTzvfRrA1shZhPN1dwYs5oH7T/0GtnC2i4U
> FMVQDpYTXpymZXJznuzGvTDYhUO2On76BklUevLxciPhpwhap+80aLq44kP3XxTK
> +BonLN35thYlruHoPD52OFds+nXbytU6tC9vCVZXgK+4Nhryag/ffmQ8XGkyxL9c
> CrTmAQVV5FsVuwwZVLKR7U6ohHJAkHEbHXchP0Y9DHWCh7eSpI4OYcBhWUEtrWYq
> EddvRoSqbD5P5tmiOMExIh9SdYCgMSf9FHJ7wdTZY6Ye5kmmP305+JZu4QGdbrgx
> 4LW0rzBOVRScaKm6KGrJDYIyPQBDY5J8vIuWSlUK7oYVq7/3/9Lny9dcyPhGmrS4
> EUJ/75S1VItcntQhqX4l
> =QhzH
> -END PGP SIGNATURE-
>
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [lldb] r253381 - Cleanup the type X clear commands, so that one base class can implement all of them

2015-11-17 Thread Enrico Granata via lldb-commits
Author: enrico
Date: Tue Nov 17 15:43:55 2015
New Revision: 253381

URL: http://llvm.org/viewvc/llvm-project?rev=253381&view=rev
Log:
Cleanup the type X clear commands, so that one base class can implement all of 
them

Modified:
lldb/trunk/source/Commands/CommandObjectType.cpp

Modified: lldb/trunk/source/Commands/CommandObjectType.cpp
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Commands/CommandObjectType.cpp?rev=253381&r1=253380&r2=253381&view=diff
==
--- lldb/trunk/source/Commands/CommandObjectType.cpp (original)
+++ lldb/trunk/source/Commands/CommandObjectType.cpp Tue Nov 17 15:43:55 2015
@@ -1094,31 +1094,9 @@ CommandObjectTypeFormatterDelete::Comman
 
 
 
-//-
-// CommandObjectTypeFormatDelete
-//-
-
-class CommandObjectTypeFormatDelete : public CommandObjectTypeFormatterDelete
-{
-public:
-CommandObjectTypeFormatDelete (CommandInterpreter &interpreter) :
-CommandObjectTypeFormatterDelete (interpreter,
-  eFormatCategoryItemValue | 
eFormatCategoryItemRegexValue,
-  "type format delete",
-  "Delete an existing formatting style 
for a type.")
-{
-}
-
-~CommandObjectTypeFormatDelete () override
-{
-}
-};
 
-//-
-// CommandObjectTypeFormatClear
-//-
 
-class CommandObjectTypeFormatClear : public CommandObjectParsed
+class CommandObjectTypeFormatterClear : public CommandObjectParsed
 {
 private:
 
@@ -1169,13 +1147,12 @@ private:
 static OptionDefinition g_option_table[];
 
 // Instance variables to hold the values for command options.
-
 bool m_delete_all;
-bool m_delete_named;
 };
 
 CommandOptions m_options;
-
+uint32_t m_formatter_kind_mask;
+
 Options *
 GetOptions () override
 {
@@ -1183,27 +1160,36 @@ private:
 }
 
 public:
-CommandObjectTypeFormatClear (CommandInterpreter &interpreter) :
-CommandObjectParsed (interpreter,
- "type format clear",
- "Delete all existing format styles.",
- NULL),
-m_options(interpreter)
+CommandObjectTypeFormatterClear (CommandInterpreter &interpreter,
+ uint32_t formatter_kind_mask,
+ const char* name,
+ const char* help) :
+CommandObjectParsed (interpreter,
+ name,
+ help,
+ NULL),
+m_options(interpreter),
+m_formatter_kind_mask(formatter_kind_mask)
 {
 }
 
-~CommandObjectTypeFormatClear () override
+~CommandObjectTypeFormatterClear () override
 {
 }
 
 protected:
+virtual void
+FormatterSpecificDeletion ()
+{
+}
+
 bool
 DoExecute (Args& command, CommandReturnObject &result) override
 {
 if (m_options.m_delete_all)
 {
-DataVisualization::Categories::ForEach( [] (const 
TypeCategoryImplSP& category_sp) -> bool {
-category_sp->Clear(eFormatCategoryItemValue | 
eFormatCategoryItemRegexValue);
+DataVisualization::Categories::ForEach( [this] (const 
TypeCategoryImplSP& category_sp) -> bool {
+category_sp->Clear(m_formatter_kind_mask);
 return true;
 });
 }
@@ -1218,8 +1204,10 @@ protected:
 }
 else
 DataVisualization::Categories::GetCategory(ConstString(NULL), 
category);
-category->Clear(eFormatCategoryItemValue | 
eFormatCategoryItemRegexValue);
-}
+category->Clear(m_formatter_kind_mask);
+}
+
+FormatterSpecificDeletion();
 
 result.SetStatus(eReturnStatusSuccessFinishResult);
 return result.Succeeded();
@@ -1228,12 +1216,52 @@ protected:
 };
 
 OptionDefinition
-CommandObjectTypeFormatClear::CommandOptions::g_option_table[] =
+CommandObjectTypeFormatterClear::CommandOptions::g_option_table[] =
 {
 { LLDB_OPT_SET_ALL, false, "all", 'a', OptionParser::eNoArgument, NULL, 
NULL, 0, eArgTypeNone,  "Clear every category."},
 { 0, false, NULL, 0, 0, NULL, NULL, 0, eArgTypeNone, NULL }
 };
 
+
+
+
+
+//-
+// CommandObjectTypeFormatDelete
+//-
+
+class CommandObjectTypeFormatDelete : public CommandObjectTypeFormatterD

[Lldb-commits] [lldb] r253383 - Cleanup indentation

2015-11-17 Thread Enrico Granata via lldb-commits
Author: enrico
Date: Tue Nov 17 15:55:09 2015
New Revision: 253383

URL: http://llvm.org/viewvc/llvm-project?rev=253383&view=rev
Log:
Cleanup indentation

Modified:
lldb/trunk/source/Commands/CommandObjectType.cpp

Modified: lldb/trunk/source/Commands/CommandObjectType.cpp
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Commands/CommandObjectType.cpp?rev=253383&r1=253382&r2=253383&view=diff
==
--- lldb/trunk/source/Commands/CommandObjectType.cpp (original)
+++ lldb/trunk/source/Commands/CommandObjectType.cpp Tue Nov 17 15:55:09 2015
@@ -1203,9 +1203,11 @@ protected:
 DataVisualization::Categories::GetCategory(cat_nameCS, 
category);
 }
 else
+{
 DataVisualization::Categories::GetCategory(ConstString(NULL), 
category);
-category->Clear(m_formatter_kind_mask);
-}
+}
+category->Clear(m_formatter_kind_mask);
+}
 
 FormatterSpecificDeletion();
 


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


[Lldb-commits] [PATCH] D14765: Support unix-abstract-connect scheme as platform url in lldb testsuite

2015-11-17 Thread Ying Chen via lldb-commits
chying created this revision.
chying added a reviewer: ovyalov.
chying added a subscriber: lldb-commits.

http://reviews.llvm.org/D14765

Files:
  packages/Python/lldbsuite/test/lldbtest.py
  packages/Python/lldbsuite/test/tools/lldb-server/gdbremote_testcase.py

Index: packages/Python/lldbsuite/test/tools/lldb-server/gdbremote_testcase.py
===
--- packages/Python/lldbsuite/test/tools/lldb-server/gdbremote_testcase.py
+++ packages/Python/lldbsuite/test/tools/lldb-server/gdbremote_testcase.py
@@ -61,8 +61,12 @@
 self.named_pipe_fd = None
 self.stub_sends_two_stop_notifications_on_kill = False
 if lldb.platform_url:
-scheme, host = re.match('(.+)://(.+):\d+', 
lldb.platform_url).groups()
-if scheme == 'adb':
+if lldb.platform_url.startswith('unix-abstract-connect'):
+url_pattern = '(.+)://\[?(.+?)\]?/.*'
+else:
+url_pattern = '(.+)://(.+):\d+'
+scheme, host = re.match(url_pattern, lldb.platform_url).groups()
+if scheme in ['adb', 'unix-abstract-connect']:
 self.stub_device = host
 self.stub_hostname = 'localhost'
 else:
Index: packages/Python/lldbsuite/test/lldbtest.py
===
--- packages/Python/lldbsuite/test/lldbtest.py
+++ packages/Python/lldbsuite/test/lldbtest.py
@@ -461,8 +461,10 @@
 assert lldb.platform_url is not None
 device_id = None
 parsed_url = urlparse.urlparse(lldb.platform_url)
-if parsed_url.scheme == "adb":
+if parsed_url.scheme in ["adb", "unix-abstract-connect"]:
 device_id = parsed_url.netloc.split(":")[0]
+if device_id.startswith('[') and device_id.endswith(']'):
+device_id = device_id[1:-1]
 retcode, stdout, stderr = run_adb_command(
 ["shell", "getprop", "ro.build.version.sdk"], device_id)
 if retcode == 0:


Index: packages/Python/lldbsuite/test/tools/lldb-server/gdbremote_testcase.py
===
--- packages/Python/lldbsuite/test/tools/lldb-server/gdbremote_testcase.py
+++ packages/Python/lldbsuite/test/tools/lldb-server/gdbremote_testcase.py
@@ -61,8 +61,12 @@
 self.named_pipe_fd = None
 self.stub_sends_two_stop_notifications_on_kill = False
 if lldb.platform_url:
-scheme, host = re.match('(.+)://(.+):\d+', lldb.platform_url).groups()
-if scheme == 'adb':
+if lldb.platform_url.startswith('unix-abstract-connect'):
+url_pattern = '(.+)://\[?(.+?)\]?/.*'
+else:
+url_pattern = '(.+)://(.+):\d+'
+scheme, host = re.match(url_pattern, lldb.platform_url).groups()
+if scheme in ['adb', 'unix-abstract-connect']:
 self.stub_device = host
 self.stub_hostname = 'localhost'
 else:
Index: packages/Python/lldbsuite/test/lldbtest.py
===
--- packages/Python/lldbsuite/test/lldbtest.py
+++ packages/Python/lldbsuite/test/lldbtest.py
@@ -461,8 +461,10 @@
 assert lldb.platform_url is not None
 device_id = None
 parsed_url = urlparse.urlparse(lldb.platform_url)
-if parsed_url.scheme == "adb":
+if parsed_url.scheme in ["adb", "unix-abstract-connect"]:
 device_id = parsed_url.netloc.split(":")[0]
+if device_id.startswith('[') and device_id.endswith(']'):
+device_id = device_id[1:-1]
 retcode, stdout, stderr = run_adb_command(
 ["shell", "getprop", "ro.build.version.sdk"], device_id)
 if retcode == 0:
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


Re: [Lldb-commits] [lldb] r253317 - Add Pythonic language binding wrapper generation script.

2015-11-17 Thread Zachary Turner via lldb-commits
Moving this back over to the list since I'm sure others have some input
here.  Also +lldb-dev since it has more visibility than lldb-commits.


On Tue, Nov 17, 2015 at 11:25 AM Zachary Turner  wrote:

> On Tue, Nov 17, 2015 at 8:18 AM Todd Fiala  wrote:
>
>> Breaking out the binding generation into a separate step will also be
>> important for a couple reasons:
>>
>> * (from before) I want to eliminate the requirement for the vast majority
>> of the builds to have a swig on their system, and
>>
>> * (not stated before) we'd like to move away from swig for binding
>> generation at some point.
>>
>> -Todd
>>
>
> Unless these plans (i.e. moving away from swig) are imminent, I would
> prefer to keep the binding generation step automatic so people can use
> whatever swig version is installed on their system.  I know there are pros
> and cons to each, but at the end of the day, we need various bugfixes from
> newer versions of SWIG for the Python 3 stuff, and if someone decides they
> want bindings for Go, or Rust, or some other languages, they too might need
> a different minimum SWIG version.  We could start checking in multiple sets
> of generated bindings, but then we start having multiple maintainers, and
> the checked in bindings become out of sync with each other, and it's more
> trouble than it's worth.
>
> We have buildbots building and testing the various configurations, so if
> someone uses something that is incompatible we shoudl catch it.  And just
> yesterday I added some options to the @expectedFailure and @skipIf
> decorators that allow you to skip tests based on the SWIG version and/or
> python version.
>
> Letting people using the SWIG on their system is the easiest way to ensure
> that everyone's needs are still met while still getting early notification
> when someone does something incompatible, and it can be fixed.
>
>
One possibility (which I mentioned to you offline, but I'll put it here for
others to see) is that we make a swig bot which is hosted in the cloud much
like our public build bots.  We provide a Python script that can be run on
your machine, which sends requests over to the swig bot to run swig and
send back the results.  Availability of the service would be governed by
the SLA of Google Compute Engine, viewable here:
https://cloud.google.com/compute/sla?hl=en

If we do something like this, it would allow us to raise the SWIG version
in the upstream, and at that point I can see some benefit in checking the
bindings in.  Short of that, I still dont' see the value proposition in
checking bindings in to the repo.  So far all I've heard is that it is so
that we don't need swig to be on everyone's machines, but I also don't see
the value proposition in that either, given that we already require many
other tools on peoples' machines.

If it means we can get off of SWIG 1.x in the upstream, I will do the work
to make remote swig generation service and get it up and running.  From the
user's perspective, it's already identical to what you're proposing.  No
swig executable on your machine (or anyone's machine for that matter), and
you run a simple script to generate bindings and check them in whenever you
make changes.
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [lldb] r253423 - Cleanup the type X list commands to use the new ForEach goodness

2015-11-17 Thread Enrico Granata via lldb-commits
Author: enrico
Date: Tue Nov 17 19:37:49 2015
New Revision: 253423

URL: http://llvm.org/viewvc/llvm-project?rev=253423&view=rev
Log:
Cleanup the type X list commands to use the new ForEach goodness


Modified:
lldb/trunk/include/lldb/DataFormatters/DataVisualization.h
lldb/trunk/include/lldb/DataFormatters/FormatManager.h
lldb/trunk/include/lldb/DataFormatters/FormattersContainer.h
lldb/trunk/include/lldb/DataFormatters/TypeCategory.h
lldb/trunk/include/lldb/DataFormatters/TypeCategoryMap.h
lldb/trunk/include/lldb/DataFormatters/TypeSynthetic.h
lldb/trunk/source/API/SBTypeCategory.cpp
lldb/trunk/source/Commands/CommandObjectType.cpp
lldb/trunk/source/DataFormatters/DataVisualization.cpp
lldb/trunk/source/DataFormatters/FormatManager.cpp
lldb/trunk/source/DataFormatters/TypeCategoryMap.cpp

Modified: lldb/trunk/include/lldb/DataFormatters/DataVisualization.h
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/DataFormatters/DataVisualization.h?rev=253423&r1=253422&r2=253423&view=diff
==
--- lldb/trunk/include/lldb/DataFormatters/DataVisualization.h (original)
+++ lldb/trunk/include/lldb/DataFormatters/DataVisualization.h Tue Nov 17 
19:37:49 2015
@@ -101,7 +101,7 @@ public:
 Clear ();
 
 static void
-LoopThrough (TypeSummaryImpl::SummaryCallback callback, void* 
callback_baton);
+ForEach (std::function callback);
 
 static uint32_t
 GetCount ();
@@ -158,9 +158,6 @@ public:
 DisableStar ();
 
 static void
-LoopThrough (FormatManager::CategoryCallback callback, void* 
callback_baton);
-
-static void
 ForEach (TypeCategoryMap::ForEachCallback callback);
 
 static uint32_t

Modified: lldb/trunk/include/lldb/DataFormatters/FormatManager.h
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/DataFormatters/FormatManager.h?rev=253423&r1=253422&r2=253423&view=diff
==
--- lldb/trunk/include/lldb/DataFormatters/FormatManager.h (original)
+++ lldb/trunk/include/lldb/DataFormatters/FormatManager.h Tue Nov 17 19:37:49 
2015
@@ -140,9 +140,6 @@ public:
 }
 
 void
-LoopThroughCategories (CategoryCallback callback, void* param);
-
-void
 ForEachCategory (TypeCategoryMap::ForEachCallback callback);
 
 lldb::TypeCategoryImplSP

Modified: lldb/trunk/include/lldb/DataFormatters/FormattersContainer.h
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/DataFormatters/FormattersContainer.h?rev=253423&r1=253422&r2=253423&view=diff
==
--- lldb/trunk/include/lldb/DataFormatters/FormattersContainer.h (original)
+++ lldb/trunk/include/lldb/DataFormatters/FormattersContainer.h Tue Nov 17 
19:37:49 2015
@@ -141,22 +141,6 @@ public:
 }
 
 void
-LoopThrough (CallbackType callback, void* param)
-{
-if (callback)
-{
-Mutex::Locker locker(m_map_mutex);
-MapIterator pos, end = m_map.end();
-for (pos = m_map.begin(); pos != end; pos++)
-{
-KeyType type = pos->first;
-if (!callback(param, type, pos->second))
-break;
-}
-}
-}
-
-void
 ForEach (ForEachCallback callback)
 {
 if (callback)
@@ -316,12 +300,6 @@ public:
 }
 
 void
-LoopThrough (CallbackType callback, void* param)
-{
-m_format_map.LoopThrough(callback,param);
-}
-
-void
 ForEach (ForEachCallback callback)
 {
 m_format_map.ForEach(callback);

Modified: lldb/trunk/include/lldb/DataFormatters/TypeCategory.h
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/DataFormatters/TypeCategory.h?rev=253423&r1=253422&r2=253423&view=diff
==
--- lldb/trunk/include/lldb/DataFormatters/TypeCategory.h (original)
+++ lldb/trunk/include/lldb/DataFormatters/TypeCategory.h Tue Nov 17 19:37:49 
2015
@@ -67,14 +67,6 @@ namespace lldb_private {
 return m_regex_sp;
 }
 
-void
-LoopThrough (typename ExactMatchContainer::CallbackType exact_callback,
- typename RegexMatchContainer::CallbackType regex_callback)
-{
-GetExactMatch()->LoopThrough(exact_callback);
-GetRegexMatch()->LoopThrough(regex_callback);
-}
-
 uint32_t
 GetCount ()
 {
@@ -95,7 +87,7 @@ namespace lldb_private {
 typedef FormatterContainerPair ValidatorContainer;
 
 #ifndef LLDB_DISABLE_PYTHON
-typedef FormatterContainerPair 
SynthContainer;
+typedef FormatterContainerPair SynthContain

Re: [Lldb-commits] [PATCH] D14765: Support unix-abstract-connect scheme as platform url in lldb testsuite

2015-11-17 Thread Oleksiy Vyalov via lldb-commits
ovyalov added a comment.

Please see my comments.



Comment at: packages/Python/lldbsuite/test/lldbtest.py:464
@@ -463,3 +463,3 @@
 parsed_url = urlparse.urlparse(lldb.platform_url)
-if parsed_url.scheme == "adb":
+if parsed_url.scheme in ["adb", "unix-abstract-connect"]:
 device_id = parsed_url.netloc.split(":")[0]

I think in case of Android we can always treat result of 
parsed_url.netloc.split(":")[0] as a device id unless it's set to 'localhost' - 
it should hold true for any protocol scheme.


Comment at: 
packages/Python/lldbsuite/test/tools/lldb-server/gdbremote_testcase.py:64
@@ -63,3 +63,3 @@
 if lldb.platform_url:
-scheme, host = re.match('(.+)://(.+):\d+', 
lldb.platform_url).groups()
-if scheme == 'adb':
+if lldb.platform_url.startswith('unix-abstract-connect'):
+url_pattern = '(.+)://\[?(.+?)\]?/.*'

You may use "unix-" to allow regular domain sockets as well.


Comment at: 
packages/Python/lldbsuite/test/tools/lldb-server/gdbremote_testcase.py:69
@@ -66,1 +68,3 @@
+scheme, host = re.match(url_pattern, lldb.platform_url).groups()
+if scheme in ['adb', 'unix-abstract-connect']:
 self.stub_device = host

if host != 'localhost' ?


http://reviews.llvm.org/D14765



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


[Lldb-commits] [lldb] r253424 - Remove a few vestigial typedefs from the old world

2015-11-17 Thread Enrico Granata via lldb-commits
Author: enrico
Date: Tue Nov 17 19:44:36 2015
New Revision: 253424

URL: http://llvm.org/viewvc/llvm-project?rev=253424&view=rev
Log:
Remove a few vestigial typedefs from the old world

Modified:
lldb/trunk/include/lldb/DataFormatters/FormatManager.h
lldb/trunk/include/lldb/DataFormatters/FormattersContainer.h
lldb/trunk/include/lldb/DataFormatters/TypeCategoryMap.h
lldb/trunk/include/lldb/DataFormatters/TypeFormat.h
lldb/trunk/include/lldb/DataFormatters/TypeSummary.h
lldb/trunk/include/lldb/DataFormatters/TypeSynthetic.h
lldb/trunk/include/lldb/DataFormatters/TypeValidator.h

Modified: lldb/trunk/include/lldb/DataFormatters/FormatManager.h
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/DataFormatters/FormatManager.h?rev=253424&r1=253423&r2=253424&view=diff
==
--- lldb/trunk/include/lldb/DataFormatters/FormatManager.h (original)
+++ lldb/trunk/include/lldb/DataFormatters/FormatManager.h Tue Nov 17 19:44:36 
2015
@@ -43,8 +43,6 @@ class FormatManager : public IFormatChan
 public:
 typedef std::map 
LanguageCategories;
 
-typedef TypeCategoryMap::CallbackType CategoryCallback;
-
 FormatManager();
 
 ~FormatManager() override = default;

Modified: lldb/trunk/include/lldb/DataFormatters/FormattersContainer.h
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/DataFormatters/FormattersContainer.h?rev=253424&r1=253423&r2=253424&view=diff
==
--- lldb/trunk/include/lldb/DataFormatters/FormattersContainer.h (original)
+++ lldb/trunk/include/lldb/DataFormatters/FormattersContainer.h Tue Nov 17 
19:44:36 2015
@@ -80,8 +80,6 @@ public:
 typedef typename ValueType::SharedPointer ValueSP;
 typedef std::map MapType;
 typedef typename MapType::iterator MapIterator;
-typedef std::function CallbackType;
-
 typedef std::function ForEachCallback;
 
 FormatMap(IFormatChangeListener* lst) :
@@ -226,7 +224,6 @@ public:
 typedef typename MapType::iterator MapIterator;
 typedef typename MapType::key_type MapKeyType;
 typedef typename MapType::mapped_type MapValueType;
-typedef typename BackEndType::CallbackType CallbackType;
 typedef typename BackEndType::ForEachCallback ForEachCallback;
 typedef typename std::shared_ptr > 
SharedPointer;
 

Modified: lldb/trunk/include/lldb/DataFormatters/TypeCategoryMap.h
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/DataFormatters/TypeCategoryMap.h?rev=253424&r1=253423&r2=253424&view=diff
==
--- lldb/trunk/include/lldb/DataFormatters/TypeCategoryMap.h (original)
+++ lldb/trunk/include/lldb/DataFormatters/TypeCategoryMap.h Tue Nov 17 
19:44:36 2015
@@ -37,8 +37,6 @@ namespace lldb_private {
 public:
 typedef std::map MapType;
 typedef MapType::iterator MapIterator;
-typedef bool(*CallbackType)(void*, const ValueSP&);
-
 typedef std::function ForEachCallback;
 
 typedef uint32_t Position;

Modified: lldb/trunk/include/lldb/DataFormatters/TypeFormat.h
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/DataFormatters/TypeFormat.h?rev=253424&r1=253423&r2=253424&view=diff
==
--- lldb/trunk/include/lldb/DataFormatters/TypeFormat.h (original)
+++ lldb/trunk/include/lldb/DataFormatters/TypeFormat.h Tue Nov 17 19:44:36 2015
@@ -151,7 +151,6 @@ namespace lldb_private {
 TypeFormatImpl (const Flags& flags = Flags());
 
 typedef std::shared_ptr SharedPointer;
-typedef std::function ValueCallback;
 
 virtual ~TypeFormatImpl ();
 
@@ -259,7 +258,6 @@ namespace lldb_private {
const TypeFormatImpl::Flags& flags = Flags());
 
 typedef std::shared_ptr SharedPointer;
-typedef std::function ValueCallback;
 
 ~TypeFormatImpl_Format() override;
 
@@ -302,7 +300,6 @@ namespace lldb_private {
  const TypeFormatImpl::Flags& flags = Flags());
 
 typedef std::shared_ptr SharedPointer;
-typedef std::function ValueCallback;
 
 ~TypeFormatImpl_EnumType() override;
 

Modified: lldb/trunk/include/lldb/DataFormatters/TypeSummary.h
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/DataFormatters/TypeSummary.h?rev=253424&r1=253423&r2=253424&view=diff
==
--- lldb/trunk/include/lldb/DataFormatters/TypeSummary.h (original)
+++ lldb/trunk/include/lldb/DataFormatters/TypeSummary.h Tue Nov 17 19:44:36 
2015
@@ -406,8 +406,6 @@ namespace lldb_private {
 }
 
 typedef std::

Re: [Lldb-commits] New llvm build server account request

2015-11-17 Thread Kamil Rytarowski via lldb-commits
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

I've noted the first set of successfully built LLDB instances on NetBSD!

http://lab.llvm.org:8014/builders/lldb-amd64-ninja-netbsd7/builds/973

I've stopped the buildbot on the Staging server and redirected port to
port 9990.

There are some issues with scripts again:
http://lab.llvm.org:8011/builders/lldb-amd64-ninja-netbsd7/builds/53

Are they synced between the master and staging one?

Could you please have a look.

On 17.11.2015 21:37, Ying Chen wrote:
> Done. Please let me know if it works for you.
> 
> Thanks, Ying
> 
> On Tue, Nov 17, 2015 at 3:34 AM, Kamil Rytarowski  > wrote:
> 
> Hello Ying,
> 
> Regarding the NetBSD buildbot for LLDB one NetBSD we need a tweak.
> 
> Please test for the existence (only on NetBSD) of a file 
> /usr/include/panel.h. If it's missing please add 
> '-DLLDB_DISABLE_CURSES' to CMake configure arguments.
> 
> if [ ! -f /usr/include/panel.h ]; then # Add this line to the CMake
> configure arguments on NetBSD echo "-DLLDB_DISABLE_CURSES" fi
> 
> This change is for both: staging and master build farm. I'm going
> to switch the NetBSD7 buildbot to the master one soon, once it will
> build the sources properly.
> 
> 

-BEGIN PGP SIGNATURE-
Version: GnuPG v2

iQIcBAEBCAAGBQJWS+MNAAoJEEuzCOmwLnZsPkwQAMNE6PCm1SccmTy8wFnp0k+L
TALbcpT/4zLSIJ98GYdSrvmNQVZsKz8E7bYxlzf79NqzpaB6Zk6FzP7UtN/zolAE
xgoXJvfXwGWKazFKPxjd1wct4w6oOtgmKgspG+kTpnfIp5gkFtzoMGT4ZSCbcAoM
sPRwuoI6VKbtKltIq523JBXFX5YzchVH+2sYFWrjCqgGIvnBfqeghgD/Azs8LXCu
d0aSNh8EbaJi0OquhAtZADOxws9THeJskP5G7VmSTWUhgTaA3VL8xlh26dCeSMuN
ApWwDh7IiBIfAsfFJS/crQIuQ0H0IjS6wMSiBzi3FYXe5R9nx16NMTw7X+qHw5yA
lZKX22pafK0xzM5kqd69yEfztYdxSlS9cWcgH/VyRki4ZvsQTkoB+wPshQrTKx9o
a7m8kXPIG1Sf4leAQjBLqM0wt3TWY8chPFUwuBLlxViZatLrP0nq6uUHRt/CrdWJ
82O/J4EUoAPbXwGN9XpScNL1+bpOymF/ejd3ZrEEXSrgCoeT/mNiPqRiufsU0j9a
+i48WaJjD2Nykn/LPN1ecNCetdsuKLGVTXeOs06id+MyuYq7cppeKX/WYc1+m+1b
aRiqMlj9mNVDdYKashEPQHaQ8g6AE7G2MGd4hLn+BETzC9Ussy19xxnKLb5ihwrT
o0941kY6B7a+r4y2YXgy
=Yvz1
-END PGP SIGNATURE-
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


Re: [Lldb-commits] New llvm build server account request

2015-11-17 Thread Kamil Rytarowski via lldb-commits
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

It's fixed. It was my fault as I forgot to make updateScripts.sh
available via PATH.

Buildslave works properly.

Thank you!

On 18.11.2015 03:31, Kamil Rytarowski via lldb-commits wrote:
> I've noted the first set of successfully built LLDB instances on
> NetBSD!
> 
> http://lab.llvm.org:8014/builders/lldb-amd64-ninja-netbsd7/builds/973
>
>  I've stopped the buildbot on the Staging server and redirected
> port to port 9990.
> 
> There are some issues with scripts again: 
> http://lab.llvm.org:8011/builders/lldb-amd64-ninja-netbsd7/builds/53
>
>  Are they synced between the master and staging one?
> 
> Could you please have a look.
> 
> On 17.11.2015 21:37, Ying Chen wrote:
>> Done. Please let me know if it works for you.
> 
>> Thanks, Ying
> 
>> On Tue, Nov 17, 2015 at 3:34 AM, Kamil Rytarowski > > wrote:
> 
>> Hello Ying,
> 
>> Regarding the NetBSD buildbot for LLDB one NetBSD we need a
>> tweak.
> 
>> Please test for the existence (only on NetBSD) of a file 
>> /usr/include/panel.h. If it's missing please add 
>> '-DLLDB_DISABLE_CURSES' to CMake configure arguments.
> 
>> if [ ! -f /usr/include/panel.h ]; then # Add this line to the
>> CMake configure arguments on NetBSD echo "-DLLDB_DISABLE_CURSES"
>> fi
> 
>> This change is for both: staging and master build farm. I'm
>> going to switch the NetBSD7 buildbot to the master one soon, once
>> it will build the sources properly.
> 
> 
> 
> ___ lldb-commits
> mailing list lldb-commits@lists.llvm.org 
> http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
> 

-BEGIN PGP SIGNATURE-
Version: GnuPG v2

iQIcBAEBCAAGBQJWS+37AAoJEEuzCOmwLnZsSW4P/jQv6bQyjqg2A/+CG6lE8kyq
FppZaboCnZDXZdrOStWoG5nzsXkd04AyKrFCf3lkSpxiqI30KboA7D8YU0arL8lA
I4X889DXK35cbdveuRkX/VYTFGYLn7DQECidHnj0+QqajnodV2CMy41Z+6Dv7py2
eu1ormgxRzAPx+Iyij6+sqZx7N3Okz+MG8r2ZSUOyIp9HuKAWk+fn5AWbCe2wwu8
CV+Gf2ekeHxlkD++QeNnxwngvIqkt3wvG0oyvLSxf0vKxvTz1VUevjbx508mPPqy
dq383ZZF+JU2VX825v4DZPOqh2KU4BB/k5dswTUkPX8d8NZSbA2IL99uTIiR4zyi
BBb++tK+/RmCwIM87WAsfi7W7Jfglt7JkegIZz2bm012Vo3qtOf14QzTNwvGn3qz
/VDG1tdOjE7HL8/S5zBhp1TD7m9wCeZnqWaCAb1tQ7nu63lDoLX2RkCmMUQl2Bn7
6l6WrfffZihB7l9bztQTaa+byMwP90x8JH72vFoM3CGoCwp6l1NjxjT4q5tQi9Zk
eA6xGp70Ai78mWQS4FrZ87D8EK1qvT2jHBHTpTBwFKxzte5/Pcgmxz+r0h7puFpV
b0tFOLPQIIpV9INSxRf7wbaj3UaOVFkhxFL2y/Ze69N3dYhtapPDa8Wao5OtU12/
5nAKYigd6t2QnHNyf5hJ
=frjd
-END PGP SIGNATURE-
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


Re: [Lldb-commits] [lldb] r253317 - Add Pythonic language binding wrapper generation script.

2015-11-17 Thread Bruce Mitchener via lldb-commits
Stepping one step back further in the thread ...

On Wed, Nov 18, 2015 at 8:35 AM, Zachary Turner via lldb-commits <
lldb-commits@lists.llvm.org> wrote:

> Moving this back over to the list since I'm sure others have some input
> here.  Also +lldb-dev since it has more visibility than lldb-commits.
>
>
> On Tue, Nov 17, 2015 at 11:25 AM Zachary Turner 
> wrote:
>
>> On Tue, Nov 17, 2015 at 8:18 AM Todd Fiala  wrote:
>>
>>> Breaking out the binding generation into a separate step will also be
>>> important for a couple reasons:
>>>
>>> * (from before) I want to eliminate the requirement for the vast
>>> majority of the builds to have a swig on their system, and
>>>
>>> * (not stated before) we'd like to move away from swig for binding
>>> generation at some point.
>>>
>>
Is there any discussion or thoughts about what the options would be for
moving away from swig?

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


Re: [Lldb-commits] [PATCH] D14765: Support unix-abstract-connect scheme as platform url in lldb testsuite

2015-11-17 Thread Ying Chen via lldb-commits
chying updated this revision to Diff 40469.
chying added a comment.
Herald added subscribers: srhines, danalbert, tberghammer.

Address comments.


http://reviews.llvm.org/D14765

Files:
  packages/Python/lldbsuite/test/lldbtest.py
  packages/Python/lldbsuite/test/tools/lldb-server/gdbremote_testcase.py

Index: packages/Python/lldbsuite/test/tools/lldb-server/gdbremote_testcase.py
===
--- packages/Python/lldbsuite/test/tools/lldb-server/gdbremote_testcase.py
+++ packages/Python/lldbsuite/test/tools/lldb-server/gdbremote_testcase.py
@@ -61,8 +61,12 @@
 self.named_pipe_fd = None
 self.stub_sends_two_stop_notifications_on_kill = False
 if lldb.platform_url:
-scheme, host = re.match('(.+)://(.+):\d+', 
lldb.platform_url).groups()
-if scheme == 'adb':
+if lldb.platform_url.startswith('unix-'):
+url_pattern = '(.+)://\[?(.+?)\]?/.*'
+else:
+url_pattern = '(.+)://(.+):\d+'
+scheme, host = re.match(url_pattern, lldb.platform_url).groups()
+if lldb.remote_platform_name == 'remote-android' and host != 
'localhost':
 self.stub_device = host
 self.stub_hostname = 'localhost'
 else:
Index: packages/Python/lldbsuite/test/lldbtest.py
===
--- packages/Python/lldbsuite/test/lldbtest.py
+++ packages/Python/lldbsuite/test/lldbtest.py
@@ -461,8 +461,10 @@
 assert lldb.platform_url is not None
 device_id = None
 parsed_url = urlparse.urlparse(lldb.platform_url)
-if parsed_url.scheme == "adb":
+if parsed_url.netloc.split(":")[0] != 'localhost':
 device_id = parsed_url.netloc.split(":")[0]
+if device_id.startswith('[') and device_id.endswith(']'):
+device_id = device_id[1:-1]
 retcode, stdout, stderr = run_adb_command(
 ["shell", "getprop", "ro.build.version.sdk"], device_id)
 if retcode == 0:


Index: packages/Python/lldbsuite/test/tools/lldb-server/gdbremote_testcase.py
===
--- packages/Python/lldbsuite/test/tools/lldb-server/gdbremote_testcase.py
+++ packages/Python/lldbsuite/test/tools/lldb-server/gdbremote_testcase.py
@@ -61,8 +61,12 @@
 self.named_pipe_fd = None
 self.stub_sends_two_stop_notifications_on_kill = False
 if lldb.platform_url:
-scheme, host = re.match('(.+)://(.+):\d+', lldb.platform_url).groups()
-if scheme == 'adb':
+if lldb.platform_url.startswith('unix-'):
+url_pattern = '(.+)://\[?(.+?)\]?/.*'
+else:
+url_pattern = '(.+)://(.+):\d+'
+scheme, host = re.match(url_pattern, lldb.platform_url).groups()
+if lldb.remote_platform_name == 'remote-android' and host != 'localhost':
 self.stub_device = host
 self.stub_hostname = 'localhost'
 else:
Index: packages/Python/lldbsuite/test/lldbtest.py
===
--- packages/Python/lldbsuite/test/lldbtest.py
+++ packages/Python/lldbsuite/test/lldbtest.py
@@ -461,8 +461,10 @@
 assert lldb.platform_url is not None
 device_id = None
 parsed_url = urlparse.urlparse(lldb.platform_url)
-if parsed_url.scheme == "adb":
+if parsed_url.netloc.split(":")[0] != 'localhost':
 device_id = parsed_url.netloc.split(":")[0]
+if device_id.startswith('[') and device_id.endswith(']'):
+device_id = device_id[1:-1]
 retcode, stdout, stderr = run_adb_command(
 ["shell", "getprop", "ro.build.version.sdk"], device_id)
 if retcode == 0:
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


Re: [Lldb-commits] [PATCH] D14765: Support unix-abstract-connect scheme as platform url in lldb testsuite

2015-11-17 Thread Ying Chen via lldb-commits
chying marked 2 inline comments as done.


Comment at: 
packages/Python/lldbsuite/test/tools/lldb-server/gdbremote_testcase.py:69
@@ -66,1 +68,3 @@
+scheme, host = re.match(url_pattern, lldb.platform_url).groups()
+if lldb.remote_platform_name == 'remote-android' and host != 
'localhost':
 self.stub_device = host

As discussed offline, add check for remote platform is android as well.


http://reviews.llvm.org/D14765



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


Re: [Lldb-commits] [lldb] r253317 - Add Pythonic language binding wrapper generation script.

2015-11-17 Thread Todd Fiala via lldb-commits
Nothing concrete at the moment; however, it could be interesting to look at
the clang community and see what could be done for llvm-based language
implementations.  The angle that I think would be interesting would be if
we can generate bindings more effectively based on the in-depth
understanding of the language that is afforded by languages built on top of
LLVM.  This is probably less interesting for Python (particularly since we
have a functioning solution) and more interesting for languages built on
LLVM or clang.

Honestly, though, I haven't spent much time on that.

For the time being, I am going to not change the path for everyone on swig,
and only use a static binding if swig cannot be found.  This will be
minimal impact for everyone and doesn't interfere with anyone using a
specific version of swig.  We can revisit larger questions about
who/what/when on static bindings after we gain some experience with
enabling them for those who don't have swig.  We can review and adjust
based on our collective experience.  The two files this seems like it will
be are the LLDBWrapPython.cpp and the lldb.py file that comes out of
python.  I hope to have this working in the next day or so.


On Tue, Nov 17, 2015 at 7:26 PM, Bruce Mitchener 
wrote:

> Stepping one step back further in the thread ...
>
> On Wed, Nov 18, 2015 at 8:35 AM, Zachary Turner via lldb-commits <
> lldb-commits@lists.llvm.org> wrote:
>
>> Moving this back over to the list since I'm sure others have some input
>> here.  Also +lldb-dev since it has more visibility than lldb-commits.
>>
>>
>> On Tue, Nov 17, 2015 at 11:25 AM Zachary Turner 
>> wrote:
>>
>>> On Tue, Nov 17, 2015 at 8:18 AM Todd Fiala  wrote:
>>>
 Breaking out the binding generation into a separate step will also be
 important for a couple reasons:

 * (from before) I want to eliminate the requirement for the vast
 majority of the builds to have a swig on their system, and

 * (not stated before) we'd like to move away from swig for binding
 generation at some point.

>>>
> Is there any discussion or thoughts about what the options would be for
> moving away from swig?
>
>  - Bruce
>
>



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


Re: [Lldb-commits] [lldb] r253317 - Add Pythonic language binding wrapper generation script.

2015-11-17 Thread Todd Fiala via lldb-commits
> that comes out of python

that comes out of swig, rather (i.e. the binding generation output).

On Tue, Nov 17, 2015 at 8:03 PM, Todd Fiala  wrote:

> Nothing concrete at the moment; however, it could be interesting to look
> at the clang community and see what could be done for llvm-based language
> implementations.  The angle that I think would be interesting would be if
> we can generate bindings more effectively based on the in-depth
> understanding of the language that is afforded by languages built on top of
> LLVM.  This is probably less interesting for Python (particularly since we
> have a functioning solution) and more interesting for languages built on
> LLVM or clang.
>
> Honestly, though, I haven't spent much time on that.
>
> For the time being, I am going to not change the path for everyone on
> swig, and only use a static binding if swig cannot be found.  This will be
> minimal impact for everyone and doesn't interfere with anyone using a
> specific version of swig.  We can revisit larger questions about
> who/what/when on static bindings after we gain some experience with
> enabling them for those who don't have swig.  We can review and adjust
> based on our collective experience.  The two files this seems like it will
> be are the LLDBWrapPython.cpp and the lldb.py file that comes out of
> python.  I hope to have this working in the next day or so.
>
>
> On Tue, Nov 17, 2015 at 7:26 PM, Bruce Mitchener <
> bruce.mitche...@gmail.com> wrote:
>
>> Stepping one step back further in the thread ...
>>
>> On Wed, Nov 18, 2015 at 8:35 AM, Zachary Turner via lldb-commits <
>> lldb-commits@lists.llvm.org> wrote:
>>
>>> Moving this back over to the list since I'm sure others have some input
>>> here.  Also +lldb-dev since it has more visibility than lldb-commits.
>>>
>>>
>>> On Tue, Nov 17, 2015 at 11:25 AM Zachary Turner 
>>> wrote:
>>>
 On Tue, Nov 17, 2015 at 8:18 AM Todd Fiala 
 wrote:

> Breaking out the binding generation into a separate step will also be
> important for a couple reasons:
>
> * (from before) I want to eliminate the requirement for the vast
> majority of the builds to have a swig on their system, and
>
> * (not stated before) we'd like to move away from swig for binding
> generation at some point.
>

>> Is there any discussion or thoughts about what the options would be for
>> moving away from swig?
>>
>>  - Bruce
>>
>>
>
>
>
> --
> -Todd
>



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