Re: [Lldb-commits] [PATCH] D14790: cmake: add -DLLDB_ALLOW_STATIC_BINDINGS=1, defaults off

2015-11-19 Thread Pavel Labath via lldb-commits
labath added a comment.

A bit late to the party, but anyway... I would change the detection logic here:
Instead of `ALLOW_STATIC_BINDINGS`, have `USE_STATIC_BINDINGS`. If it's set, 
don't even bother checking for swig's presence and use the static bindings. If 
it's not set, then detect swig, and make it an error if it's not found.
I like this more because then the build will not do something completely 
different depending on whether it finds some binary on your system or not. I 
don't feel so strongly about that as in the case of curses (this is the dynamic 
dependency kamil was referring to) because this only kicks in if some option is 
specified, but I do think this provides more visibility into what the build 
system is doing.


http://reviews.llvm.org/D14790



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


[Lldb-commits] [lldb] r253555 - [LLDB][MIPS] Fix lldbplatformutil.py Failure

2015-11-19 Thread Sagar Thakur via lldb-commits
Author: slthakur
Date: Thu Nov 19 05:01:21 2015
New Revision: 253555

URL: http://llvm.org/viewvc/llvm-project?rev=253555&view=rev
Log:
[LLDB][MIPS] Fix lldbplatformutil.py Failure

Patch by Nitesh Jain

Summary: This patch check whether first register is readable.

Subscribers: lldb-commits, mohit.bhakkad, sagar, bhushan
Reviewers: clayborg, ovyalov, jaydeep
Differential: http://reviews.llvm.org/D14635

Modified:
lldb/trunk/packages/Python/lldbsuite/test/lldbplatformutil.py

Modified: lldb/trunk/packages/Python/lldbsuite/test/lldbplatformutil.py
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/lldbplatformutil.py?rev=253555&r1=253554&r2=253555&view=diff
==
--- lldb/trunk/packages/Python/lldbsuite/test/lldbplatformutil.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/lldbplatformutil.py Thu Nov 19 
05:01:21 2015
@@ -9,13 +9,19 @@ from __future__ import absolute_import
 
 # LLDB modules
 
+import re
+
 def check_first_register_readable(test_case):
-if test_case.getArchitecture() in ['x86_64', 'i386']:
+arch = test_case.getArchitecture()
+
+if arch in ['x86_64', 'i386']:
 test_case.expect("register read eax", substrs = ['eax = 0x'])
-elif test_case.getArchitecture() in ['arm']:
+elif arch in ['arm']:
test_case.expect("register read r0", substrs = ['r0 = 0x'])
-elif test_case.getArchitecture() in ['aarch64']:
+elif arch in ['aarch64']:
 test_case.expect("register read x0", substrs = ['x0 = 0x'])
+elif re.match("mips",arch):
+test_case.expect("register read zero", substrs = ['zero = 0x'])
 else:
 # TODO: Add check for other architectures
 test_case.fail("Unsupported architecture for test case (arch: %s)" % 
test_case.getArchitecture())


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


Re: [Lldb-commits] [PATCH] D14635: [LLDB][MIPS] Fix lldbplatformutil.py Failure

2015-11-19 Thread Sagar Thakur via lldb-commits
sagar closed this revision.
sagar added a comment.

Committed in r253555 on behalf of @nitesh.jain


Repository:
  rL LLVM

http://reviews.llvm.org/D14635



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


[Lldb-commits] [PATCH] D14816: Use thumb instruction set for ldb-server on android arm

2015-11-19 Thread Tamas Berghammer via lldb-commits
tberghammer created this revision.
tberghammer added reviewers: labath, ovyalov.
tberghammer added a subscriber: lldb-commits.
Herald added subscribers: srhines, danalbert, tberghammer, rengolin, aemerson.

Use thumb instruction set for ldb-server on android arm

This change reduce the size of the lldb-server binary on android-arm from a 
release build by ~5MB

http://reviews.llvm.org/D14816

Files:
  cmake/platforms/Android.cmake

Index: cmake/platforms/Android.cmake
===
--- cmake/platforms/Android.cmake
+++ cmake/platforms/Android.cmake
@@ -103,7 +103,7 @@
 elseif( ANDROID_ABI STREQUAL "armeabi" )
  # 64 bit atomic operations used in c++ libraries require armv7-a instructions
  # armv5te and armv6 were tried but do not work.
- set( ANDROID_CXX_FLAGS "${ANDROID_CXX_FLAGS} -march=armv7-a" )
+ set( ANDROID_CXX_FLAGS "${ANDROID_CXX_FLAGS} -march=armv7-a -mthumb" )
  if( LLVM_BUILD_STATIC )
   # Temporary workaround for static linking with the latest API.
   set( ANDROID_CXX_FLAGS "${ANDROID_CXX_FLAGS} -DANDROID_ARM_BUILD_STATIC" )


Index: cmake/platforms/Android.cmake
===
--- cmake/platforms/Android.cmake
+++ cmake/platforms/Android.cmake
@@ -103,7 +103,7 @@
 elseif( ANDROID_ABI STREQUAL "armeabi" )
  # 64 bit atomic operations used in c++ libraries require armv7-a instructions
  # armv5te and armv6 were tried but do not work.
- set( ANDROID_CXX_FLAGS "${ANDROID_CXX_FLAGS} -march=armv7-a" )
+ set( ANDROID_CXX_FLAGS "${ANDROID_CXX_FLAGS} -march=armv7-a -mthumb" )
  if( LLVM_BUILD_STATIC )
   # Temporary workaround for static linking with the latest API.
   set( ANDROID_CXX_FLAGS "${ANDROID_CXX_FLAGS} -DANDROID_ARM_BUILD_STATIC" )
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


Re: [Lldb-commits] [PATCH] D14816: Use thumb instruction set for ldb-server on android arm

2015-11-19 Thread Pavel Labath via lldb-commits
labath accepted this revision.
labath added a comment.
This revision is now accepted and ready to land.

lgtm


http://reviews.llvm.org/D14816



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


Re: [Lldb-commits] [PATCH] D14790: cmake: add -DLLDB_ALLOW_STATIC_BINDINGS=1, defaults off

2015-11-19 Thread Todd Fiala via lldb-commits
Moot point now, but thanks.

The reason for the flag name is that the prepare_bindings.py script as it
stands will always generate the bindings with swig if a swig is either
specified or allowed to be found in some common places.  So the
"USE_STATIC_BINDINGS" would be misleading --- they wouldn't necessarily be
used - only when a swig could not be found.  So that flag literally
controlled whether static bindings were even permitted (i.e. allowed) to be
used, not that they would be.

On Thu, Nov 19, 2015 at 2:25 AM, Pavel Labath  wrote:

> labath added a comment.
>
> A bit late to the party, but anyway... I would change the detection logic
> here:
> Instead of `ALLOW_STATIC_BINDINGS`, have `USE_STATIC_BINDINGS`. If it's
> set, don't even bother checking for swig's presence and use the static
> bindings. If it's not set, then detect swig, and make it an error if it's
> not found.
> I like this more because then the build will not do something completely
> different depending on whether it finds some binary on your system or not.
> I don't feel so strongly about that as in the case of curses (this is the
> dynamic dependency kamil was referring to) because this only kicks in if
> some option is specified, but I do think this provides more visibility into
> what the build system is doing.
>
>
> http://reviews.llvm.org/D14790
>
>
>
>


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


Re: [Lldb-commits] [PATCH] D14790: cmake: add -DLLDB_ALLOW_STATIC_BINDINGS=1, defaults off

2015-11-19 Thread Todd Fiala via lldb-commits
tfiala added a subscriber: tfiala.
tfiala added a comment.

Moot point now, but thanks.

The reason for the flag name is that the prepare_bindings.py script as it
stands will always generate the bindings with swig if a swig is either
specified or allowed to be found in some common places.  So the
"USE_STATIC_BINDINGS" would be misleading --- they wouldn't necessarily be
used - only when a swig could not be found.  So that flag literally
controlled whether static bindings were even permitted (i.e. allowed) to be
used, not that they would be.


http://reviews.llvm.org/D14790



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


Re: [Lldb-commits] [PATCH] D14816: Use thumb instruction set for ldb-server on android arm

2015-11-19 Thread Oleksiy Vyalov via lldb-commits
ovyalov accepted this revision.
ovyalov added a comment.

LGTM


http://reviews.llvm.org/D14816



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


[Lldb-commits] [PATCH] D14823: Disable forcing -marm (A32 instruction set) while running testsuite on arm targets.

2015-11-19 Thread Muhammad Omair Javaid via lldb-commits
omjavaid created this revision.
omjavaid added reviewers: tberghammer, clayborg.
omjavaid added a subscriber: lldb-commits.
Herald added subscribers: rengolin, aemerson.

This patch disables forcing -marm (A32 instruction set) while running lldb 
testsuite on arm targets.

gcc uses -marm and -mthumb flag to choose between A32 and T32 instruction sets. 
For most processors A32 (arm mode) code is generated by default but many modern 
cpus also use T32 code generation as the default or a mix of both.

If we do not provide a flag then compiler decides the best possible code 
generation for the target which is most commonly used configuration.

Thats why i have removed this flag from out testing so that we can have a 
clarity on what is working when compiler selects both A32/T32 and T16 
instructions interchangeably.

http://reviews.llvm.org/D14823

Files:
  packages/Python/lldbsuite/test/make/Makefile.rules

Index: packages/Python/lldbsuite/test/make/Makefile.rules
===
--- packages/Python/lldbsuite/test/make/Makefile.rules
+++ packages/Python/lldbsuite/test/make/Makefile.rules
@@ -164,6 +164,10 @@
override ARCH :=
override ARCHFLAG :=
endif
+   ifeq "$(ARCH)" "arm"
+   override ARCH :=
+   override ARCHFLAG :=
+   endif
 
ifeq "$(SPLIT_DEBUG_SYMBOLS)" "YES"
DSYM = $(EXE).debug


Index: packages/Python/lldbsuite/test/make/Makefile.rules
===
--- packages/Python/lldbsuite/test/make/Makefile.rules
+++ packages/Python/lldbsuite/test/make/Makefile.rules
@@ -164,6 +164,10 @@
 		override ARCH :=
 		override ARCHFLAG :=
 	endif
+	ifeq "$(ARCH)" "arm"
+		override ARCH :=
+		override ARCHFLAG :=
+	endif
 
 	ifeq "$(SPLIT_DEBUG_SYMBOLS)" "YES"
 		DSYM = $(EXE).debug
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [lldb] r253575 - Revert "prepare_bindings.py: enable static bindings"

2015-11-19 Thread Todd Fiala via lldb-commits
Author: tfiala
Date: Thu Nov 19 10:56:12 2015
New Revision: 253575

URL: http://llvm.org/viewvc/llvm-project?rev=253575&view=rev
Log:
Revert "prepare_bindings.py: enable static bindings"

This reverts commit 40f789f2dc6bb80fd25a33f91e452d081ed9d0ee.

Removed:
lldb/trunk/scripts/Python/static-binding/LLDBWrapPython.cpp
lldb/trunk/scripts/Python/static-binding/lldb.py
Modified:
lldb/trunk/lldb.xcodeproj/project.pbxproj
lldb/trunk/scripts/Python/prepare_binding_Python.py
lldb/trunk/scripts/prepare_bindings.py

Modified: lldb/trunk/lldb.xcodeproj/project.pbxproj
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/lldb.xcodeproj/project.pbxproj?rev=253575&r1=253574&r2=253575&view=diff
==
--- lldb/trunk/lldb.xcodeproj/project.pbxproj (original)
+++ lldb/trunk/lldb.xcodeproj/project.pbxproj Thu Nov 19 10:56:12 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 --allow-static-binding";
+   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;

Modified: lldb/trunk/scripts/Python/prepare_binding_Python.py
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/scripts/Python/prepare_binding_Python.py?rev=253575&r1=253574&r2=253575&view=diff
==
--- lldb/trunk/scripts/Python/prepare_binding_Python.py (original)
+++ lldb/trunk/scripts/Python/prepare_binding_Python.py Thu Nov 19 10:56:12 2015
@@ -251,42 +251,6 @@ def do_swig_rebuild(options, dependency_
 sys.exit(-10)
 
 
-def copy_static_bindings(options, config_build_dir, settings):
-"""Copies the static Python bindings over to the build dir.
-"""
-
-# Copy the LLDBWrapPython.cpp C++ binding file impl over.
-lldb_wrap_python_src_path = os.path.join(
-options.src_root,
-"scripts",
-"Python",
-options.static_binding_dir,
-"LLDBWrapPython.cpp")
-if not os.path.exists(lldb_wrap_python_src_path):
-logging.error(
-"failed to find static Python binding .cpp file at '%s'",
-lldb_wrap_python_src_path)
-sys.exit(-12)
-shutil.copyfile(lldb_wrap_python_src_path, settings.output_file)
-
-# Copy the lldb.py impl over.
-lldb_py_src_path = os.path.join(
-options.src_root,
-"scripts",
-"Python",
-options.static_binding_dir,
-"lldb.py")
-if not os.path.exists(lldb_py_src_path):
-logging.error(
-"failed to find static Python binding .py file at '%s'",
-lldb_py_src_path)
-sys.exit(-13)
-lldb_py_dest_path = os.path.join(
-os.path.dirname(settings.output_file),
-"lldb.py")
-shutil.copyfile(lldb_py_src_path, lldb_py_dest_path)
-
-
 def run_python_script(script_and_args):
 """Runs a python script, logging appropriately.
 
@@ -454,21 +418,14 @@ def main(options):
 "Skipping Python binding generation: everything is up to date")
 return
 
-# Generate the Python binding with swig, or use the static bindings if no 
swig.
-if not options.swig_executable or not 
os.path.exists(options.swig_executable):
-# Copy over the static bindings.  We capture the the modified (i.e. 
post-processed)
-# binding, so we don't do the modify step here - the modifications have
-# already been applied.
-copy_static_bindings(options, config_build_dir, settings)
-else:
-# Generate the bindings with swig.
-logging.info("Python binding is out of date, regenerating")
-do_swig_rebuild(options, dependency_file, config_build_dir, settings)
-if options.generate_dependency_file:
-return
+# Generate the Python binding with swig.
+logging.info("Python binding is out of date, regenerating")
+do_swig_rebuild(options, dependency_file, config_build_dir, settings)
+if options.generate_dependency_file:
+return
 
-# Post process the swig-generated file.
-do_modify_python_lldb(options, config_build_dir)
+# Post process the swig-generated file.
+do_modify_python_lldb(options, config_build_dir)
 
 
 # This script can be called by another Python script by calling the main()


___
lldb-commits mailing list
lldb-com

Re: [Lldb-commits] [PATCH] D14816: Use thumb instruction set for ldb-server on android arm

2015-11-19 Thread Muhammad Omair Javaid via lldb-commits
omjavaid added a subscriber: omjavaid.
omjavaid added a comment.

-mthumb will force T32 instruction set while -marm will force A32.

Best is not to use any of these flags to let the compiler decide best
possible instruction set combination.


http://reviews.llvm.org/D14816



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


Re: [Lldb-commits] [PATCH] D14816: Use thumb instruction set for ldb-server on android arm

2015-11-19 Thread Omair Javaid via lldb-commits
-mthumb will force T32 instruction set while -marm will force A32.

Best is not to use any of these flags to let the compiler decide best
possible instruction set combination.

On 19 November 2015 at 20:38, Oleksiy Vyalov via lldb-commits
 wrote:
> ovyalov accepted this revision.
> ovyalov added a comment.
>
> LGTM
>
>
> http://reviews.llvm.org/D14816
>
>
>
> ___
> lldb-commits mailing list
> lldb-commits@lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


Re: [Lldb-commits] [PATCH] D14816: Use thumb instruction set for ldb-server on android arm

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

In http://reviews.llvm.org/D14816#292929, @omjavaid wrote:

> -mthumb will force T32 instruction set while -marm will force A32.
>
> Best is not to use any of these flags to let the compiler decide best
>  possible instruction set combination.


I think because we specify -march=armv7-a to have the necessary 64 bit atomic 
instructions the compiler decide to use arm in every case. Forcing the 
instruction set to thumb reduces the size of the final release binary by ~30% 
while have negligible run time speed impact so it will help us speed up the 
iteration cycle (smaller lldb-server means we have to copy less data between 
host and target).


http://reviews.llvm.org/D14816



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


Re: [Lldb-commits] [PATCH] D14823: Disable forcing -marm (A32 instruction set) while running testsuite on arm targets.

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

Can we create a setup where the test suit is capable of running in all 3 mode 
(arm/thumb/mixed)?

I think we should introduce a new architecture called "arm-thumb" (open for 
better name suggestions) what run the test suit in mixed mode while running the 
test suit with "-A arm" or "-A thumb" should still force the architecture to 
the specified one.


http://reviews.llvm.org/D14823



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


Re: [Lldb-commits] [PATCH] D14530: Plug-in PlatformNetBSD initializer and terminator

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

This patch was accepted on November 13th. So yes this is ready to land. Not 
sure what you are waiting for?


Repository:
  rL LLVM

http://reviews.llvm.org/D14530



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


Re: [Lldb-commits] [PATCH] D14793: Enable saving of mini dumps with lldb process save-core.

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

Yes, I agree Zach, the caller of SaveCore should verify the process is in a 
good state first. The only downside of that is if the windows mini-dumper can 
actually make a core file on a running process, we might want to allow this and 
make actual SaveCore implementations make that call?


http://reviews.llvm.org/D14793



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


Re: [Lldb-commits] [PATCH] D14793: Enable saving of mini dumps with lldb process save-core.

2015-11-19 Thread Zachary Turner via lldb-commits
zturner added a comment.

In http://reviews.llvm.org/D14793#293007, @clayborg wrote:

> Yes, I agree Zach, the caller of SaveCore should verify the process is in a 
> good state first. The only downside of that is if the windows mini-dumper can 
> actually make a core file on a running process, we might want to allow this 
> and make actual SaveCore implementations make that call?


Windows has to have a stopped process before you can make a core.  In other 
windows debuggers (MSVC and WinDbg, for example) the user of the debugger has 
to issue a stop command before the "Save Core Dump" command will work.


http://reviews.llvm.org/D14793



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


Re: [Lldb-commits] [PATCH] D13350: [lldb] Fix evaluation of qualified global variables

2015-11-19 Thread Greg Clayton via lldb-commits
clayborg resigned from this revision.
clayborg edited reviewers, added: jingham, spyffe; removed: clayborg.
clayborg added a comment.

Resigning as I will let Jim Ingham and Sean Callanan review.


http://reviews.llvm.org/D13350



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


Re: [Lldb-commits] [PATCH] D14793: Enable saving of mini dumps with lldb process save-core.

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

OK, then callers of SaveCore should make sure the process is in a good state 
before calling the API.


http://reviews.llvm.org/D14793



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


[Lldb-commits] [lldb] r253589 - Pass -fms-compatibility-version when building test inferiors.

2015-11-19 Thread Zachary Turner via lldb-commits
Author: zturner
Date: Thu Nov 19 13:10:54 2015
New Revision: 253589

URL: http://llvm.org/viewvc/llvm-project?rev=253589&view=rev
Log:
Pass -fms-compatibility-version when building test inferiors.

-fms-compatibility-version defaults to VS 2013.  When using
VS 2015, this will lead to compilation failures of the test
inferiors in the C++ standard library for language conformance
reasons.

The fix here is to simply pass -fms-compatibility-version=19.0 when
we detect that a VS 2015 compiler is present.  Even though we're
actually using clang to do the compilation, clang uses this same
detection algorithm to determine the location of the standard
library.  So this check is tantanmount to saying "If clang is going
to find MSVC 2015's standard library, then pass 19.0 for
-fms-compatibility-version.

Modified:
lldb/trunk/packages/Python/lldbsuite/test/make/Makefile.rules

Modified: lldb/trunk/packages/Python/lldbsuite/test/make/Makefile.rules
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/make/Makefile.rules?rev=253589&r1=253588&r2=253589&view=diff
==
--- lldb/trunk/packages/Python/lldbsuite/test/make/Makefile.rules (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/make/Makefile.rules Thu Nov 19 
13:10:54 2015
@@ -253,6 +253,9 @@ ifeq "$(OS)" "Windows_NT"
# Clang for Windows doesn't support C++ Exceptions
CXXFLAGS += -fno-exceptions
CXXFLAGS += -D_HAS_EXCEPTIONS=0
+   ifeq "$(VisualStudioVersion)" "14.0"
+   CXXFLAGS += -fms-compatibility-version=19.0
+   endif
# The MSVC linker doesn't understand long section names
# generated by the clang compiler.
LDFLAGS += -fuse-ld=lld


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


Re: [Lldb-commits] [PATCH] D14530: Plug-in PlatformNetBSD initializer and terminator

2015-11-19 Thread Kamil Rytarowski via lldb-commits
krytarowski added a comment.

In http://reviews.llvm.org/D14530#293000, @clayborg wrote:

> This patch was accepted on November 13th. So yes this is ready to land. Not 
> sure what you are waiting for?


Thank you for your reply. I cannot land them myself as I'm not a committer.

My latest patches were merged by @brucem,


Repository:
  rL LLVM

http://reviews.llvm.org/D14530



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


[Lldb-commits] [lldb] r253599 - Fix an issue where LLDB would not launch argdumper correctly if there were spaces in the path to it

2015-11-19 Thread Enrico Granata via lldb-commits
Author: enrico
Date: Thu Nov 19 15:17:56 2015
New Revision: 253599

URL: http://llvm.org/viewvc/llvm-project?rev=253599&view=rev
Log:
Fix an issue where LLDB would not launch argdumper correctly if there were 
spaces in the path to it

Modified:
lldb/trunk/source/Host/macosx/Host.mm
lldb/trunk/source/Host/windows/Host.cpp

Modified: lldb/trunk/source/Host/macosx/Host.mm
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Host/macosx/Host.mm?rev=253599&r1=253598&r2=253599&view=diff
==
--- lldb/trunk/source/Host/macosx/Host.mm (original)
+++ lldb/trunk/source/Host/macosx/Host.mm Thu Nov 19 15:17:56 2015
@@ -1366,8 +1366,11 @@ Host::ShellExpandArguments (ProcessLaunc
 error.SetErrorStringWithFormat("could not find the lldb-argdumper 
tool: %s", expand_tool_spec.GetPath().c_str());
 return error;
 }
+
+StreamString expand_tool_spec_stream;
+
expand_tool_spec_stream.Printf("\"%s\"",expand_tool_spec.GetPath().c_str());
 
-Args expand_command(expand_tool_spec.GetPath().c_str());
+Args expand_command(expand_tool_spec_stream.GetData());
 expand_command.AppendArguments (launch_info.GetArguments());
 
 int status;

Modified: lldb/trunk/source/Host/windows/Host.cpp
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Host/windows/Host.cpp?rev=253599&r1=253598&r2=253599&view=diff
==
--- lldb/trunk/source/Host/windows/Host.cpp (original)
+++ lldb/trunk/source/Host/windows/Host.cpp Thu Nov 19 15:17:56 2015
@@ -245,7 +245,7 @@ Host::ShellExpandArguments (ProcessLaunc
 std::replace(quoted_cmd_string.begin(), quoted_cmd_string.end(), '\\', 
'/');
 StreamString expand_command;
 
-expand_command.Printf("%s %s",
+expand_command.Printf("\"%s\" %s",
   expand_tool_spec.GetPath().c_str(),
   quoted_cmd_string.c_str());
 


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


[Lldb-commits] [lldb] r253601 - Plug-in PlatformNetBSD initializer and terminator

2015-11-19 Thread Ed Maste via lldb-commits
Author: emaste
Date: Thu Nov 19 15:30:22 2015
New Revision: 253601

URL: http://llvm.org/viewvc/llvm-project?rev=253601&view=rev
Log:
Plug-in PlatformNetBSD initializer and terminator

Patch by Kamil Rytarowski

Differential Revision:  http://reviews.llvm.org/D14530

Modified:
lldb/trunk/source/Initialization/SystemInitializerCommon.cpp

Modified: lldb/trunk/source/Initialization/SystemInitializerCommon.cpp
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Initialization/SystemInitializerCommon.cpp?rev=253601&r1=253600&r2=253601&view=diff
==
--- lldb/trunk/source/Initialization/SystemInitializerCommon.cpp (original)
+++ lldb/trunk/source/Initialization/SystemInitializerCommon.cpp Thu Nov 19 
15:30:22 2015
@@ -115,6 +115,7 @@ SystemInitializerCommon::Initialize()
 DynamicLoaderWindowsDYLD::Initialize();
 platform_freebsd::PlatformFreeBSD::Initialize();
 platform_linux::PlatformLinux::Initialize();
+platform_netbsd::PlatformNetBSD::Initialize();
 PlatformWindows::Initialize();
 PlatformKalimba::Initialize();
 platform_android::PlatformAndroid::Initialize();
@@ -162,6 +163,7 @@ SystemInitializerCommon::Terminate()
 DynamicLoaderWindowsDYLD::Terminate();
 platform_freebsd::PlatformFreeBSD::Terminate();
 platform_linux::PlatformLinux::Terminate();
+platform_netbsd::PlatformNetBSD::Terminate();
 PlatformWindows::Terminate();
 PlatformKalimba::Terminate();
 platform_android::PlatformAndroid::Terminate();


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


Re: [Lldb-commits] [PATCH] D14530: Plug-in PlatformNetBSD initializer and terminator

2015-11-19 Thread Ed Maste via lldb-commits
This revision was automatically updated to reflect the committed changes.
Closed by commit rL253601: Plug-in PlatformNetBSD initializer and terminator 
(authored by emaste).

Changed prior to commit:
  http://reviews.llvm.org/D14530?vs=39788&id=40700#toc

Repository:
  rL LLVM

http://reviews.llvm.org/D14530

Files:
  lldb/trunk/source/Initialization/SystemInitializerCommon.cpp

Index: lldb/trunk/source/Initialization/SystemInitializerCommon.cpp
===
--- lldb/trunk/source/Initialization/SystemInitializerCommon.cpp
+++ lldb/trunk/source/Initialization/SystemInitializerCommon.cpp
@@ -115,6 +115,7 @@
 DynamicLoaderWindowsDYLD::Initialize();
 platform_freebsd::PlatformFreeBSD::Initialize();
 platform_linux::PlatformLinux::Initialize();
+platform_netbsd::PlatformNetBSD::Initialize();
 PlatformWindows::Initialize();
 PlatformKalimba::Initialize();
 platform_android::PlatformAndroid::Initialize();
@@ -162,6 +163,7 @@
 DynamicLoaderWindowsDYLD::Terminate();
 platform_freebsd::PlatformFreeBSD::Terminate();
 platform_linux::PlatformLinux::Terminate();
+platform_netbsd::PlatformNetBSD::Terminate();
 PlatformWindows::Terminate();
 PlatformKalimba::Terminate();
 platform_android::PlatformAndroid::Terminate();


Index: lldb/trunk/source/Initialization/SystemInitializerCommon.cpp
===
--- lldb/trunk/source/Initialization/SystemInitializerCommon.cpp
+++ lldb/trunk/source/Initialization/SystemInitializerCommon.cpp
@@ -115,6 +115,7 @@
 DynamicLoaderWindowsDYLD::Initialize();
 platform_freebsd::PlatformFreeBSD::Initialize();
 platform_linux::PlatformLinux::Initialize();
+platform_netbsd::PlatformNetBSD::Initialize();
 PlatformWindows::Initialize();
 PlatformKalimba::Initialize();
 platform_android::PlatformAndroid::Initialize();
@@ -162,6 +163,7 @@
 DynamicLoaderWindowsDYLD::Terminate();
 platform_freebsd::PlatformFreeBSD::Terminate();
 platform_linux::PlatformLinux::Terminate();
+platform_netbsd::PlatformNetBSD::Terminate();
 PlatformWindows::Terminate();
 PlatformKalimba::Terminate();
 platform_android::PlatformAndroid::Terminate();
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [lldb] r253604 - Cleanup work required to get the ASAN tests to run in the new test suite infrastructure; the tests are now xfailed on Darwin pending investigation

2015-11-19 Thread Enrico Granata via lldb-commits
Author: enrico
Date: Thu Nov 19 15:45:07 2015
New Revision: 253604

URL: http://llvm.org/viewvc/llvm-project?rev=253604&view=rev
Log:
Cleanup work required to get the ASAN tests to run in the new test suite 
infrastructure; the tests are now xfailed on Darwin pending investigation

Modified:
lldb/trunk/packages/Python/lldbsuite/test/functionalities/asan/Makefile

lldb/trunk/packages/Python/lldbsuite/test/functionalities/asan/TestMemoryHistory.py

lldb/trunk/packages/Python/lldbsuite/test/functionalities/asan/TestReportData.py
lldb/trunk/packages/Python/lldbsuite/test/lldbtest.py

Modified: 
lldb/trunk/packages/Python/lldbsuite/test/functionalities/asan/Makefile
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/functionalities/asan/Makefile?rev=253604&r1=253603&r2=253604&view=diff
==
--- lldb/trunk/packages/Python/lldbsuite/test/functionalities/asan/Makefile 
(original)
+++ lldb/trunk/packages/Python/lldbsuite/test/functionalities/asan/Makefile Thu 
Nov 19 15:45:07 2015
@@ -1,6 +1,6 @@
 LEVEL = ../../make
 
 C_SOURCES := main.c
-CFLAGS := $(CFLAGS) -fsanitize=address -g
+CFLAGS_EXTRAS := -fsanitize=address -g
 
 include $(LEVEL)/Makefile.rules

Modified: 
lldb/trunk/packages/Python/lldbsuite/test/functionalities/asan/TestMemoryHistory.py
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/functionalities/asan/TestMemoryHistory.py?rev=253604&r1=253603&r2=253604&view=diff
==
--- 
lldb/trunk/packages/Python/lldbsuite/test/functionalities/asan/TestMemoryHistory.py
 (original)
+++ 
lldb/trunk/packages/Python/lldbsuite/test/functionalities/asan/TestMemoryHistory.py
 Thu Nov 19 15:45:07 2015
@@ -23,6 +23,7 @@ class AsanTestCase(TestBase):
 @skipIfFreeBSD # llvm.org/pr21136 runtimes not yet available by default
 @skipIfRemote
 @skipUnlessCompilerRt
+@expectedFailureDarwin
 def test (self):
 compiler = self.findBuiltClang ()
 self.build (None, compiler)
@@ -51,7 +52,7 @@ class AsanTestCase(TestBase):
 
 # ASan will relaunch the process to insert its library.
 self.expect("thread list", "Process should be stopped due to exec.",
-substrs = ['stopped', 'stop reason = exec'])
+substrs = ['stopped', 'stop reason = '])
 
 self.runCmd("continue")
 

Modified: 
lldb/trunk/packages/Python/lldbsuite/test/functionalities/asan/TestReportData.py
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/functionalities/asan/TestReportData.py?rev=253604&r1=253603&r2=253604&view=diff
==
--- 
lldb/trunk/packages/Python/lldbsuite/test/functionalities/asan/TestReportData.py
 (original)
+++ 
lldb/trunk/packages/Python/lldbsuite/test/functionalities/asan/TestReportData.py
 Thu Nov 19 15:45:07 2015
@@ -24,6 +24,7 @@ class AsanTestReportDataCase(TestBase):
 @skipIfFreeBSD # llvm.org/pr21136 runtimes not yet available by default
 @skipIfRemote
 @skipUnlessCompilerRt
+@expectedFailureDarwin
 def test(self):
 compiler = self.findBuiltClang ()
 self.build (None, compiler)
@@ -45,7 +46,7 @@ class AsanTestReportDataCase(TestBase):
 
 # ASan will relaunch the process to insert its library.
 self.expect("thread list", "Process should be stopped due to exec.",
-substrs = ['stopped', 'stop reason = exec'])
+substrs = ['stopped', 'stop reason = '])
 
 # no extended info when we have no ASan report
 thread = self.dbg.GetSelectedTarget().process.GetSelectedThread()

Modified: lldb/trunk/packages/Python/lldbsuite/test/lldbtest.py
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/lldbtest.py?rev=253604&r1=253603&r2=253604&view=diff
==
--- lldb/trunk/packages/Python/lldbsuite/test/lldbtest.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/lldbtest.py Thu Nov 19 15:45:07 
2015
@@ -1225,7 +1225,8 @@ def skipUnlessCompilerRt(func):
 def wrapper(*args, **kwargs):
 from unittest2 import case
 import os.path
-compilerRtPath = os.path.join(os.path.dirname(__file__), "..", "..", 
"..", "projects", "compiler-rt")
+compilerRtPath = os.path.join(os.path.dirname(__file__), "..", "..", 
"..", "..", "llvm","projects","compiler-rt")
+print(compilerRtPath)
 if not os.path.exists(compilerRtPath):
 self = args[0]
 self.skipTest("skip if compiler-rt not found")
@@ -2195,7 +2196,7 @@ class Base(unittest2.TestCase):
   "llvm-build/Release/x86_64/Release/bin/clang",
   "llvm-build/Debug/x86_64/Debug/bin/clang",
 ]
-lldb_root_path = os.path.join(os.pa

[Lldb-commits] [lldb] r253613 - Fix up LLDB for a change in the way clang represents anonymous unions such that the 'frame variable' command can still find the members of such union as if they were to

2015-11-19 Thread Enrico Granata via lldb-commits
Author: enrico
Date: Thu Nov 19 16:28:58 2015
New Revision: 253613

URL: http://llvm.org/viewvc/llvm-project?rev=253613&view=rev
Log:
Fix up LLDB for a change in the way clang represents anonymous unions such that 
the 'frame variable' command can still find the members of such union as if 
they were top-level variables in the current scope


Added:
lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/frame-var-anon-unions/

lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/frame-var-anon-unions/Makefile

lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/frame-var-anon-unions/TestFrameVariableAnonymousUnions.py

lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/frame-var-anon-unions/main.cpp
Modified:
lldb/trunk/include/lldb/Target/StackFrame.h
lldb/trunk/source/Commands/CommandObjectFrame.cpp
lldb/trunk/source/Target/StackFrame.cpp

Modified: lldb/trunk/include/lldb/Target/StackFrame.h
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Target/StackFrame.h?rev=253613&r1=253612&r2=253613&view=diff
==
--- lldb/trunk/include/lldb/Target/StackFrame.h (original)
+++ lldb/trunk/include/lldb/Target/StackFrame.h Thu Nov 19 16:28:58 2015
@@ -47,11 +47,12 @@ class StackFrame :
 public:
 enum ExpressionPathOption
 {
-eExpressionPathOptionCheckPtrVsMember   = (1u << 0),
-eExpressionPathOptionsNoFragileObjcIvar = (1u << 1),
-eExpressionPathOptionsNoSyntheticChildren   = (1u << 2),
-eExpressionPathOptionsNoSyntheticArrayRange = (1u << 3),
-eExpressionPathOptionsAllowDirectIVarAccess = (1u << 4)
+eExpressionPathOptionCheckPtrVsMember= (1u << 0),
+eExpressionPathOptionsNoFragileObjcIvar  = (1u << 1),
+eExpressionPathOptionsNoSyntheticChildren= (1u << 2),
+eExpressionPathOptionsNoSyntheticArrayRange  = (1u << 3),
+eExpressionPathOptionsAllowDirectIVarAccess  = (1u << 4),
+eExpressionPathOptionsInspectAnonymousUnions = (1u << 5)
 };
 
 //--

Added: 
lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/frame-var-anon-unions/Makefile
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/frame-var-anon-unions/Makefile?rev=253613&view=auto
==
--- 
lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/frame-var-anon-unions/Makefile
 (added)
+++ 
lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/frame-var-anon-unions/Makefile
 Thu Nov 19 16:28:58 2015
@@ -0,0 +1,5 @@
+LEVEL = ../../../make
+
+CXX_SOURCES := main.cpp
+
+include $(LEVEL)/Makefile.rules

Added: 
lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/frame-var-anon-unions/TestFrameVariableAnonymousUnions.py
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/frame-var-anon-unions/TestFrameVariableAnonymousUnions.py?rev=253613&view=auto
==
--- 
lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/frame-var-anon-unions/TestFrameVariableAnonymousUnions.py
 (added)
+++ 
lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/frame-var-anon-unions/TestFrameVariableAnonymousUnions.py
 Thu Nov 19 16:28:58 2015
@@ -0,0 +1,27 @@
+"""
+Tests that frame variable looks into anonymous unions
+"""
+import lldb
+from lldbsuite.test.lldbtest import *
+import lldbsuite.test.lldbutil as lldbutil
+
+class FrameVariableAnonymousUnionsTestCase(TestBase):
+
+mydir = TestBase.compute_mydir(__file__)
+
+def test_with_run_command(self):
+"""Tests that frame variable looks into anonymous unions"""
+self.build()
+self.runCmd("file a.out", CURRENT_EXECUTABLE_SET)
+
+line = line_number('main.cpp', '// break here')
+lldbutil.run_break_set_by_file_and_line (self, "main.cpp", line, 
num_expected_locations=-1, loc_exact=False)
+
+self.runCmd("process launch", RUN_SUCCEEDED)
+
+self.expect('frame variable -f x i', substrs=['ff41'])
+self.expect('frame variable c', substrs=["'A"])
+
+self.expect('frame variable x', matching=False, substrs=['3'])
+self.expect('frame variable y', matching=False, substrs=["'B'"])
+self.expect('frame variable z', matching=False, substrs=['14'])

Added: 
lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/frame-var-anon-unions/main.cpp
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/frame-var-anon-unions/main.cpp?rev=253613&view=auto
==
--- 
lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/frame-var-anon-unions/main.cpp
 (added)
+++ 
lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/frame-var-anon-unions/main.cpp
 Thu Nov 19 16

[Lldb-commits] [PATCH] D14844: Revert "Plug-in PlatformNetBSD initializer and terminator"

2015-11-19 Thread Siva Chandra via lldb-commits
sivachandra created this revision.
sivachandra added reviewers: emaste, krytarowski.
sivachandra added a subscriber: lldb-commits.

This reverts commit 2354cd73101e58540b8b39783df462d06023309f as it
introduced a bunch regressions on the linux bot.

http://reviews.llvm.org/D14844

Files:
  source/Initialization/SystemInitializerCommon.cpp

Index: source/Initialization/SystemInitializerCommon.cpp
===
--- source/Initialization/SystemInitializerCommon.cpp
+++ source/Initialization/SystemInitializerCommon.cpp
@@ -115,7 +115,6 @@
 DynamicLoaderWindowsDYLD::Initialize();
 platform_freebsd::PlatformFreeBSD::Initialize();
 platform_linux::PlatformLinux::Initialize();
-platform_netbsd::PlatformNetBSD::Initialize();
 PlatformWindows::Initialize();
 PlatformKalimba::Initialize();
 platform_android::PlatformAndroid::Initialize();
@@ -163,7 +162,6 @@
 DynamicLoaderWindowsDYLD::Terminate();
 platform_freebsd::PlatformFreeBSD::Terminate();
 platform_linux::PlatformLinux::Terminate();
-platform_netbsd::PlatformNetBSD::Terminate();
 PlatformWindows::Terminate();
 PlatformKalimba::Terminate();
 platform_android::PlatformAndroid::Terminate();


Index: source/Initialization/SystemInitializerCommon.cpp
===
--- source/Initialization/SystemInitializerCommon.cpp
+++ source/Initialization/SystemInitializerCommon.cpp
@@ -115,7 +115,6 @@
 DynamicLoaderWindowsDYLD::Initialize();
 platform_freebsd::PlatformFreeBSD::Initialize();
 platform_linux::PlatformLinux::Initialize();
-platform_netbsd::PlatformNetBSD::Initialize();
 PlatformWindows::Initialize();
 PlatformKalimba::Initialize();
 platform_android::PlatformAndroid::Initialize();
@@ -163,7 +162,6 @@
 DynamicLoaderWindowsDYLD::Terminate();
 platform_freebsd::PlatformFreeBSD::Terminate();
 platform_linux::PlatformLinux::Terminate();
-platform_netbsd::PlatformNetBSD::Terminate();
 PlatformWindows::Terminate();
 PlatformKalimba::Terminate();
 platform_android::PlatformAndroid::Terminate();
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [lldb] r253615 - Revert "Plug-in PlatformNetBSD initializer and terminator"

2015-11-19 Thread Siva Chandra via lldb-commits
Author: sivachandra
Date: Thu Nov 19 16:58:48 2015
New Revision: 253615

URL: http://llvm.org/viewvc/llvm-project?rev=253615&view=rev
Log:
Revert "Plug-in PlatformNetBSD initializer and terminator"

Summary:
This reverts commit 2354cd73101e58540b8b39783df462d06023309f as it
introduced a bunch regressions on the linux bot.

Reviewers: emaste, krytarowski

Subscribers: lldb-commits

Differential Revision: http://reviews.llvm.org/D14844

Modified:
lldb/trunk/source/Initialization/SystemInitializerCommon.cpp

Modified: lldb/trunk/source/Initialization/SystemInitializerCommon.cpp
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Initialization/SystemInitializerCommon.cpp?rev=253615&r1=253614&r2=253615&view=diff
==
--- lldb/trunk/source/Initialization/SystemInitializerCommon.cpp (original)
+++ lldb/trunk/source/Initialization/SystemInitializerCommon.cpp Thu Nov 19 
16:58:48 2015
@@ -115,7 +115,6 @@ SystemInitializerCommon::Initialize()
 DynamicLoaderWindowsDYLD::Initialize();
 platform_freebsd::PlatformFreeBSD::Initialize();
 platform_linux::PlatformLinux::Initialize();
-platform_netbsd::PlatformNetBSD::Initialize();
 PlatformWindows::Initialize();
 PlatformKalimba::Initialize();
 platform_android::PlatformAndroid::Initialize();
@@ -163,7 +162,6 @@ SystemInitializerCommon::Terminate()
 DynamicLoaderWindowsDYLD::Terminate();
 platform_freebsd::PlatformFreeBSD::Terminate();
 platform_linux::PlatformLinux::Terminate();
-platform_netbsd::PlatformNetBSD::Terminate();
 PlatformWindows::Terminate();
 PlatformKalimba::Terminate();
 platform_android::PlatformAndroid::Terminate();


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


[Lldb-commits] [lldb] r253616 - Fixed Xcode build by adding the PlatformNetBSD code.

2015-11-19 Thread Greg Clayton via lldb-commits
Author: gclayton
Date: Thu Nov 19 17:04:09 2015
New Revision: 253616

URL: http://llvm.org/viewvc/llvm-project?rev=253616&view=rev
Log:
Fixed Xcode build by adding the PlatformNetBSD code.


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=253616&r1=253615&r2=253616&view=diff
==
--- lldb/trunk/lldb.xcodeproj/project.pbxproj (original)
+++ lldb/trunk/lldb.xcodeproj/project.pbxproj Thu Nov 19 17:04:09 2015
@@ -632,6 +632,8 @@
26E152261419CAD4007967D0 /* ObjectFilePECOFF.cpp in Sources */ 
= {isa = PBXBuildFile; fileRef = 26E152231419CACA007967D0 /* 
ObjectFilePECOFF.cpp */; };
26ECA04313665FED008D1F18 /* ARM_DWARF_Registers.cpp in Sources 
*/ = {isa = PBXBuildFile; fileRef = 26ECA04213665FED008D1F18 /* 
ARM_DWARF_Registers.cpp */; };
26ED3D6D13C563810017D45E /* OptionGroupVariable.cpp in Sources 
*/ = {isa = PBXBuildFile; fileRef = 26ED3D6C13C563810017D45E /* 
OptionGroupVariable.cpp */; };
+   26EFB61B1BFE8D3E00544801 /* PlatformNetBSD.cpp in Sources */ = 
{isa = PBXBuildFile; fileRef = 26EFB6181BFE8D3E00544801 /* PlatformNetBSD.cpp 
*/; settings = {ASSET_TAGS = (); }; };
+   26EFB61C1BFE8D3E00544801 /* PlatformNetBSD.h in Headers */ = 
{isa = PBXBuildFile; fileRef = 26EFB6191BFE8D3E00544801 /* PlatformNetBSD.h */; 
settings = {ASSET_TAGS = (); }; };
26EFC4CD18CFAF0D00865D87 /* ObjectFileJIT.cpp in Sources */ = 
{isa = PBXBuildFile; fileRef = 26EFC4CA18CFAF0D00865D87 /* ObjectFileJIT.cpp 
*/; };
26F006561B4DD86700B872E5 /* DynamicLoaderWindowsDYLD.cpp in 
Sources */ = {isa = PBXBuildFile; fileRef = 26F006541B4DD86700B872E5 /* 
DynamicLoaderWindowsDYLD.cpp */; };
26F4A21C13FBA31A0064B613 /* ThreadMemory.cpp in Sources */ = 
{isa = PBXBuildFile; fileRef = 26F4A21A13FBA31A0064B613 /* ThreadMemory.cpp */; 
};
@@ -2177,6 +2179,8 @@
26ECA04213665FED008D1F18 /* ARM_DWARF_Registers.cpp */ = {isa = 
PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; 
name = ARM_DWARF_Registers.cpp; path = source/Utility/ARM_DWARF_Registers.cpp; 
sourceTree = ""; };
26ED3D6C13C563810017D45E /* OptionGroupVariable.cpp */ = {isa = 
PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; 
name = OptionGroupVariable.cpp; path = 
source/Interpreter/OptionGroupVariable.cpp; sourceTree = ""; };
26ED3D6F13C5638A0017D45E /* OptionGroupVariable.h */ = {isa = 
PBXFileReference; lastKnownFileType = sourcecode.c.h; name = 
OptionGroupVariable.h; path = include/lldb/Interpreter/OptionGroupVariable.h; 
sourceTree = ""; };
+   26EFB6181BFE8D3E00544801 /* PlatformNetBSD.cpp */ = {isa = 
PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; 
path = PlatformNetBSD.cpp; sourceTree = ""; };
+   26EFB6191BFE8D3E00544801 /* PlatformNetBSD.h */ = {isa = 
PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = 
PlatformNetBSD.h; sourceTree = ""; };
26EFC4CA18CFAF0D00865D87 /* ObjectFileJIT.cpp */ = {isa = 
PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; 
path = ObjectFileJIT.cpp; sourceTree = ""; };
26EFC4CB18CFAF0D00865D87 /* ObjectFileJIT.h */ = {isa = 
PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = 
ObjectFileJIT.h; sourceTree = ""; };
26F006541B4DD86700B872E5 /* DynamicLoaderWindowsDYLD.cpp */ = 
{isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = 
sourcecode.cpp.cpp; path = DynamicLoaderWindowsDYLD.cpp; sourceTree = 
""; };
@@ -4958,6 +4962,7 @@
23042D0F1976C9D800621B2C /* Kalimba */,
2694E99F14FC0BBD0076DE67 /* Linux */,
26C5577F132575C8008FD8FE /* MacOSX */,
+   26EFB6151BFE8D3E00544801 /* NetBSD */,
9457596415349416005A9070 /* POSIX */,
490A36BA180F0E6F00BA31F8 /* Windows */,
);
@@ -5079,6 +5084,15 @@
path = PECOFF;
sourceTree = "";
};
+   26EFB6151BFE8D3E00544801 /* NetBSD */ = {
+   isa = PBXGroup;
+   children = (
+   26EFB6181BFE8D3E00544801 /* PlatformNetBSD.cpp 
*/,
+   26EFB6191BFE8D3E00544801 /* PlatformNetBSD.h */,
+   );
+   path = NetBSD;
+   sourceTree = "";
+   };
26EFC4C718CFAF0D00865D87 /* JIT */ = {
isa = PBXGroup;

[Lldb-commits] [lldb] r253618 - Fix a crasher in SymbolContext::SortTypeList() where something that was iterating over a std::multimap was actually mutating the list.

2015-11-19 Thread Greg Clayton via lldb-commits
Author: gclayton
Date: Thu Nov 19 17:10:45 2015
New Revision: 253618

URL: http://llvm.org/viewvc/llvm-project?rev=253618&view=rev
Log:
Fix a crasher in SymbolContext::SortTypeList() where something that was 
iterating over a std::multimap was actually mutating the list.




Modified:
lldb/trunk/include/lldb/Symbol/TypeMap.h
lldb/trunk/source/Symbol/SymbolContext.cpp
lldb/trunk/source/Symbol/TypeMap.cpp

Modified: lldb/trunk/include/lldb/Symbol/TypeMap.h
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Symbol/TypeMap.h?rev=253618&r1=253617&r2=253618&view=diff
==
--- lldb/trunk/include/lldb/Symbol/TypeMap.h (original)
+++ lldb/trunk/include/lldb/Symbol/TypeMap.h Thu Nov 19 17:10:45 2015
@@ -35,9 +35,6 @@ public:
 void
 Dump(Stream *s, bool show_context);
 
-//lldb::TypeSP
-//FindType(lldb::user_id_t uid);
-
 TypeMap
 FindTypes(const ConstString &name);
 
@@ -72,7 +69,7 @@ public:
 ForEach (std::function  const &callback);
 
 bool
-RemoveTypeWithUID (lldb::user_id_t uid);
+Remove (const lldb::TypeSP &type_sp);
 
 void
 RemoveMismatchedTypes (const char *qualified_typename,

Modified: lldb/trunk/source/Symbol/SymbolContext.cpp
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Symbol/SymbolContext.cpp?rev=253618&r1=253617&r2=253618&view=diff
==
--- lldb/trunk/source/Symbol/SymbolContext.cpp (original)
+++ lldb/trunk/source/Symbol/SymbolContext.cpp Thu Nov 19 17:10:45 2015
@@ -659,172 +659,114 @@ SymbolContext::GetFunctionMethodInfo (ll
 return false;
 }
 
-class TypeMoveMatchingBlock
-{
-public:
-TypeMoveMatchingBlock(Block * block, TypeMap &typem, TypeList &typel) :
-curr_block(block),type_map(typem),type_list(typel)
-{
-}
-
-bool
-operator() (const lldb::TypeSP& type)
-{
-if (type && type->GetSymbolContextScope() != nullptr && curr_block == 
type->GetSymbolContextScope()->CalculateSymbolContextBlock())
-{
-type_list.Insert(type);
-type_map.RemoveTypeWithUID(type->GetID());
-return false;
-}
-return true;
-}
-
-private:
-const Block * const curr_block;
-TypeMap &type_map;
-TypeList &type_list;
-};
-
-class TypeMoveMatchingFunction
-{
-public:
-TypeMoveMatchingFunction(Function * block, TypeMap &typem, TypeList 
&typel) :
-func(block),type_map(typem),type_list(typel)
-{
-}
-
-bool
-operator() (const lldb::TypeSP& type)
-{
-if (type && type->GetSymbolContextScope() != nullptr && func == 
type->GetSymbolContextScope()->CalculateSymbolContextFunction())
-{
-type_list.Insert(type);
-type_map.RemoveTypeWithUID(type->GetID());
-return false;
-}
-return true;
-}
-
-private:
-const Function * const func;
-TypeMap &type_map;
-TypeList &type_list;
-};
-
-class TypeMoveMatchingCompileUnit
-{
-public:
-TypeMoveMatchingCompileUnit(CompileUnit * cunit, TypeMap &typem, TypeList 
&typel) :
-comp_unit(cunit),type_map(typem),type_list(typel)
-{
-}
-
-bool
-operator() (const lldb::TypeSP& type)
-{
-if (type && type->GetSymbolContextScope() != nullptr && comp_unit == 
type->GetSymbolContextScope()->CalculateSymbolContextCompileUnit())
-{
-type_list.Insert(type);
-type_map.RemoveTypeWithUID(type->GetID());
-return false;
-}
-return true;
-}
-
-private:
-const CompileUnit * const comp_unit;
-TypeMap &type_map;
-TypeList &type_list;
-};
-
-class TypeMoveMatchingModule
-{
-public:
-TypeMoveMatchingModule(lldb::ModuleSP modsp, TypeMap &typem, TypeList 
&typel) :
-modulesp(modsp),type_map(typem),type_list(typel)
-{
-}
-
-bool
-operator() (const lldb::TypeSP& type)
-{
-if (type && type->GetSymbolContextScope() != nullptr && modulesp.get() 
== type->GetSymbolContextScope()->CalculateSymbolContextModule().get())
-{
-type_list.Insert(type);
-type_map.RemoveTypeWithUID(type->GetID());
-return false;
-}
-return true;
-}
-
-private:
-lldb::ModuleSP modulesp;
-TypeMap &type_map;
-TypeList &type_list;
-};
-
-class TypeMaptoList
-{
-public:
-TypeMaptoList(TypeMap &typem, TypeList &typel) :
-type_map(typem),type_list(typel)
-{
-}
-
-bool
-operator() (const lldb::TypeSP& type)
-{
-if(type)
-{
-type_list.Insert(type);
-type_map.RemoveTypeWithUID(type->GetID());
-if (type_map.Empty())
-return false;
-}
-return true;
-}
-
-private:
-TypeMap &type_map;
-TypeList &type_list;
-};
-
 void
-SymbolContext::SortTypeList(TypeMap &type_map,

Re: [Lldb-commits] [PATCH] D14844: Revert "Plug-in PlatformNetBSD initializer and terminator"

2015-11-19 Thread Siva Chandra via lldb-commits
This revision was automatically updated to reflect the committed changes.
Closed by commit rL253615: Revert "Plug-in PlatformNetBSD initializer and 
terminator" (authored by sivachandra).

Changed prior to commit:
  http://reviews.llvm.org/D14844?vs=40708&id=40710#toc

Repository:
  rL LLVM

http://reviews.llvm.org/D14844

Files:
  lldb/trunk/source/Initialization/SystemInitializerCommon.cpp

Index: lldb/trunk/source/Initialization/SystemInitializerCommon.cpp
===
--- lldb/trunk/source/Initialization/SystemInitializerCommon.cpp
+++ lldb/trunk/source/Initialization/SystemInitializerCommon.cpp
@@ -115,7 +115,6 @@
 DynamicLoaderWindowsDYLD::Initialize();
 platform_freebsd::PlatformFreeBSD::Initialize();
 platform_linux::PlatformLinux::Initialize();
-platform_netbsd::PlatformNetBSD::Initialize();
 PlatformWindows::Initialize();
 PlatformKalimba::Initialize();
 platform_android::PlatformAndroid::Initialize();
@@ -163,7 +162,6 @@
 DynamicLoaderWindowsDYLD::Terminate();
 platform_freebsd::PlatformFreeBSD::Terminate();
 platform_linux::PlatformLinux::Terminate();
-platform_netbsd::PlatformNetBSD::Terminate();
 PlatformWindows::Terminate();
 PlatformKalimba::Terminate();
 platform_android::PlatformAndroid::Terminate();


Index: lldb/trunk/source/Initialization/SystemInitializerCommon.cpp
===
--- lldb/trunk/source/Initialization/SystemInitializerCommon.cpp
+++ lldb/trunk/source/Initialization/SystemInitializerCommon.cpp
@@ -115,7 +115,6 @@
 DynamicLoaderWindowsDYLD::Initialize();
 platform_freebsd::PlatformFreeBSD::Initialize();
 platform_linux::PlatformLinux::Initialize();
-platform_netbsd::PlatformNetBSD::Initialize();
 PlatformWindows::Initialize();
 PlatformKalimba::Initialize();
 platform_android::PlatformAndroid::Initialize();
@@ -163,7 +162,6 @@
 DynamicLoaderWindowsDYLD::Terminate();
 platform_freebsd::PlatformFreeBSD::Terminate();
 platform_linux::PlatformLinux::Terminate();
-platform_netbsd::PlatformNetBSD::Terminate();
 PlatformWindows::Terminate();
 PlatformKalimba::Terminate();
 platform_android::PlatformAndroid::Terminate();
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [lldb] r253623 - Make skipIf support the not_in function.

2015-11-19 Thread Adrian McCarthy via lldb-commits
Author: amccarth
Date: Thu Nov 19 18:11:38 2015
New Revision: 253623

URL: http://llvm.org/viewvc/llvm-project?rev=253623&view=rev
Log:
Make skipIf support the not_in function.

Modified:
lldb/trunk/packages/Python/lldbsuite/test/lldbtest.py

Modified: lldb/trunk/packages/Python/lldbsuite/test/lldbtest.py
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/lldbtest.py?rev=253623&r1=253622&r2=253623&view=diff
==
--- lldb/trunk/packages/Python/lldbsuite/test/lldbtest.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/lldbtest.py Thu Nov 19 18:11:38 
2015
@@ -1100,10 +1100,10 @@ def skipIfLinuxClang(func):
 # TODO: refactor current code, to make skipIfxxx functions to call this 
function
 def skipIf(bugnumber=None, oslist=None, compiler=None, compiler_version=None, 
archs=None, debug_info=None, swig_version=None, py_version=None):
 def fn(self):
-oslist_passes = oslist is None or self.getPlatform() in oslist
-compiler_passes = compiler is None or (compiler in self.getCompiler() 
and self.expectedCompilerVersion(compiler_version))
+oslist_passes = check_list_or_lambda(oslist, self.getPlatform())
+compiler_passes = check_list_or_lambda(compiler, self.getCompiler()) 
and self.expectedCompilerVersion(compiler_version)
 arch_passes = self.expectedArch(archs)
-debug_info_passes = debug_info is None or self.debug_info in debug_info
+debug_info_passes = check_list_or_lambda(debug_info, self.debug_info)
 swig_version_passes = (swig_version is None) or (not hasattr(lldb, 
'swig_version')) or (check_expected_version(swig_version[0], swig_version[1], 
lldb.swig_version))
 py_version_passes = (py_version is None) or 
check_expected_version(py_version[0], py_version[1], sys.version_info)
 


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


Re: [Lldb-commits] [PATCH] D14793: Enable saving of mini dumps with lldb process save-core.

2015-11-19 Thread Adrian McCarthy via lldb-commits
amccarth marked 5 inline comments as done.


Comment at: include/lldb/API/SBProcess.h:344-346
@@ -343,1 +343,5 @@
 
+// Save the state of the process in a core file (or mini dump on Windows).
+lldb::SBError
+SaveCore(const char *file_name);
+

clayborg wrote:
> I don't want any llvm in our public API. Especially llvm::StringRef as it 
> likes to assert when people use it incorrectly (construct one with nullptr 
> and it will assert). So no llvm or clang in our public API.
Acknowledged.


Comment at: 
packages/Python/lldbsuite/test/functionalities/process_save_core/TestProcessSaveCore.py:20
@@ +19,3 @@
+@not_remote_testsuite_ready
+@skipUnlessWindows
+def test_windows_mini_dump (self):

zturner wrote:
> How do you feel about `@skipIf(oslist=not_in(['windows']))`?
> 
> The generic skipIf and expectedFailure decorators were extended recently and 
> are now flexible enough to handle unless cases, so I'm partial to the idea of 
> eventually killing off the rest of the decorators, and just having a single 
> one that handles everything.  But I want to dogfood the idea first and see 
> what people think about it :)
Where is not_in defined?


Comment at: source/API/SBProcess.cpp:1433-1437
@@ +1432,7 @@
+{
+ProcessSP process_sp(GetSP());
+lldb::SBFileSpec core_file(file_name);
+lldb::SBError error;
+error.SetError(PluginManager::SaveCore(process_sp, core_file.get()));
+return error;
+}

zturner wrote:
> clayborg wrote:
> > clayborg wrote:
> > > You need to check your process_sp before using it since it comes from a 
> > > std::weak_ptr<>. You also need to take the process run lock. You also 
> > > don't need to create a lldb::SBFileSpec since you actually need a 
> > > lldb_private::FileSpec. The code should be:
> > > 
> > > ```
> > > lldb::SBError
> > > SBProcess::SaveCore(const char *file_name)
> > > {
> > > lldb::SBError error;
> > > if (process_sp)
> > > {
> > > Mutex::Locker api_locker (process_sp->GetTarget().GetAPIMutex());
> > > FileSpec core_file(file_name, false);
> > > error.ref() = PluginManager::SaveCore(process_sp, 
> > > core_file.get());
> > > }
> > > else
> > > error.SetErrorString ("SBProcess is invalid");
> > > return error;
> > > }
> > > ```
> > Code correction:
> > ```
> > lldb::SBError
> > SBProcess::SaveCore(const char *file_name)
> > {
> > lldb::SBError error;
> > if (process_sp)
> > {
> > Mutex::Locker api_locker (process_sp->GetTarget().GetAPIMutex());
> > FileSpec core_file(file_name, false);
> > error.ref() = PluginManager::SaveCore(process_sp, core_file);
> > }
> > else
> > error.SetErrorString ("SBProcess is invalid");
> > return error;
> > }
> > ```
> > 
> > We might also want to check to make sure the process is alive (the 
> > "save-core" command makes sure the process has been launched) and we should 
> > also make sure it does the right thing if the process is running (stop the 
> > process, make a core file, then resume if the process was running, or just 
> > fail if the process is running).
> I actually wonder if it should just generate an error if the process is not 
> stopped.  Putting a bunch of extra logic in the implementation of 
> `SaveCore()` seems counter to the "thin" nature of the wrapping.  Seems to me 
> like the person using the SB API should stop it themselves before calling 
> `SaveCore`.  
> 
> What do you think?
OK, I check process_sp, I take the mutex, and I ensure that the process is 
already stopped.

I also added another test to make sure SaveCore fails if the process is not 
stopped.


Comment at: source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFFMiniDump.cpp:17
@@ +16,3 @@
+
+#ifdef _WIN32
+#include "lldb/Host/windows/windows.h"

zturner wrote:
> I think it would be better to just not even compile this file on non-Windows. 
>  Exclude it at the CMake level, and have `SaveCore()` return false directly.  
> In the future we may add a way to deal with mini dumps outside of the Windows 
> API, and then we can add that as a separate file like 
> `ObjectFilePECOFFMiniDumpRaw.cpp` which can be used always, and then delete 
> this one.
But if I pull this file out, then I have to have special casing in both the 
CMake and ObjectFilePECOFF file, which seems a violation of DRY.

If we make a general mini dump writer for any platform, then this just replaces 
this implementation.


Comment at: source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFFMiniDump.cpp:52
@@ +51,3 @@
+#endif
+return false;
+}

clayborg wrote:
> You should fill in the error and probably use a #else clause:
> 
> #else
> error.SetErrorString("windows mini dumps are only supported on native 
> windows machines");
> return false;
> #endif
Setting the error here would create a subtl

Re: [Lldb-commits] [PATCH] D14793: Enable saving of mini dumps with lldb process save-core.

2015-11-19 Thread Adrian McCarthy via lldb-commits
amccarth updated this revision to Diff 40716.
amccarth marked an inline comment as done.
amccarth added a comment.

Addresses some of the comments.


http://reviews.llvm.org/D14793

Files:
  include/lldb/API/SBProcess.h
  include/lldb/API/SBTarget.h
  packages/Python/lldbsuite/test/functionalities/process_save_core/Makefile
  
packages/Python/lldbsuite/test/functionalities/process_save_core/TestProcessSaveCore.py
  packages/Python/lldbsuite/test/functionalities/process_save_core/main.cpp
  scripts/interface/SBProcess.i
  source/API/SBProcess.cpp
  source/Commands/CommandObjectTarget.cpp
  source/Plugins/ObjectFile/PECOFF/CMakeLists.txt
  source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.cpp
  source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.h
  source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFFMiniDump.cpp
  source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFFMiniDump.h

Index: source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFFMiniDump.h
===
--- /dev/null
+++ source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFFMiniDump.h
@@ -0,0 +1,24 @@
+//===-- ObjectFilePECOFFMiniDump.h --*- C++ -*-===//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===--===//
+
+#ifndef liblldb_ObjectFilePECOFFMiniDump_h_
+#define liblldb_ObjectFilePECOFFMiniDump_h_
+
+#include "lldb/Target/Process.h"
+
+namespace lldb_private {
+
+bool
+SaveMiniDump(const lldb::ProcessSP &process_sp,
+ const lldb_private::FileSpec &outfile,
+ lldb_private::Error &error);
+
+}  // namespace lldb_private
+
+#endif
Index: source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFFMiniDump.cpp
===
--- /dev/null
+++ source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFFMiniDump.cpp
@@ -0,0 +1,55 @@
+//===-- ObjectFilePECOFFMiniDump.cpp *- C++ -*-===//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===--===//
+
+// This function is separated out from ObjectFilePECOFF.cpp to name avoid name
+// collisions with WinAPI preprocessor macros.
+
+#include "ObjectFilePECOFFMiniDump.h"
+#include "lldb/Host/FileSpec.h"
+#include "llvm/Support/ConvertUTF.h"
+
+#ifdef _WIN32
+#include "lldb/Host/windows/windows.h"
+#include   // for MiniDumpWriteDump
+#endif
+
+namespace lldb_private {
+
+bool
+SaveMiniDump(const lldb::ProcessSP &process_sp,
+ const lldb_private::FileSpec &outfile,
+ lldb_private::Error &error)
+{
+if (!process_sp) return false;
+#ifdef _WIN32
+HANDLE process_handle = ::OpenProcess(PROCESS_QUERY_INFORMATION | PROCESS_VM_READ, FALSE, process_sp->GetID());
+const std::string file_name = outfile.GetCString();
+std::wstring wide_name;
+wide_name.resize(file_name.size() + 1);
+char * result_ptr = reinterpret_cast(&wide_name[0]);
+const UTF8 *error_ptr = nullptr;
+if (!llvm::ConvertUTF8toWide(sizeof(wchar_t), file_name, result_ptr, error_ptr)) {
+error.SetErrorString("cannot convert file name");
+return false;
+}
+HANDLE file_handle = ::CreateFileW(wide_name.c_str(), GENERIC_WRITE, FILE_SHARE_READ, NULL, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL);
+const auto result = ::MiniDumpWriteDump(process_handle, process_sp->GetID(), file_handle, MiniDumpNormal, NULL, NULL, NULL);
+::CloseHandle(file_handle);
+::CloseHandle(process_handle);
+if (!result)
+{
+error.SetError(::GetLastError(), lldb::eErrorTypeWin32);
+return false;
+}
+return true;
+#endif
+return false;
+}
+
+}  // namesapce lldb_private
Index: source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.h
===
--- source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.h
+++ source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.h
@@ -95,6 +95,11 @@
  lldb_private::ModuleSpecList &specs);
 
 static bool
+SaveCore (const lldb::ProcessSP &process_sp,
+  const lldb_private::FileSpec &outfile,
+  lldb_private::Error &error);
+
+static bool
 MagicBytesMatch (lldb::DataBufferSP& data_sp);
 
 bool
Index: source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.cpp
===
--- source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.cpp
+++ source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.cpp
@@ -8,6 +8,7 @@
 //===--===//
 
 #include "ObjectFilePECOFF.h"
+#includ

Re: [Lldb-commits] [PATCH] D14793: Enable saving of mini dumps with lldb process save-core.

2015-11-19 Thread Greg Clayton via lldb-commits
clayborg requested changes to this revision.
clayborg added a comment.
This revision now requires changes to proceed.

Fix the caps on the error message, remove the new files and inline the code and 
this will be ready.



Comment at: source/API/SBProcess.cpp:1445
@@ +1444,3 @@
+{
+error.SetErrorString("The process is not stopped");
+return error;

remove the caps on "The" so it it just "the".


Comment at: source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.cpp:159
@@ +158,3 @@
+{
+return SaveMiniDump(process_sp, outfile, error);
+}

I would rather just have the code from SaveMiniDump inlined in this file, no 
need for a new file just for one function.


Comment at: source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFFMiniDump.cpp:52-53
@@ +51,4 @@
+#endif
+return false;
+}
+

That is fine and returning false makes more sense after reading your above 
comment.


Comment at: source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFFMiniDump.cpp:53-55
@@ +52,4 @@
+return false;
+}
+
+}  // namesapce lldb_private

Remove this file and inline the code into ObjectFilePECOFF::SaveCore().


Comment at: source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFFMiniDump.h:1-24
@@ +1,24 @@
+//===-- ObjectFilePECOFFMiniDump.h --*- C++ 
-*-===//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===--===//
+
+#ifndef liblldb_ObjectFilePECOFFMiniDump_h_
+#define liblldb_ObjectFilePECOFFMiniDump_h_
+
+#include "lldb/Target/Process.h"
+
+namespace lldb_private {
+
+bool
+SaveMiniDump(const lldb::ProcessSP &process_sp,
+ const lldb_private::FileSpec &outfile,
+ lldb_private::Error &error);
+
+}  // namespace lldb_private
+
+#endif

Remove this file and inline the code into ObjectFilePECOFF::SaveCore().


http://reviews.llvm.org/D14793



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


Re: [Lldb-commits] [PATCH] D14793: Enable saving of mini dumps with lldb process save-core.

2015-11-19 Thread Adrian McCarthy via lldb-commits
amccarth marked an inline comment as done.


Comment at: source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.cpp:159
@@ +158,3 @@
+{
+return SaveMiniDump(process_sp, outfile, error);
+}

clayborg wrote:
> I would rather just have the code from SaveMiniDump inlined in this file, no 
> need for a new file just for one function.
I would prefer that too, but it's not possible.

This implementation depends on Windows headers which create conflicts with 
identifiers used in the main file.  (I had a note about that somewhere.  If I 
can't find it, I'll add a comment explanining that.)


Comment at: source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFFMiniDump.cpp:53-55
@@ +52,4 @@
+return false;
+}
+
+}  // namesapce lldb_private

clayborg wrote:
> Remove this file and inline the code into ObjectFilePECOFF::SaveCore().
Can't do, as explained.


Comment at: source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFFMiniDump.h:1-24
@@ +1,24 @@
+//===-- ObjectFilePECOFFMiniDump.h --*- C++ 
-*-===//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===--===//
+
+#ifndef liblldb_ObjectFilePECOFFMiniDump_h_
+#define liblldb_ObjectFilePECOFFMiniDump_h_
+
+#include "lldb/Target/Process.h"
+
+namespace lldb_private {
+
+bool
+SaveMiniDump(const lldb::ProcessSP &process_sp,
+ const lldb_private::FileSpec &outfile,
+ lldb_private::Error &error);
+
+}  // namespace lldb_private
+
+#endif

clayborg wrote:
> Remove this file and inline the code into ObjectFilePECOFF::SaveCore().
Can't do as explained in previous response.


http://reviews.llvm.org/D14793



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


Re: [Lldb-commits] [PATCH] D14793: Enable saving of mini dumps with lldb process save-core.

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

Ok, so fix the caps and rename the file to be WindowsMiniDump.cpp/.h. I would 
rather it not have the "ObjectFilePECOFF" prefix because it would indicated 
that it is a new subclass of ObjectFile.


http://reviews.llvm.org/D14793



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


Re: [Lldb-commits] [lldb] r253623 - Make skipIf support the not_in function.

2015-11-19 Thread Siva Chandra via lldb-commits
This make the test TestVectorTypesFormatting, which is annotated with
@skipIf(compiler='gcc'), run when using GCC:
http://lab.llvm.org:8011/builders/lldb-x86_64-ubuntu-14.04-cmake/builds/8661/steps/test5/logs/stdio

On Thu, Nov 19, 2015 at 4:11 PM, Adrian McCarthy via lldb-commits
 wrote:
> Author: amccarth
> Date: Thu Nov 19 18:11:38 2015
> New Revision: 253623
>
> URL: http://llvm.org/viewvc/llvm-project?rev=253623&view=rev
> Log:
> Make skipIf support the not_in function.
>
> Modified:
> lldb/trunk/packages/Python/lldbsuite/test/lldbtest.py
>
> Modified: lldb/trunk/packages/Python/lldbsuite/test/lldbtest.py
> URL: 
> http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/lldbtest.py?rev=253623&r1=253622&r2=253623&view=diff
> ==
> --- lldb/trunk/packages/Python/lldbsuite/test/lldbtest.py (original)
> +++ lldb/trunk/packages/Python/lldbsuite/test/lldbtest.py Thu Nov 19 18:11:38 
> 2015
> @@ -1100,10 +1100,10 @@ def skipIfLinuxClang(func):
>  # TODO: refactor current code, to make skipIfxxx functions to call this 
> function
>  def skipIf(bugnumber=None, oslist=None, compiler=None, 
> compiler_version=None, archs=None, debug_info=None, swig_version=None, 
> py_version=None):
>  def fn(self):
> -oslist_passes = oslist is None or self.getPlatform() in oslist
> -compiler_passes = compiler is None or (compiler in 
> self.getCompiler() and self.expectedCompilerVersion(compiler_version))
> +oslist_passes = check_list_or_lambda(oslist, self.getPlatform())
> +compiler_passes = check_list_or_lambda(compiler, self.getCompiler()) 
> and self.expectedCompilerVersion(compiler_version)
>  arch_passes = self.expectedArch(archs)
> -debug_info_passes = debug_info is None or self.debug_info in 
> debug_info
> +debug_info_passes = check_list_or_lambda(debug_info, self.debug_info)
>  swig_version_passes = (swig_version is None) or (not hasattr(lldb, 
> 'swig_version')) or (check_expected_version(swig_version[0], swig_version[1], 
> lldb.swig_version))
>  py_version_passes = (py_version is None) or 
> check_expected_version(py_version[0], py_version[1], sys.version_info)
>
>
>
> ___
> lldb-commits mailing list
> lldb-commits@lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


Re: [Lldb-commits] [PATCH] D14844: Revert "Plug-in PlatformNetBSD initializer and terminator"

2015-11-19 Thread Kamil Rytarowski via lldb-commits
krytarowski added a comment.

Sorry for problems, I will investigate it.


Repository:
  rL LLVM

http://reviews.llvm.org/D14844



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


Re: [Lldb-commits] [PATCH] D14844: Revert "Plug-in PlatformNetBSD initializer and terminator"

2015-11-19 Thread Siva Chandra via lldb-commits
sivachandra added a comment.

Actually, I do not have time today to do a better job with digging and have to 
resort to reverting.


Repository:
  rL LLVM

http://reviews.llvm.org/D14844



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


[Lldb-commits] [PATCH] D14852: Revert "Make skipIf support the not_in function."

2015-11-19 Thread Siva Chandra via lldb-commits
sivachandra created this revision.
sivachandra added a reviewer: amccarth.
sivachandra added a subscriber: lldb-commits.

This reverts commit 251965377bdfb6227eea42c12a792c059e4e8a4b
as a test marked "skipIf(compiler='gcc')" runs when testing with GCC.

http://reviews.llvm.org/D14852

Files:
  packages/Python/lldbsuite/test/lldbtest.py

Index: packages/Python/lldbsuite/test/lldbtest.py
===
--- packages/Python/lldbsuite/test/lldbtest.py
+++ packages/Python/lldbsuite/test/lldbtest.py
@@ -1100,10 +1100,10 @@
 # TODO: refactor current code, to make skipIfxxx functions to call this 
function
 def skipIf(bugnumber=None, oslist=None, compiler=None, compiler_version=None, 
archs=None, debug_info=None, swig_version=None, py_version=None):
 def fn(self):
-oslist_passes = check_list_or_lambda(oslist, self.getPlatform())
-compiler_passes = check_list_or_lambda(compiler, self.getCompiler()) 
and self.expectedCompilerVersion(compiler_version)
+oslist_passes = oslist is None or self.getPlatform() in oslist
+compiler_passes = compiler is None or (compiler in self.getCompiler() 
and self.expectedCompilerVersion(compiler_version))
 arch_passes = self.expectedArch(archs)
-debug_info_passes = check_list_or_lambda(debug_info, self.debug_info)
+debug_info_passes = debug_info is None or self.debug_info in debug_info
 swig_version_passes = (swig_version is None) or (not hasattr(lldb, 
'swig_version')) or (check_expected_version(swig_version[0], swig_version[1], 
lldb.swig_version))
 py_version_passes = (py_version is None) or 
check_expected_version(py_version[0], py_version[1], sys.version_info)
 


Index: packages/Python/lldbsuite/test/lldbtest.py
===
--- packages/Python/lldbsuite/test/lldbtest.py
+++ packages/Python/lldbsuite/test/lldbtest.py
@@ -1100,10 +1100,10 @@
 # TODO: refactor current code, to make skipIfxxx functions to call this function
 def skipIf(bugnumber=None, oslist=None, compiler=None, compiler_version=None, archs=None, debug_info=None, swig_version=None, py_version=None):
 def fn(self):
-oslist_passes = check_list_or_lambda(oslist, self.getPlatform())
-compiler_passes = check_list_or_lambda(compiler, self.getCompiler()) and self.expectedCompilerVersion(compiler_version)
+oslist_passes = oslist is None or self.getPlatform() in oslist
+compiler_passes = compiler is None or (compiler in self.getCompiler() and self.expectedCompilerVersion(compiler_version))
 arch_passes = self.expectedArch(archs)
-debug_info_passes = check_list_or_lambda(debug_info, self.debug_info)
+debug_info_passes = debug_info is None or self.debug_info in debug_info
 swig_version_passes = (swig_version is None) or (not hasattr(lldb, 'swig_version')) or (check_expected_version(swig_version[0], swig_version[1], lldb.swig_version))
 py_version_passes = (py_version is None) or check_expected_version(py_version[0], py_version[1], sys.version_info)
 
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


Re: [Lldb-commits] [PATCH] D14852: Revert "Make skipIf support the not_in function."

2015-11-19 Thread Siva Chandra via lldb-commits
This revision was automatically updated to reflect the committed changes.
Closed by commit rL253631: Revert "Make skipIf support the not_in function." 
(authored by sivachandra).

Changed prior to commit:
  http://reviews.llvm.org/D14852?vs=40728&id=40729#toc

Repository:
  rL LLVM

http://reviews.llvm.org/D14852

Files:
  lldb/trunk/packages/Python/lldbsuite/test/lldbtest.py

Index: lldb/trunk/packages/Python/lldbsuite/test/lldbtest.py
===
--- lldb/trunk/packages/Python/lldbsuite/test/lldbtest.py
+++ lldb/trunk/packages/Python/lldbsuite/test/lldbtest.py
@@ -1100,10 +1100,10 @@
 # TODO: refactor current code, to make skipIfxxx functions to call this 
function
 def skipIf(bugnumber=None, oslist=None, compiler=None, compiler_version=None, 
archs=None, debug_info=None, swig_version=None, py_version=None):
 def fn(self):
-oslist_passes = check_list_or_lambda(oslist, self.getPlatform())
-compiler_passes = check_list_or_lambda(compiler, self.getCompiler()) 
and self.expectedCompilerVersion(compiler_version)
+oslist_passes = oslist is None or self.getPlatform() in oslist
+compiler_passes = compiler is None or (compiler in self.getCompiler() 
and self.expectedCompilerVersion(compiler_version))
 arch_passes = self.expectedArch(archs)
-debug_info_passes = check_list_or_lambda(debug_info, self.debug_info)
+debug_info_passes = debug_info is None or self.debug_info in debug_info
 swig_version_passes = (swig_version is None) or (not hasattr(lldb, 
'swig_version')) or (check_expected_version(swig_version[0], swig_version[1], 
lldb.swig_version))
 py_version_passes = (py_version is None) or 
check_expected_version(py_version[0], py_version[1], sys.version_info)
 


Index: lldb/trunk/packages/Python/lldbsuite/test/lldbtest.py
===
--- lldb/trunk/packages/Python/lldbsuite/test/lldbtest.py
+++ lldb/trunk/packages/Python/lldbsuite/test/lldbtest.py
@@ -1100,10 +1100,10 @@
 # TODO: refactor current code, to make skipIfxxx functions to call this function
 def skipIf(bugnumber=None, oslist=None, compiler=None, compiler_version=None, archs=None, debug_info=None, swig_version=None, py_version=None):
 def fn(self):
-oslist_passes = check_list_or_lambda(oslist, self.getPlatform())
-compiler_passes = check_list_or_lambda(compiler, self.getCompiler()) and self.expectedCompilerVersion(compiler_version)
+oslist_passes = oslist is None or self.getPlatform() in oslist
+compiler_passes = compiler is None or (compiler in self.getCompiler() and self.expectedCompilerVersion(compiler_version))
 arch_passes = self.expectedArch(archs)
-debug_info_passes = check_list_or_lambda(debug_info, self.debug_info)
+debug_info_passes = debug_info is None or self.debug_info in debug_info
 swig_version_passes = (swig_version is None) or (not hasattr(lldb, 'swig_version')) or (check_expected_version(swig_version[0], swig_version[1], lldb.swig_version))
 py_version_passes = (py_version is None) or check_expected_version(py_version[0], py_version[1], sys.version_info)
 
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


Re: [Lldb-commits] [PATCH] D14844: Revert "Plug-in PlatformNetBSD initializer and terminator"

2015-11-19 Thread Kamil Rytarowski via lldb-commits
krytarowski added a comment.

Could you please reference a hyperlink to the breakage? Have we got some 
mailing list to monitor it? Jumping over logs in waterfall isn't much 
convenient.


Repository:
  rL LLVM

http://reviews.llvm.org/D14844



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


[Lldb-commits] [lldb] r253631 - Revert "Make skipIf support the not_in function."

2015-11-19 Thread Siva Chandra via lldb-commits
Author: sivachandra
Date: Thu Nov 19 19:54:24 2015
New Revision: 253631

URL: http://llvm.org/viewvc/llvm-project?rev=253631&view=rev
Log:
Revert "Make skipIf support the not_in function."

Summary:
This reverts commit 251965377bdfb6227eea42c12a792c059e4e8a4b
as a test marked "skipIf(compiler='gcc')" runs when testing with GCC.

Reviewers: amccarth

Subscribers: lldb-commits

Differential Revision: http://reviews.llvm.org/D14852

Modified:
lldb/trunk/packages/Python/lldbsuite/test/lldbtest.py

Modified: lldb/trunk/packages/Python/lldbsuite/test/lldbtest.py
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/lldbtest.py?rev=253631&r1=253630&r2=253631&view=diff
==
--- lldb/trunk/packages/Python/lldbsuite/test/lldbtest.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/lldbtest.py Thu Nov 19 19:54:24 
2015
@@ -1100,10 +1100,10 @@ def skipIfLinuxClang(func):
 # TODO: refactor current code, to make skipIfxxx functions to call this 
function
 def skipIf(bugnumber=None, oslist=None, compiler=None, compiler_version=None, 
archs=None, debug_info=None, swig_version=None, py_version=None):
 def fn(self):
-oslist_passes = check_list_or_lambda(oslist, self.getPlatform())
-compiler_passes = check_list_or_lambda(compiler, self.getCompiler()) 
and self.expectedCompilerVersion(compiler_version)
+oslist_passes = oslist is None or self.getPlatform() in oslist
+compiler_passes = compiler is None or (compiler in self.getCompiler() 
and self.expectedCompilerVersion(compiler_version))
 arch_passes = self.expectedArch(archs)
-debug_info_passes = check_list_or_lambda(debug_info, self.debug_info)
+debug_info_passes = debug_info is None or self.debug_info in debug_info
 swig_version_passes = (swig_version is None) or (not hasattr(lldb, 
'swig_version')) or (check_expected_version(swig_version[0], swig_version[1], 
lldb.swig_version))
 py_version_passes = (py_version is None) or 
check_expected_version(py_version[0], py_version[1], sys.version_info)
 


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


Re: [Lldb-commits] [lldb] r253623 - Make skipIf support the not_in function.

2015-11-19 Thread Zachary Turner via lldb-commits
Adrian:

I think the check_list_or_lambda function needs to be renamed to
`check_decorator_attribute`, and it needs to handle values that are neither
lists nor functions.  i.e. it needs to handle single values.  So I believe
right now check_list_or_lambda does something like this:

def check_list_or_lambda(list_or_lambda, value):
if six.callable(list_or_lambda):
return list_or_lambda(value)
else:
return list_or_lambda is None or value in list_or_lambda

and maybe it needs to look more like this:

def check_decorator_attribute(item, value):
if attr is None:
return True
if six.callable(item):
return item(value)
elif isinstance(item, (list, tuple)):
return value in attr
else:
return value == attr

On Thu, Nov 19, 2015 at 5:29 PM Siva Chandra via lldb-commits <
lldb-commits@lists.llvm.org> wrote:

> This make the test TestVectorTypesFormatting, which is annotated with
> @skipIf(compiler='gcc'), run when using GCC:
>
> http://lab.llvm.org:8011/builders/lldb-x86_64-ubuntu-14.04-cmake/builds/8661/steps/test5/logs/stdio
>
> On Thu, Nov 19, 2015 at 4:11 PM, Adrian McCarthy via lldb-commits
>  wrote:
> > Author: amccarth
> > Date: Thu Nov 19 18:11:38 2015
> > New Revision: 253623
> >
> > URL: http://llvm.org/viewvc/llvm-project?rev=253623&view=rev
> > Log:
> > Make skipIf support the not_in function.
> >
> > Modified:
> > lldb/trunk/packages/Python/lldbsuite/test/lldbtest.py
> >
> > Modified: lldb/trunk/packages/Python/lldbsuite/test/lldbtest.py
> > URL:
> http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/lldbtest.py?rev=253623&r1=253622&r2=253623&view=diff
> >
> ==
> > --- lldb/trunk/packages/Python/lldbsuite/test/lldbtest.py (original)
> > +++ lldb/trunk/packages/Python/lldbsuite/test/lldbtest.py Thu Nov 19
> 18:11:38 2015
> > @@ -1100,10 +1100,10 @@ def skipIfLinuxClang(func):
> >  # TODO: refactor current code, to make skipIfxxx functions to call this
> function
> >  def skipIf(bugnumber=None, oslist=None, compiler=None,
> compiler_version=None, archs=None, debug_info=None, swig_version=None,
> py_version=None):
> >  def fn(self):
> > -oslist_passes = oslist is None or self.getPlatform() in oslist
> > -compiler_passes = compiler is None or (compiler in
> self.getCompiler() and self.expectedCompilerVersion(compiler_version))
> > +oslist_passes = check_list_or_lambda(oslist, self.getPlatform())
> > +compiler_passes = check_list_or_lambda(compiler,
> self.getCompiler()) and self.expectedCompilerVersion(compiler_version)
> >  arch_passes = self.expectedArch(archs)
> > -debug_info_passes = debug_info is None or self.debug_info in
> debug_info
> > +debug_info_passes = check_list_or_lambda(debug_info,
> self.debug_info)
> >  swig_version_passes = (swig_version is None) or (not
> hasattr(lldb, 'swig_version')) or (check_expected_version(swig_version[0],
> swig_version[1], lldb.swig_version))
> >  py_version_passes = (py_version is None) or
> check_expected_version(py_version[0], py_version[1], sys.version_info)
> >
> >
> >
> > ___
> > lldb-commits mailing list
> > lldb-commits@lists.llvm.org
> > http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
> ___
> lldb-commits mailing list
> lldb-commits@lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
>
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


Re: [Lldb-commits] [PATCH] D14844: Revert "Plug-in PlatformNetBSD initializer and terminator"

2015-11-19 Thread Zachary Turner via lldb-commits
Agreed, when a CL is reverted due to a buildbot breakage, please include a
link to the failing bot in the commit message of the revert.

On Thu, Nov 19, 2015 at 5:57 PM Kamil Rytarowski via lldb-commits <
lldb-commits@lists.llvm.org> wrote:

> krytarowski added a comment.
>
> Could you please reference a hyperlink to the breakage? Have we got some
> mailing list to monitor it? Jumping over logs in waterfall isn't much
> convenient.
>
>
> Repository:
>   rL LLVM
>
> http://reviews.llvm.org/D14844
>
>
>
> ___
> lldb-commits mailing list
> lldb-commits@lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
>
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D14860: [LLDB][MIPS] Getting 0 index for h/w watchpoint is not necessarily an error

2015-11-19 Thread Mohit Bhakkad via lldb-commits
mohit.bhakkad created this revision.
mohit.bhakkad added reviewers: bhushan, jaydeep.
mohit.bhakkad added subscribers: lldb-commits, sagar, nitesh.jain.
mohit.bhakkad set the repository for this revision to rL LLVM.

Index for H/W watchpoint regsisters starts from 0, so considering 0 as failure 
is wrong. 

Repository:
  rL LLVM

http://reviews.llvm.org/D14860

Files:
  source/Plugins/Process/Linux/NativeRegisterContextLinux_mips64.cpp

Index: source/Plugins/Process/Linux/NativeRegisterContextLinux_mips64.cpp
===
--- source/Plugins/Process/Linux/NativeRegisterContextLinux_mips64.cpp
+++ source/Plugins/Process/Linux/NativeRegisterContextLinux_mips64.cpp
@@ -1092,7 +1092,7 @@
 }
 }
 }
-return 0;
+return LLDB_INVALID_INDEX32;
 }
 
 bool
@@ -1221,7 +1221,7 @@
 int index = GetVacantWatchIndex (®s, addr, size, watch_flags, 
NumSupportedHardwareWatchpoints());
 
 // New watchpoint doesn't fit
-if (!index)
+if (index == LLDB_INVALID_INDEX32)
 return LLDB_INVALID_INDEX32;
 
 


Index: source/Plugins/Process/Linux/NativeRegisterContextLinux_mips64.cpp
===
--- source/Plugins/Process/Linux/NativeRegisterContextLinux_mips64.cpp
+++ source/Plugins/Process/Linux/NativeRegisterContextLinux_mips64.cpp
@@ -1092,7 +1092,7 @@
 }
 }
 }
-return 0;
+return LLDB_INVALID_INDEX32;
 }
 
 bool
@@ -1221,7 +1221,7 @@
 int index = GetVacantWatchIndex (®s, addr, size, watch_flags, NumSupportedHardwareWatchpoints());
 
 // New watchpoint doesn't fit
-if (!index)
+if (index == LLDB_INVALID_INDEX32)
 return LLDB_INVALID_INDEX32;
 
 
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits