Re: [Lldb-commits] [lldb] r244308 - [LLDB][MIPS] Fix offsets of all register sets and add MSA regset and FRE=1 mode support

2015-08-07 Thread Ed Maste via lldb-commits
On 7 August 2015 at 02:39, Sagar Thakur via lldb-commits
 wrote:
> Author: slthakur
> Date: Fri Aug  7 01:39:38 2015
> New Revision: 244308
>
> URL: http://llvm.org/viewvc/llvm-project?rev=244308&view=rev
> Log:
> [LLDB][MIPS] Fix offsets of all register sets and add MSA regset and FRE=1 
> mode support

Noticed a few new warnings after this change:

../tools/lldb/source/Core/Scalar.cpp:151:24: warning: enumeration
value 'e_void' not handled in switch [-Wswitch]
switch(m_type)
   ^
../tools/lldb/source/Core/Scalar.cpp:186:24: warning: enumeration
value 'e_void' not handled in switch [-Wswitch]
switch(m_type)
   ^
../tools/lldb/source/Core/Scalar.cpp:220:20: warning: enumeration
value 'e_void' not handled in switch [-Wswitch]
switch(m_type)
   ^
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


Re: [Lldb-commits] [PATCH] D11574: Add size field to library load event

2015-08-07 Thread Hafiz Abid Qadeer via lldb-commits
abidh added a comment.

I asked this question in the other revision too. Can you give a reason why this 
field is needed. The following description you gave in this revision does not 
make much sense to me. I am not opposed to adding this field but would like to 
know what problem it solves before it is committed.

"Size field is used to let the debugger attribute an address to a specific 
library when symbols are not available. 
For example:
OpenGLESApp4.app!Cube_draw() Line 74C"


http://reviews.llvm.org/D11574



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


Re: [Lldb-commits] [PATCH] D11574: Add size field to library load event

2015-08-07 Thread Paul Maybee via lldb-commits
paulmaybee added a comment.

I'm not sure what the misunderstanding is, so I'll rephrase our desire. The VS 
debugger decorates code addresses with the name of the shared library from 
which the code originated (example above).  We wish to use the load address and 
size of the shared library text for the purpose of determining the library 
name. Is there is some other way for us to get the lib name?


http://reviews.llvm.org/D11574



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


[Lldb-commits] [PATCH] D11840: Update to D11825.

2015-08-07 Thread Chaoren Lin via lldb-commits
chaoren created this revision.
chaoren added a reviewer: Andrzej.
chaoren added a subscriber: lldb-commits.
Herald added subscribers: srhines, danalbert, tberghammer.

Adding `-latomic` to `ANDROID_LINKER_FLAGS` doesn't actually work.
Adding `atomic` to `LLDB_SYSTEM_LIBS` does.

Related: D11831.

http://reviews.llvm.org/D11840

Files:
  cmake/platforms/Android.cmake

Index: cmake/platforms/Android.cmake
===
--- cmake/platforms/Android.cmake
+++ cmake/platforms/Android.cmake
@@ -109,7 +109,11 @@
  endif()
 elseif( ANDROID_ABI STREQUAL "mips" )
  # http://b.android.com/182094
- set( ANDROID_LINKER_FLAGS "${ANDROID_LINKER_FLAGS} -latomic" )
+ list( FIND LLDB_SYSTEM_LIBS atomic index )
+ if( index EQUAL -1 )
+  list( APPEND LLDB_SYSTEM_LIBS atomic )
+  set( LLDB_SYSTEM_LIBS ${LLDB_SYSTEM_LIBS} CACHE INTERNAL "" FORCE )
+ endif()
 endif()
 
 if( NOT LLVM_BUILD_STATIC )


Index: cmake/platforms/Android.cmake
===
--- cmake/platforms/Android.cmake
+++ cmake/platforms/Android.cmake
@@ -109,7 +109,11 @@
  endif()
 elseif( ANDROID_ABI STREQUAL "mips" )
  # http://b.android.com/182094
- set( ANDROID_LINKER_FLAGS "${ANDROID_LINKER_FLAGS} -latomic" )
+ list( FIND LLDB_SYSTEM_LIBS atomic index )
+ if( index EQUAL -1 )
+  list( APPEND LLDB_SYSTEM_LIBS atomic )
+  set( LLDB_SYSTEM_LIBS ${LLDB_SYSTEM_LIBS} CACHE INTERNAL "" FORCE )
+ endif()
 endif()
 
 if( NOT LLVM_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] D11816: Allow dosep.py to print full output of dotest.py, even when dotest succeeds.

2015-08-07 Thread Chaoren Lin via lldb-commits
chaoren requested changes to this revision.
This revision now requires changes to proceed.


Comment at: test/dosep.py:1
@@ -1,2 +1,2 @@
-#!/usr/bin/env python
+#!/usr/bin/env python
 

I think you added a  character here. Could you please double check 
before submitting?


http://reviews.llvm.org/D11816



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


[Lldb-commits] [PATCH] D11843: Make dosep output status by overwriting the same line.

2015-08-07 Thread Chaoren Lin via lldb-commits
chaoren created this revision.
chaoren added a reviewer: zturner.
chaoren added a subscriber: lldb-commits.

Update to D11816.

http://reviews.llvm.org/D11843

Files:
  test/dosep.py

Index: test/dosep.py
===
--- test/dosep.py
+++ test/dosep.py
@@ -66,41 +66,47 @@
 output_lock = None
 test_counter = None
 total_tests = None
+test_name_len = None
 dotest_options = None
 output_on_success = False
 
-def setup_global_variables(lock, counter, total, options):
-global output_lock, test_counter, total_tests, dotest_options
+def setup_global_variables(lock, counter, total, name_len, options):
+global output_lock, test_counter, total_tests, test_name_len
+global dotest_options
 output_lock = lock
 test_counter = counter
 total_tests = total
+test_name_len = name_len
 dotest_options = options
 
 def report_test_failure(name, command, output):
 global output_lock
 with output_lock:
-print >> sys.stderr, "\n"
+print >> sys.stderr
 print >> sys.stderr, output
+print >> sys.stderr, "[%s FAILED]" % name
 print >> sys.stderr, "Command invoked: %s" % ' '.join(command)
-update_progress("FAILED", name)
+update_progress(name)
 
 def report_test_pass(name, output):
 global output_lock, output_on_success
 with output_lock:
 if output_on_success:
-print >> sys.stderr, "\n"
+print >> sys.stderr
 print >> sys.stderr, output
-update_progress("PASSED", name)
+print >> sys.stderr, "[%s PASSED]" % name
+update_progress(name)
 
-def update_progress(test_name, result):
-global output_lock, test_counter, total_tests
+def update_progress(test_name=""):
+global output_lock, test_counter, total_tests, test_name_len
 with output_lock:
-if test_name != None:
-sys.stderr.write("\n[%s %s] - %d out of %d test suites processed" %
-(result, test_name, test_counter.value, total_tests))
-else:
-sys.stderr.write("\n%d out of %d test suites processed" %
-(test_counter.value, total_tests))
+counter_len = len(str(total_tests))
+sys.stderr.write(
+"\r%*d test suites out of %d directories processed - %-*s" %
+(counter_len, test_counter.value, total_tests,
+ test_name_len.value, test_name))
+if len(test_name) > test_name_len.value:
+test_name_len.value = len(test_name)
 test_counter.value += 1
 sys.stdout.flush()
 sys.stderr.flush()
@@ -213,19 +219,23 @@
 for root, dirs, files in os.walk(test_subdir, topdown=False):
 test_work_items.append((root, files, test_directory, dotest_argv))
 
-global output_lock, test_counter, total_tests
+global output_lock, test_counter, total_tests, test_name_len
 output_lock = multiprocessing.RLock()
 total_tests = len(test_work_items)
 test_counter = multiprocessing.Value('i', 0)
-print >> sys.stderr, "Testing: %d tests, %d threads" % (total_tests, 
num_threads)
-update_progress(None, None)
+test_name_len = multiprocessing.Value('i', 0)
+print >> sys.stderr, "Testing: %d directories, %d threads" % (
+total_tests, num_threads)
+update_progress()
 
 # Run the items, either in a pool (for multicore speedup) or
 # calling each individually.
 if num_threads > 1:
-pool = multiprocessing.Pool(num_threads,
-initializer = setup_global_variables,
-initargs = (output_lock, test_counter, total_tests, 
dotest_options))
+pool = multiprocessing.Pool(
+num_threads,
+initializer=setup_global_variables,
+initargs=(output_lock, test_counter, total_tests, test_name_len,
+  dotest_options))
 test_results = pool.map(process_dir_worker, test_work_items)
 else:
 test_results = []


Index: test/dosep.py
===
--- test/dosep.py
+++ test/dosep.py
@@ -66,41 +66,47 @@
 output_lock = None
 test_counter = None
 total_tests = None
+test_name_len = None
 dotest_options = None
 output_on_success = False
 
-def setup_global_variables(lock, counter, total, options):
-global output_lock, test_counter, total_tests, dotest_options
+def setup_global_variables(lock, counter, total, name_len, options):
+global output_lock, test_counter, total_tests, test_name_len
+global dotest_options
 output_lock = lock
 test_counter = counter
 total_tests = total
+test_name_len = name_len
 dotest_options = options
 
 def report_test_failure(name, command, output):
 global output_lock
 with output_lock:
-print >> sys.stderr, "\n"
+print >> sys.stderr
 print >> sys.stderr, output
+print >> sys.stderr, "[%s FAILED]" % name
 print >> sys.stderr, "C

Re: [Lldb-commits] [PATCH] D11843: Make dosep output status by overwriting the same line.

2015-08-07 Thread Zachary Turner via lldb-commits
I was hoping to get my change in first, what do you think?

On Fri, Aug 7, 2015 at 12:54 PM Chaoren Lin  wrote:

> chaoren created this revision.
> chaoren added a reviewer: zturner.
> chaoren added a subscriber: lldb-commits.
>
> Update to D11816.
>
> http://reviews.llvm.org/D11843
>
> Files:
>   test/dosep.py
>
> Index: test/dosep.py
> ===
> --- test/dosep.py
> +++ test/dosep.py
> @@ -66,41 +66,47 @@
>  output_lock = None
>  test_counter = None
>  total_tests = None
> +test_name_len = None
>  dotest_options = None
>  output_on_success = False
>
> -def setup_global_variables(lock, counter, total, options):
> -global output_lock, test_counter, total_tests, dotest_options
> +def setup_global_variables(lock, counter, total, name_len, options):
> +global output_lock, test_counter, total_tests, test_name_len
> +global dotest_options
>  output_lock = lock
>  test_counter = counter
>  total_tests = total
> +test_name_len = name_len
>  dotest_options = options
>
>  def report_test_failure(name, command, output):
>  global output_lock
>  with output_lock:
> -print >> sys.stderr, "\n"
> +print >> sys.stderr
>  print >> sys.stderr, output
> +print >> sys.stderr, "[%s FAILED]" % name
>  print >> sys.stderr, "Command invoked: %s" % ' '.join(command)
> -update_progress("FAILED", name)
> +update_progress(name)
>
>  def report_test_pass(name, output):
>  global output_lock, output_on_success
>  with output_lock:
>  if output_on_success:
> -print >> sys.stderr, "\n"
> +print >> sys.stderr
>  print >> sys.stderr, output
> -update_progress("PASSED", name)
> +print >> sys.stderr, "[%s PASSED]" % name
> +update_progress(name)
>
> -def update_progress(test_name, result):
> -global output_lock, test_counter, total_tests
> +def update_progress(test_name=""):
> +global output_lock, test_counter, total_tests, test_name_len
>  with output_lock:
> -if test_name != None:
> -sys.stderr.write("\n[%s %s] - %d out of %d test suites
> processed" %
> -(result, test_name, test_counter.value, total_tests))
> -else:
> -sys.stderr.write("\n%d out of %d test suites processed" %
> -(test_counter.value, total_tests))
> +counter_len = len(str(total_tests))
> +sys.stderr.write(
> +"\r%*d test suites out of %d directories processed - %-*s" %
> +(counter_len, test_counter.value, total_tests,
> + test_name_len.value, test_name))
> +if len(test_name) > test_name_len.value:
> +test_name_len.value = len(test_name)
>  test_counter.value += 1
>  sys.stdout.flush()
>  sys.stderr.flush()
> @@ -213,19 +219,23 @@
>  for root, dirs, files in os.walk(test_subdir, topdown=False):
>  test_work_items.append((root, files, test_directory, dotest_argv))
>
> -global output_lock, test_counter, total_tests
> +global output_lock, test_counter, total_tests, test_name_len
>  output_lock = multiprocessing.RLock()
>  total_tests = len(test_work_items)
>  test_counter = multiprocessing.Value('i', 0)
> -print >> sys.stderr, "Testing: %d tests, %d threads" % (total_tests,
> num_threads)
> -update_progress(None, None)
> +test_name_len = multiprocessing.Value('i', 0)
> +print >> sys.stderr, "Testing: %d directories, %d threads" % (
> +total_tests, num_threads)
> +update_progress()
>
>  # Run the items, either in a pool (for multicore speedup) or
>  # calling each individually.
>  if num_threads > 1:
> -pool = multiprocessing.Pool(num_threads,
> -initializer = setup_global_variables,
> -initargs = (output_lock, test_counter, total_tests,
> dotest_options))
> +pool = multiprocessing.Pool(
> +num_threads,
> +initializer=setup_global_variables,
> +initargs=(output_lock, test_counter, total_tests,
> test_name_len,
> +  dotest_options))
>  test_results = pool.map(process_dir_worker, test_work_items)
>  else:
>  test_results = []
>
>
>
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


Re: [Lldb-commits] [PATCH] D11843: Make dosep output status by overwriting the same line.

2015-08-07 Thread Chaoren Lin via lldb-commits
chaoren added a comment.

> I was hoping to get my change in first, what do you think?


What do you mean? This is an update to http://reviews.llvm.org/D11816. I can't 
commit it without your change.


http://reviews.llvm.org/D11843



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


Re: [Lldb-commits] [PATCH] D11843: Make dosep output status by overwriting the same line.

2015-08-07 Thread Zachary Turner via lldb-commits
Ahh, ignore my comment then :)

On Fri, Aug 7, 2015 at 12:59 PM Chaoren Lin  wrote:

> chaoren added a comment.
>
> > I was hoping to get my change in first, what do you think?
>
>
> What do you mean? This is an update to http://reviews.llvm.org/D11816. I
> can't commit it without your change.
>
>
> http://reviews.llvm.org/D11843
>
>
>
>
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D11846: Make dosep.py PEP8 compliant. NFC.

2015-08-07 Thread Chaoren Lin via lldb-commits
chaoren created this revision.
chaoren added a reviewer: zturner.
chaoren added a subscriber: lldb-commits.

Update to D11843.

http://reviews.llvm.org/D11846

Files:
  test/dosep.py

Index: test/dosep.py
===
--- test/dosep.py
+++ test/dosep.py
@@ -20,7 +20,8 @@
 E.g., export LLDB_TEST_TIMEOUT=0
 orexport LLDB_TESTCONCURRENTEVENTS_TIMEOUT=0
 
-To collect core files for timed out tests, do the following before running dosep.py
+To collect core files for timed out tests,
+do the following before running dosep.py
 
 OSX
 ulimit -c unlimited
@@ -43,6 +44,7 @@
 
 from optparse import OptionParser
 
+
 def get_timeout_command():
 """Search for a suitable timeout command."""
 if not sys.platform.startswith("win32"):
@@ -70,6 +72,7 @@
 dotest_options = None
 output_on_success = False
 
+
 def setup_global_variables(lock, counter, total, name_len, options):
 global output_lock, test_counter, total_tests, test_name_len
 global dotest_options
@@ -79,6 +82,7 @@
 test_name_len = name_len
 dotest_options = options
 
+
 def report_test_failure(name, command, output):
 global output_lock
 with output_lock:
@@ -88,6 +92,7 @@
 print >> sys.stderr, "Command invoked: %s" % ' '.join(command)
 update_progress(name)
 
+
 def report_test_pass(name, output):
 global output_lock, output_on_success
 with output_lock:
@@ -97,6 +102,7 @@
 print >> sys.stderr, "[%s PASSED]" % name
 update_progress(name)
 
+
 def update_progress(test_name=""):
 global output_lock, test_counter, total_tests, test_name_len
 with output_lock:
@@ -111,50 +117,60 @@
 sys.stdout.flush()
 sys.stderr.flush()
 
+
 def parse_test_results(output):
 passes = 0
 failures = 0
 for result in output:
-pass_count = re.search("^RESULT:.*([0-9]+) passes", result, re.MULTILINE)
-fail_count = re.search("^RESULT:.*([0-9]+) failures", result, re.MULTILINE)
-error_count = re.search("^RESULT:.*([0-9]+) errors", result, re.MULTILINE)
+pass_count = re.search("^RESULT:.*([0-9]+) passes",
+   result, re.MULTILINE)
+fail_count = re.search("^RESULT:.*([0-9]+) failures",
+   result, re.MULTILINE)
+error_count = re.search("^RESULT:.*([0-9]+) errors",
+result, re.MULTILINE)
 this_fail_count = 0
 this_error_count = 0
-if pass_count != None:
+if pass_count is not None:
 passes = passes + int(pass_count.group(1))
-if fail_count != None:
+if fail_count is not None:
 failures = failures + int(fail_count.group(1))
-if error_count != None:
+if error_count is not None:
 failures = failures + int(error_count.group(1))
 pass
 return passes, failures
 
+
 def call_with_timeout(command, timeout, name):
 """Run command with a timeout if possible."""
 """-s QUIT will create a coredump if they are enabled on your system"""
 process = None
 if timeout_command and timeout != "0":
 command = [timeout_command, '-s', 'QUIT', timeout] + command
-# Specifying a value for close_fds is unsupported on Windows when using subprocess.PIPE
+# Specifying a value for close_fds is unsupported on Windows when using
+# subprocess.PIPE
 if os.name != "nt":
-process = subprocess.Popen(command, stdin=subprocess.PIPE,
-stdout=subprocess.PIPE,
-stderr=subprocess.PIPE,
-close_fds=True)
+process = subprocess.Popen(command,
+   stdin=subprocess.PIPE,
+   stdout=subprocess.PIPE,
+   stderr=subprocess.PIPE,
+   close_fds=True)
 else:
-process = subprocess.Popen(command, stdin=subprocess.PIPE,
-stdout=subprocess.PIPE,
-stderr=subprocess.PIPE)
+process = subprocess.Popen(command,
+   stdin=subprocess.PIPE,
+   stdout=subprocess.PIPE,
+   stderr=subprocess.PIPE)
 output = process.communicate()
 exit_status = process.returncode
 passes, failures = parse_test_results(output)
 if exit_status == 0:
-# stdout does not have any useful information from 'dotest.py', only stderr does.
+# stdout does not have any useful information from 'dotest.py',
+# only stderr does.
 report_test_pass(name, output[1])
 else:
 report_test_failure(name, command, output[1])
 return exit_status, passes, failures
 
+
 def process_dir(root, files, test_root, dotest_argv

Re: [Lldb-commits] [PATCH] D11843: Make dosep output status by overwriting the same line.

2015-08-07 Thread Chaoren Lin via lldb-commits
chaoren updated this revision to Diff 31558.
chaoren added a comment.

- Rename counter in terms of directories.


http://reviews.llvm.org/D11843

Files:
  test/dosep.py

Index: test/dosep.py
===
--- test/dosep.py
+++ test/dosep.py
@@ -64,44 +64,49 @@
 eTimedOut, ePassed, eFailed = 124, 0, 1
 
 output_lock = None
-test_counter = None
-total_tests = None
+directory_counter = None
+total_directories = None
+test_name_len = None
 dotest_options = None
 output_on_success = False
 
-def setup_global_variables(lock, counter, total, options):
-global output_lock, test_counter, total_tests, dotest_options
+def setup_global_variables(lock, counter, total, name_len, options):
+global output_lock, directory_counter, total_directories, test_name_len
+global dotest_options
 output_lock = lock
-test_counter = counter
-total_tests = total
+directory_counter = counter
+total_directories = total
+test_name_len = name_len
 dotest_options = options
 
 def report_test_failure(name, command, output):
 global output_lock
 with output_lock:
-print >> sys.stderr, "\n"
+print >> sys.stderr
 print >> sys.stderr, output
+print >> sys.stderr, "[%s FAILED]" % name
 print >> sys.stderr, "Command invoked: %s" % ' '.join(command)
-update_progress("FAILED", name)
+update_progress(name)
 
 def report_test_pass(name, output):
 global output_lock, output_on_success
 with output_lock:
 if output_on_success:
-print >> sys.stderr, "\n"
+print >> sys.stderr
 print >> sys.stderr, output
-update_progress("PASSED", name)
+print >> sys.stderr, "[%s PASSED]" % name
+update_progress(name)
 
-def update_progress(test_name, result):
-global output_lock, test_counter, total_tests
+def update_progress(test_name=""):
+global output_lock, directory_counter, total_directories, test_name_len
 with output_lock:
-if test_name != None:
-sys.stderr.write("\n[%s %s] - %d out of %d test suites processed" %
-(result, test_name, test_counter.value, total_tests))
-else:
-sys.stderr.write("\n%d out of %d test suites processed" %
-(test_counter.value, total_tests))
-test_counter.value += 1
+counter_len = len(str(total_directories))
+sys.stderr.write(
+"\r%*d out of %d directories processed - %-*s" %
+(counter_len, directory_counter.value, total_directories,
+ test_name_len.value, test_name))
+if len(test_name) > test_name_len.value:
+test_name_len.value = len(test_name)
 sys.stdout.flush()
 sys.stderr.flush()
 
@@ -187,6 +192,8 @@
 if eTimedOut == exit_status:
 timed_out.append(name)
 failed.append(name)
+with directory_counter.get_lock():
+directory_counter.value += 1
 return (timed_out, failed, passed, fail_sub_count, pass_sub_count)
 
 in_q = None
@@ -213,19 +220,23 @@
 for root, dirs, files in os.walk(test_subdir, topdown=False):
 test_work_items.append((root, files, test_directory, dotest_argv))
 
-global output_lock, test_counter, total_tests
+global output_lock, directory_counter, total_directories, test_name_len
 output_lock = multiprocessing.RLock()
-total_tests = len(test_work_items)
-test_counter = multiprocessing.Value('i', 0)
-print >> sys.stderr, "Testing: %d tests, %d threads" % (total_tests, num_threads)
-update_progress(None, None)
+total_directories = len(test_work_items)
+directory_counter = multiprocessing.Value('i', 0)
+test_name_len = multiprocessing.Value('i', 0)
+print >> sys.stderr, "Testing: %d directories, %d threads" % (
+total_directories, num_threads)
+update_progress()
 
 # Run the items, either in a pool (for multicore speedup) or
 # calling each individually.
 if num_threads > 1:
-pool = multiprocessing.Pool(num_threads,
-initializer = setup_global_variables,
-initargs = (output_lock, test_counter, total_tests, dotest_options))
+pool = multiprocessing.Pool(
+num_threads,
+initializer=setup_global_variables,
+initargs=(output_lock, directory_counter, total_directories,
+  test_name_len, dotest_options))
 test_results = pool.map(process_dir_worker, test_work_items)
 else:
 test_results = []
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits