Re: [Lldb-commits] [lldb] r328365 - Log ObjC Runtime messages only in verbose mode

2018-03-26 Thread Pavel Labath via lldb-commits
On Fri, 23 Mar 2018 at 20:20, Adrian Prantl via lldb-commits <
lldb-commits@lists.llvm.org> wrote:

> Author: adrian
> Date: Fri Mar 23 13:17:39 2018
> New Revision: 328365
>
> URL: http://llvm.org/viewvc/llvm-project?rev=328365&view=rev
> Log:
> Log ObjC Runtime messages only in verbose mode
>
> Modified:
>
> lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp
>
> Modified:
> lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp
> URL:
> http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp?rev=328365&r1=328364&r2=328365&view=diff
>
> ==
> ---
> lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp
> (original)
> +++
> lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp
> Fri Mar 23 13:17:39 2018
> @@ -1440,8 +1440,8 @@ uint32_t AppleObjCRuntimeV2::ParseClassI
>//uint32_t hash;
>//} __attribute__((__packed__));
>
> -  Log *log(GetLogIfAnyCategoriesSet(LIBLLDB_LOG_PROCESS |
> LIBLLDB_LOG_TYPES));
> -
> +  Log *log(GetLogIfAllCategoriesSet(LIBLLDB_LOG_TYPES
> +| LLDB_LOG_OPTION_VERBOSE));
>
>
I don't think this does what you think it does. This function takes log
channels, wheres  LLDB_LOG_OPTION_VERBOSE is a log **option**.
This makes your function call equivalent to GetLogIfAllCategoriesSet(
LIBLLDB_LOG_TYPES | LLDB_LOG_PROCESS). The possible ways to do verbose
logging is:
- use the Verbose function (log->Verbose(...))
- use it GetVerbose function (if(log && log->GetVerbose()) log->...)
- use the LLDB_LOGV macro


PS: There use to be a "verbose" **channel** at some point in the past, but
it was removed during the refactoring of the Log class as it was completely
orthogonal to the LLDB_LOG_OPTION_VERBOSE option, and having two ways to do
verbose logging seemed a bit too much (actually, we had a third one as
well, but nvm).

PPS: I think that at one point we should replace these macros with enums.
Among other things, we would gain some type safety, which would have
prevented this error. (The reason I haven't done that yet is because it
would require touching every single file.)

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


[Lldb-commits] [lldb] r328485 - Add a test for setting the load address of a module with differing physical/virtual addresses

2018-03-26 Thread Pavel Labath via lldb-commits
Author: labath
Date: Mon Mar 26 04:45:32 2018
New Revision: 328485

URL: http://llvm.org/viewvc/llvm-project?rev=328485&view=rev
Log:
Add a test for setting the load address of a module with differing 
physical/virtual addresses

Summary:
First attempt at landing D42145 was reverted because it caused test
failures on some android devices. It turned out this was because these
devices had vdso modules with differing physical and virtual addresses.
This was not caught earlier because all of the modules in our tests
either lack physical addresses or have them identical to virtual ones.

In the discussion on the patch, we came to the conclusion that in the
scenario where we are merely setting a load address of a module (for
example from a dynamic loader plugin), we should always use virtual
addresses (i.e., preserve status quo). This patch adds a test to make
sure we don't regress in that direction.

Reviewers: owenpshaw

Subscribers: lldb-commits

Differential Revision: https://reviews.llvm.org/D44738

Modified:

lldb/trunk/packages/Python/lldbsuite/test/functionalities/gdb_remote_client/TestGDBRemoteLoad.py

Modified: 
lldb/trunk/packages/Python/lldbsuite/test/functionalities/gdb_remote_client/TestGDBRemoteLoad.py
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/functionalities/gdb_remote_client/TestGDBRemoteLoad.py?rev=328485&r1=328484&r2=328485&view=diff
==
--- 
lldb/trunk/packages/Python/lldbsuite/test/functionalities/gdb_remote_client/TestGDBRemoteLoad.py
 (original)
+++ 
lldb/trunk/packages/Python/lldbsuite/test/functionalities/gdb_remote_client/TestGDBRemoteLoad.py
 Mon Mar 26 04:45:32 2018
@@ -6,6 +6,25 @@ from gdbclientutils import *
 
 class TestGDBRemoteLoad(GDBRemoteTestBase):
 
+def setUp(self):
+super(TestGDBRemoteLoad, self).setUp()
+self._initial_platform = lldb.DBG.GetSelectedPlatform()
+
+def tearDown(self):
+lldb.DBG.SetSelectedPlatform(self._initial_platform)
+super(TestGDBRemoteLoad, self).tearDown()
+
+def test_module_load_address(self):
+"""Test that setting the load address of a module uses virtual 
addresses"""
+target = self.createTarget("a.yaml")
+process = self.connect(target)
+module = target.GetModuleAtIndex(0)
+self.assertTrue(module.IsValid())
+self.assertTrue(target.SetModuleLoadAddress(module, 0).Success())
+address = target.ResolveLoadAddress(0x2001)
+self.assertTrue(address.IsValid())
+self.assertEqual(".data", address.GetSection().GetName())
+
 def test_ram_load(self):
 """Test loading an object file to a target's ram"""
 target = self.createTarget("a.yaml")


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


[Lldb-commits] [PATCH] D44738: Add a test for setting the load address of a module with differing physical/virtual addresses

2018-03-26 Thread Pavel Labath via Phabricator via lldb-commits
This revision was automatically updated to reflect the committed changes.
Closed by commit rL328485: Add a test for setting the load address of a module 
with differing… (authored by labath, committed by ).
Herald added a subscriber: llvm-commits.

Repository:
  rL LLVM

https://reviews.llvm.org/D44738

Files:
  
lldb/trunk/packages/Python/lldbsuite/test/functionalities/gdb_remote_client/TestGDBRemoteLoad.py


Index: 
lldb/trunk/packages/Python/lldbsuite/test/functionalities/gdb_remote_client/TestGDBRemoteLoad.py
===
--- 
lldb/trunk/packages/Python/lldbsuite/test/functionalities/gdb_remote_client/TestGDBRemoteLoad.py
+++ 
lldb/trunk/packages/Python/lldbsuite/test/functionalities/gdb_remote_client/TestGDBRemoteLoad.py
@@ -6,6 +6,25 @@
 
 class TestGDBRemoteLoad(GDBRemoteTestBase):
 
+def setUp(self):
+super(TestGDBRemoteLoad, self).setUp()
+self._initial_platform = lldb.DBG.GetSelectedPlatform()
+
+def tearDown(self):
+lldb.DBG.SetSelectedPlatform(self._initial_platform)
+super(TestGDBRemoteLoad, self).tearDown()
+
+def test_module_load_address(self):
+"""Test that setting the load address of a module uses virtual 
addresses"""
+target = self.createTarget("a.yaml")
+process = self.connect(target)
+module = target.GetModuleAtIndex(0)
+self.assertTrue(module.IsValid())
+self.assertTrue(target.SetModuleLoadAddress(module, 0).Success())
+address = target.ResolveLoadAddress(0x2001)
+self.assertTrue(address.IsValid())
+self.assertEqual(".data", address.GetSection().GetName())
+
 def test_ram_load(self):
 """Test loading an object file to a target's ram"""
 target = self.createTarget("a.yaml")


Index: lldb/trunk/packages/Python/lldbsuite/test/functionalities/gdb_remote_client/TestGDBRemoteLoad.py
===
--- lldb/trunk/packages/Python/lldbsuite/test/functionalities/gdb_remote_client/TestGDBRemoteLoad.py
+++ lldb/trunk/packages/Python/lldbsuite/test/functionalities/gdb_remote_client/TestGDBRemoteLoad.py
@@ -6,6 +6,25 @@
 
 class TestGDBRemoteLoad(GDBRemoteTestBase):
 
+def setUp(self):
+super(TestGDBRemoteLoad, self).setUp()
+self._initial_platform = lldb.DBG.GetSelectedPlatform()
+
+def tearDown(self):
+lldb.DBG.SetSelectedPlatform(self._initial_platform)
+super(TestGDBRemoteLoad, self).tearDown()
+
+def test_module_load_address(self):
+"""Test that setting the load address of a module uses virtual addresses"""
+target = self.createTarget("a.yaml")
+process = self.connect(target)
+module = target.GetModuleAtIndex(0)
+self.assertTrue(module.IsValid())
+self.assertTrue(target.SetModuleLoadAddress(module, 0).Success())
+address = target.ResolveLoadAddress(0x2001)
+self.assertTrue(address.IsValid())
+self.assertEqual(".data", address.GetSection().GetName())
+
 def test_ram_load(self):
 """Test loading an object file to a target's ram"""
 target = self.createTarget("a.yaml")
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [lldb] r328486 - [LLDB][PPC64] Fix TestGdbRemoteAuxvSupport

2018-03-26 Thread Pavel Labath via lldb-commits
Author: labath
Date: Mon Mar 26 05:00:52 2018
New Revision: 328486

URL: http://llvm.org/viewvc/llvm-project?rev=328486&view=rev
Log:
[LLDB][PPC64] Fix TestGdbRemoteAuxvSupport

Summary: PPC64's auxvec has a special key that must be ignored.

Reviewers: clayborg, labath

Reviewed By: clayborg, labath

Subscribers: alexandreyy, lbianc

Differential Revision: https://reviews.llvm.org/D43771
Patch by Leandro Lupori .

Modified:

lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-server/gdbremote_testcase.py

Modified: 
lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-server/gdbremote_testcase.py
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-server/gdbremote_testcase.py?rev=328486&r1=328485&r2=328486&view=diff
==
--- 
lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-server/gdbremote_testcase.py
 (original)
+++ 
lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-server/gdbremote_testcase.py
 Mon Mar 26 05:00:52 2018
@@ -1077,6 +1077,18 @@ class GdbRemoteTestCaseBase(TestBase):
 
 auxv_dict = {}
 
+# PowerPC64le's auxvec has a special key that must be ignored.
+# This special key may be used multiple times, resulting in
+# multiple key/value pairs with the same key, which would otherwise
+# break this test check for repeated keys.
+#
+# AT_IGNOREPPC = 22
+ignored_keys_for_arch = { 'powerpc64le' : [22] }
+arch = self.getArchitecture()
+ignore_keys = None
+if arch in ignored_keys_for_arch:
+ignore_keys = ignored_keys_for_arch[arch]
+
 while len(auxv_data) > 0:
 # Chop off key.
 raw_key = auxv_data[:word_size]
@@ -1090,6 +1102,9 @@ class GdbRemoteTestCaseBase(TestBase):
 key = unpack_endian_binary_string(endian, raw_key)
 value = unpack_endian_binary_string(endian, raw_value)
 
+if ignore_keys and key in ignore_keys:
+continue
+
 # Handle ending entry.
 if key == 0:
 self.assertEqual(value, 0)


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


[Lldb-commits] [PATCH] D44472: Add and fix some tests for PPC64

2018-03-26 Thread Pavel Labath via Phabricator via lldb-commits
This revision was automatically updated to reflect the committed changes.
Closed by commit rL328488: Add and fix some tests for PPC64 (authored by 
labath, committed by ).
Herald added a subscriber: llvm-commits.

Changed prior to commit:
  https://reviews.llvm.org/D44472?vs=138699&id=139777#toc

Repository:
  rL LLVM

https://reviews.llvm.org/D44472

Files:
  
lldb/trunk/packages/Python/lldbsuite/test/expression_command/char/TestExprsChar.py
  
lldb/trunk/packages/Python/lldbsuite/test/functionalities/disassembly/TestDisassembleBreakpoint.py
  
lldb/trunk/packages/Python/lldbsuite/test/functionalities/unwind/ehframe/main.c
  
lldb/trunk/packages/Python/lldbsuite/test/functionalities/watchpoint/hello_watchlocation/TestWatchLocation.py
  
lldb/trunk/packages/Python/lldbsuite/test/functionalities/watchpoint/step_over_watchpoint/TestStepOverWatchpoint.py
  
lldb/trunk/packages/Python/lldbsuite/test/python_api/disassemble-raw-data/TestDisassembleRawData.py

Index: lldb/trunk/packages/Python/lldbsuite/test/functionalities/unwind/ehframe/main.c
===
--- lldb/trunk/packages/Python/lldbsuite/test/functionalities/unwind/ehframe/main.c
+++ lldb/trunk/packages/Python/lldbsuite/test/functionalities/unwind/ehframe/main.c
@@ -1,6 +1,18 @@
 void func() {
 
-#ifndef __mips__
+#ifdef __powerpc64__
+  __asm__ (
+"mflr 0;"
+"std 0,16(1);"
+"addi 1,1,-24;"
+"mr 31,1;"
+".cfi_def_cfa_offset 24;"
+"addi 0,0,0;"
+"addi 1,1,24;"
+"ld 0,16(1);"
+".cfi_def_cfa_offset 0;"
+  );
+#elif !defined __mips__
 	__asm__ (
 		"pushq $0x10;"
 		".cfi_def_cfa_offset 16;"
Index: lldb/trunk/packages/Python/lldbsuite/test/functionalities/disassembly/TestDisassembleBreakpoint.py
===
--- lldb/trunk/packages/Python/lldbsuite/test/functionalities/disassembly/TestDisassembleBreakpoint.py
+++ lldb/trunk/packages/Python/lldbsuite/test/functionalities/disassembly/TestDisassembleBreakpoint.py
@@ -26,6 +26,9 @@
 self.expect("file " + exe,
 patterns=["Current executable set to .*a.out.*"])
 
+self.runCmd("dis -n main")
+disassembly_before_break = self.res.GetOutput().splitlines()
+
 match_object = lldbutil.run_break_set_command(self, "br s -n sum")
 lldbutil.check_breakpoint_result(
 self,
@@ -37,36 +40,16 @@
 self.expect("run",
 patterns=["Process .* launched: "])
 
-self.runCmd("dis -f")
-disassembly = self.res.GetOutput()
+self.runCmd("dis -n main")
+disassembly_after_break = self.res.GetOutput().splitlines()
 
-# ARCH, if not specified, defaults to x86_64.
-arch = self.getArchitecture()
-if arch in ["", 'x86_64', 'i386', 'i686']:
-breakpoint_opcodes = ["int3"]
-instructions = [' mov', ' addl ', 'ret']
-elif arch in ["arm", "aarch64", "arm64", "armv7", "armv7k"]:
-breakpoint_opcodes = ["brk", "udf"]
-instructions = [' add ', ' ldr ', ' str ']
-elif re.match("mips", arch):
-breakpoint_opcodes = ["break"]
-instructions = ['lw', 'sw']
-elif arch in ["s390x"]:
-breakpoint_opcodes = [".long"]
-instructions = [' l ', ' a ', ' st ']
-else:
-# TODO please add your arch here
-self.fail(
-'unimplemented for arch = "{arch}"'.format(
-arch=self.getArchitecture()))
-
-# make sure that the software breakpoint has been removed
-for op in breakpoint_opcodes:
-self.assertFalse(op in disassembly)
-
-# make sure a few reasonable assembly instructions are here
-self.expect(
-disassembly,
-exe=False,
-startstr="a.out`sum",
-substrs=instructions)
+# make sure all assembly instructions are the same as the original
+# instructions before inserting breakpoints.
+self.assertEqual(len(disassembly_before_break),
+ len(disassembly_after_break))
+
+for dis_inst_before, dis_inst_after in \
+zip(disassembly_before_break, disassembly_after_break):
+inst_before = dis_inst_before.split(':')[-1]
+inst_after = dis_inst_after.split(':')[-1]
+self.assertEqual(inst_before, inst_after)
Index: lldb/trunk/packages/Python/lldbsuite/test/functionalities/watchpoint/step_over_watchpoint/TestStepOverWatchpoint.py
===
--- lldb/trunk/packages/Python/lldbsuite/test/functionalities/watchpoint/step_over_watchpoint/TestStepOverWatchpoint.py
+++ lldb/trunk/packages/Python/lldbsuite/test/functionalities/watchpoint/step_over_watchpoint/TestStepOverWatchpoint.py
@@ -81,7 +81,7 @@
 # Most of the MIPS boards provide only one H/W watchpoints, and S/W

[Lldb-commits] [lldb] r328488 - Add and fix some tests for PPC64

2018-03-26 Thread Pavel Labath via lldb-commits
Author: labath
Date: Mon Mar 26 05:42:07 2018
New Revision: 328488

URL: http://llvm.org/viewvc/llvm-project?rev=328488&view=rev
Log:
Add and fix some tests for PPC64

Summary:
TestExprsChar.py
Char is unsigned char by default in PowerPC.

TestDisassembleBreakpoint.py
Modify disassemble testcase to consider multiple architectures.

TestThreadJump.py
Jumping directly to the return line on PowerPC architecture dos not
means returning the value that is seen on the code. The last test fails,
because it needs the execution of some assembly in the beginning of the
function. Avoiding this test for this architecture.

TestEhFrameUnwind.py
Implement func for ppc64le test case.

TestWatchLocation.py
TestStepOverWatchpoint.py
PowerPC currently supports only one H/W watchpoint.

TestDisassembleRawData.py
Add PowerPC opcode and instruction for disassemble testcase.

Reviewers: labath

Reviewed By: labath

Subscribers: davide, labath, alexandreyy, lldb-commits, luporl, lbianc

Differential Revision: https://reviews.llvm.org/D44472
Patch by Alexandre Yukio Yamashita .

Modified:

lldb/trunk/packages/Python/lldbsuite/test/expression_command/char/TestExprsChar.py

lldb/trunk/packages/Python/lldbsuite/test/functionalities/disassembly/TestDisassembleBreakpoint.py

lldb/trunk/packages/Python/lldbsuite/test/functionalities/unwind/ehframe/main.c

lldb/trunk/packages/Python/lldbsuite/test/functionalities/watchpoint/hello_watchlocation/TestWatchLocation.py

lldb/trunk/packages/Python/lldbsuite/test/functionalities/watchpoint/step_over_watchpoint/TestStepOverWatchpoint.py

lldb/trunk/packages/Python/lldbsuite/test/python_api/disassemble-raw-data/TestDisassembleRawData.py

Modified: 
lldb/trunk/packages/Python/lldbsuite/test/expression_command/char/TestExprsChar.py
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/expression_command/char/TestExprsChar.py?rev=328488&r1=328487&r2=328488&view=diff
==
--- 
lldb/trunk/packages/Python/lldbsuite/test/expression_command/char/TestExprsChar.py
 (original)
+++ 
lldb/trunk/packages/Python/lldbsuite/test/expression_command/char/TestExprsChar.py
 Mon Mar 26 05:42:07 2018
@@ -49,6 +49,7 @@ class ExprCharTestCase(TestBase):
 archs=[
 "arm",
 "aarch64",
+"powerpc64le",
 "s390x"],
 bugnumber="llvm.org/pr23069")
 @expectedFailureAll(oslist=["windows"], bugnumber="llvm.org/pr21765")

Modified: 
lldb/trunk/packages/Python/lldbsuite/test/functionalities/disassembly/TestDisassembleBreakpoint.py
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/functionalities/disassembly/TestDisassembleBreakpoint.py?rev=328488&r1=328487&r2=328488&view=diff
==
--- 
lldb/trunk/packages/Python/lldbsuite/test/functionalities/disassembly/TestDisassembleBreakpoint.py
 (original)
+++ 
lldb/trunk/packages/Python/lldbsuite/test/functionalities/disassembly/TestDisassembleBreakpoint.py
 Mon Mar 26 05:42:07 2018
@@ -26,6 +26,9 @@ class DisassemblyTestCase(TestBase):
 self.expect("file " + exe,
 patterns=["Current executable set to .*a.out.*"])
 
+self.runCmd("dis -n main")
+disassembly_before_break = self.res.GetOutput().splitlines()
+
 match_object = lldbutil.run_break_set_command(self, "br s -n sum")
 lldbutil.check_breakpoint_result(
 self,
@@ -37,36 +40,16 @@ class DisassemblyTestCase(TestBase):
 self.expect("run",
 patterns=["Process .* launched: "])
 
-self.runCmd("dis -f")
-disassembly = self.res.GetOutput()
+self.runCmd("dis -n main")
+disassembly_after_break = self.res.GetOutput().splitlines()
 
-# ARCH, if not specified, defaults to x86_64.
-arch = self.getArchitecture()
-if arch in ["", 'x86_64', 'i386', 'i686']:
-breakpoint_opcodes = ["int3"]
-instructions = [' mov', ' addl ', 'ret']
-elif arch in ["arm", "aarch64", "arm64", "armv7", "armv7k"]:
-breakpoint_opcodes = ["brk", "udf"]
-instructions = [' add ', ' ldr ', ' str ']
-elif re.match("mips", arch):
-breakpoint_opcodes = ["break"]
-instructions = ['lw', 'sw']
-elif arch in ["s390x"]:
-breakpoint_opcodes = [".long"]
-instructions = [' l ', ' a ', ' st ']
-else:
-# TODO please add your arch here
-self.fail(
-'unimplemented for arch = "{arch}"'.format(
-arch=self.getArchitecture()))
-
-# make sure that the software breakpoint has been removed
-for op in breakpoint_opcodes:
-self.assertFalse(op in disassembly)
-
-# make sure a few reasonable assembly instructions are here
-self.expect

[Lldb-commits] [lldb] r328489 - Make @skipUnlessSupportedTypeAttribute windows-compatible

2018-03-26 Thread Pavel Labath via lldb-commits
Author: labath
Date: Mon Mar 26 05:47:40 2018
New Revision: 328489

URL: http://llvm.org/viewvc/llvm-project?rev=328489&view=rev
Log:
Make @skipUnlessSupportedTypeAttribute windows-compatible

- close_fds is not compatible with stdin/out redirection on windows. I
  just remove it, as this is not required for correct operation.
- the command string was assuming a posix shell. I rewrite the Popen
  invocation to avoid the need for passing the arguments through a shell.

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

Modified: lldb/trunk/packages/Python/lldbsuite/test/decorators.py
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/decorators.py?rev=328489&r1=328488&r2=328489&view=diff
==
--- lldb/trunk/packages/Python/lldbsuite/test/decorators.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/decorators.py Mon Mar 26 05:47:40 
2018
@@ -656,12 +656,11 @@ def skipUnlessSupportedTypeAttribute(att
 """Decorate the item to skip test unless Clang supports type 
__attribute__(attr)."""
 def compiler_doesnt_support_struct_attribute(self):
 compiler_path = self.getCompiler()
-compiler = os.path.basename(compiler_path)
 f = tempfile.NamedTemporaryFile()
-cmd = "echo 'struct __attribute__((%s)) Test {};' | %s -x c++ -c -o %s 
- ; exit" % (attr, compiler_path, f.name)
-p = subprocess.Popen(cmd, shell=True, stdin=subprocess.PIPE, 
stdout=subprocess.PIPE, stderr=subprocess.PIPE, close_fds=True)
-test_result = p.stderr.read()
-if attr in test_result:
+cmd = [self.getCompiler(), "-x", "c++", "-c", "-o", f.name, "-"]
+p = subprocess.Popen(cmd, stdin=subprocess.PIPE, 
stdout=subprocess.PIPE, stderr=subprocess.PIPE)
+stdout, stderr = p.communicate('struct __attribute__((%s)) Test 
{};'%attr)
+if attr in stderr:
 return "Compiler does not support attribute %s"%(attr)
 return None
 return skipTestIfFn(compiler_doesnt_support_struct_attribute)


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


[Lldb-commits] [PATCH] D44739: [SymbolFileDWARF] Replace FixedFormSizes with llvm::dwarf::getFixedFormByteSize

2018-03-26 Thread Pavel Labath via Phabricator via lldb-commits
labath abandoned this revision.
labath added a comment.

I'm not sure my benchmark strategy is correct here. I'm getting different (but 
consistent) results even after making changes that should not impact 
performance at all (e.g. because I change the code which is not executed). I'll 
abandon this until I find some time to benchmark this properly.


https://reviews.llvm.org/D44739



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


[Lldb-commits] [PATCH] D44306: Move Args::StringToAddress to Target::EvaluateAddressExpression

2018-03-26 Thread Pavel Labath via Phabricator via lldb-commits
labath added a comment.

So, any objections to this patch?


https://reviews.llvm.org/D44306



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


Re: [Lldb-commits] [lldb] r328488 - Add and fix some tests for PPC64

2018-03-26 Thread Davide Italiano via lldb-commits
This commit broke the Jenkins macOS x86-64 bots

http://lab.llvm.org:8080/green/view/LLDB/job/lldb-cmake/5943/testReport/junit/TestDisassembleBreakpoint/DisassemblyTestCase/test_dwarf/

Can you take a look? (if you can't, let me know).

Thanks,

--
Davide

On Mon, Mar 26, 2018 at 5:42 AM, Pavel Labath via lldb-commits
 wrote:
> Author: labath
> Date: Mon Mar 26 05:42:07 2018
> New Revision: 328488
>
> URL: http://llvm.org/viewvc/llvm-project?rev=328488&view=rev
> Log:
> Add and fix some tests for PPC64
>
> Summary:
> TestExprsChar.py
> Char is unsigned char by default in PowerPC.
>
> TestDisassembleBreakpoint.py
> Modify disassemble testcase to consider multiple architectures.
>
> TestThreadJump.py
> Jumping directly to the return line on PowerPC architecture dos not
> means returning the value that is seen on the code. The last test fails,
> because it needs the execution of some assembly in the beginning of the
> function. Avoiding this test for this architecture.
>
> TestEhFrameUnwind.py
> Implement func for ppc64le test case.
>
> TestWatchLocation.py
> TestStepOverWatchpoint.py
> PowerPC currently supports only one H/W watchpoint.
>
> TestDisassembleRawData.py
> Add PowerPC opcode and instruction for disassemble testcase.
>
> Reviewers: labath
>
> Reviewed By: labath
>
> Subscribers: davide, labath, alexandreyy, lldb-commits, luporl, lbianc
>
> Differential Revision: https://reviews.llvm.org/D44472
> Patch by Alexandre Yukio Yamashita .
>
> Modified:
> 
> lldb/trunk/packages/Python/lldbsuite/test/expression_command/char/TestExprsChar.py
> 
> lldb/trunk/packages/Python/lldbsuite/test/functionalities/disassembly/TestDisassembleBreakpoint.py
> 
> lldb/trunk/packages/Python/lldbsuite/test/functionalities/unwind/ehframe/main.c
> 
> lldb/trunk/packages/Python/lldbsuite/test/functionalities/watchpoint/hello_watchlocation/TestWatchLocation.py
> 
> lldb/trunk/packages/Python/lldbsuite/test/functionalities/watchpoint/step_over_watchpoint/TestStepOverWatchpoint.py
> 
> lldb/trunk/packages/Python/lldbsuite/test/python_api/disassemble-raw-data/TestDisassembleRawData.py
>
> Modified: 
> lldb/trunk/packages/Python/lldbsuite/test/expression_command/char/TestExprsChar.py
> URL: 
> http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/expression_command/char/TestExprsChar.py?rev=328488&r1=328487&r2=328488&view=diff
> ==
> --- 
> lldb/trunk/packages/Python/lldbsuite/test/expression_command/char/TestExprsChar.py
>  (original)
> +++ 
> lldb/trunk/packages/Python/lldbsuite/test/expression_command/char/TestExprsChar.py
>  Mon Mar 26 05:42:07 2018
> @@ -49,6 +49,7 @@ class ExprCharTestCase(TestBase):
>  archs=[
>  "arm",
>  "aarch64",
> +"powerpc64le",
>  "s390x"],
>  bugnumber="llvm.org/pr23069")
>  @expectedFailureAll(oslist=["windows"], bugnumber="llvm.org/pr21765")
>
> Modified: 
> lldb/trunk/packages/Python/lldbsuite/test/functionalities/disassembly/TestDisassembleBreakpoint.py
> URL: 
> http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/functionalities/disassembly/TestDisassembleBreakpoint.py?rev=328488&r1=328487&r2=328488&view=diff
> ==
> --- 
> lldb/trunk/packages/Python/lldbsuite/test/functionalities/disassembly/TestDisassembleBreakpoint.py
>  (original)
> +++ 
> lldb/trunk/packages/Python/lldbsuite/test/functionalities/disassembly/TestDisassembleBreakpoint.py
>  Mon Mar 26 05:42:07 2018
> @@ -26,6 +26,9 @@ class DisassemblyTestCase(TestBase):
>  self.expect("file " + exe,
>  patterns=["Current executable set to .*a.out.*"])
>
> +self.runCmd("dis -n main")
> +disassembly_before_break = self.res.GetOutput().splitlines()
> +
>  match_object = lldbutil.run_break_set_command(self, "br s -n sum")
>  lldbutil.check_breakpoint_result(
>  self,
> @@ -37,36 +40,16 @@ class DisassemblyTestCase(TestBase):
>  self.expect("run",
>  patterns=["Process .* launched: "])
>
> -self.runCmd("dis -f")
> -disassembly = self.res.GetOutput()
> +self.runCmd("dis -n main")
> +disassembly_after_break = self.res.GetOutput().splitlines()
>
> -# ARCH, if not specified, defaults to x86_64.
> -arch = self.getArchitecture()
> -if arch in ["", 'x86_64', 'i386', 'i686']:
> -breakpoint_opcodes = ["int3"]
> -instructions = [' mov', ' addl ', 'ret']
> -elif arch in ["arm", "aarch64", "arm64", "armv7", "armv7k"]:
> -breakpoint_opcodes = ["brk", "udf"]
> -instructions = [' add ', ' ldr ', ' str ']
> -elif re.match("mips", arch):
> -breakpoint_opcodes = ["break"]
> -instructions = ['lw', 'sw']
> -elif arch in ["s390x"]:

[Lldb-commits] [lldb] r328504 - Fix TestDisassembleBreakpoint broken by r328488

2018-03-26 Thread Pavel Labath via lldb-commits
Author: labath
Date: Mon Mar 26 08:17:58 2018
New Revision: 328504

URL: http://llvm.org/viewvc/llvm-project?rev=328504&view=rev
Log:
Fix TestDisassembleBreakpoint broken by r328488

The first issue was that the test was capturing the "before" disassembly
before launching, and the "after" after. This is a problem because some
of the disassembly will change after we know the load address (e.g. PCs
in call instructions). I fix this by capturing both disassemblies with
the process running.

The second issue was that the refactor in r328488 accidentaly changed
the meaning of the test, as it was no longer disassembling the function
which contained the breakpoint.

While inside, I also modernize the test to use
lldbutil.run_to_source_breakpoint and prevent debug-info replication.

Modified:

lldb/trunk/packages/Python/lldbsuite/test/functionalities/disassembly/TestDisassembleBreakpoint.py

lldb/trunk/packages/Python/lldbsuite/test/functionalities/disassembly/main.cpp

Modified: 
lldb/trunk/packages/Python/lldbsuite/test/functionalities/disassembly/TestDisassembleBreakpoint.py
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/functionalities/disassembly/TestDisassembleBreakpoint.py?rev=328504&r1=328503&r2=328504&view=diff
==
--- 
lldb/trunk/packages/Python/lldbsuite/test/functionalities/disassembly/TestDisassembleBreakpoint.py
 (original)
+++ 
lldb/trunk/packages/Python/lldbsuite/test/functionalities/disassembly/TestDisassembleBreakpoint.py
 Mon Mar 26 08:17:58 2018
@@ -16,40 +16,29 @@ from lldbsuite.test import lldbutil
 class DisassemblyTestCase(TestBase):
 
 mydir = TestBase.compute_mydir(__file__)
+NO_DEBUG_INFO_TESTCASE = True
 
 @expectedFailureAll(
 oslist=["windows"],
 bugnumber="function names print fully demangled instead of name-only")
 def test(self):
 self.build()
-exe = self.getBuildArtifact("a.out")
-self.expect("file " + exe,
-patterns=["Current executable set to .*a.out.*"])
-
-self.runCmd("dis -n main")
-disassembly_before_break = self.res.GetOutput().splitlines()
-
-match_object = lldbutil.run_break_set_command(self, "br s -n sum")
-lldbutil.check_breakpoint_result(
-self,
-match_object,
-symbol_name='sum',
-symbol_match_exact=False,
-num_locations=1)
-
-self.expect("run",
-patterns=["Process .* launched: "])
-
-self.runCmd("dis -n main")
-disassembly_after_break = self.res.GetOutput().splitlines()
-
-# make sure all assembly instructions are the same as the original
-# instructions before inserting breakpoints.
-self.assertEqual(len(disassembly_before_break),
- len(disassembly_after_break))
-
-for dis_inst_before, dis_inst_after in \
-zip(disassembly_before_break, disassembly_after_break):
-inst_before = dis_inst_before.split(':')[-1]
-inst_after = dis_inst_after.split(':')[-1]
-self.assertEqual(inst_before, inst_after)
+target, _, _, bkpt = lldbutil.run_to_source_breakpoint(self,
+"Set a breakpoint here", lldb.SBFileSpec("main.cpp"))
+self.runCmd("dis -f")
+disassembly_with_break = self.res.GetOutput().splitlines()
+
+self.assertTrue(target.BreakpointDelete(bkpt.GetID()))
+
+self.runCmd("dis -f")
+disassembly_without_break = self.res.GetOutput().splitlines()
+
+# Make sure all assembly instructions are the same as instructions
+# with the breakpoint removed.
+self.assertEqual(len(disassembly_with_break),
+ len(disassembly_without_break))
+for dis_inst_with, dis_inst_without in \
+zip(disassembly_with_break, disassembly_without_break):
+inst_with = dis_inst_with.split(':')[-1]
+inst_without = dis_inst_without.split(':')[-1]
+self.assertEqual(inst_with, inst_without)

Modified: 
lldb/trunk/packages/Python/lldbsuite/test/functionalities/disassembly/main.cpp
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/functionalities/disassembly/main.cpp?rev=328504&r1=328503&r2=328504&view=diff
==
--- 
lldb/trunk/packages/Python/lldbsuite/test/functionalities/disassembly/main.cpp 
(original)
+++ 
lldb/trunk/packages/Python/lldbsuite/test/functionalities/disassembly/main.cpp 
Mon Mar 26 08:17:58 2018
@@ -10,7 +10,7 @@
 int
 sum (int a, int b)
 {
-int result = a + b;
+int result = a + b; // Set a breakpoint here
 return result;
 }
 
@@ -20,7 +20,7 @@ main(int argc, char const *argv[])
 
 int array[3];
 
-array[0] = sum (1238, 78392); // Set a breakpoint here
+array[0] = sum (1238

Re: [Lldb-commits] [lldb] r328488 - Add and fix some tests for PPC64

2018-03-26 Thread Pavel Labath via lldb-commits
I was also looking at this because it broke on our android bots. I have
just committed r328504 to fix those, and I believe it will fix the issues
you are seeing on osx (but I'll probably need to go home before I can
verify that).


On Mon, 26 Mar 2018 at 16:14, Davide Italiano  wrote:

> This commit broke the Jenkins macOS x86-64 bots
>
>
> http://lab.llvm.org:8080/green/view/LLDB/job/lldb-cmake/5943/testReport/junit/TestDisassembleBreakpoint/DisassemblyTestCase/test_dwarf/
>
> Can you take a look? (if you can't, let me know).
>
> Thanks,
>
> --
> Davide
>
> On Mon, Mar 26, 2018 at 5:42 AM, Pavel Labath via lldb-commits
>  wrote:
> > Author: labath
> > Date: Mon Mar 26 05:42:07 2018
> > New Revision: 328488
> >
> > URL: http://llvm.org/viewvc/llvm-project?rev=328488&view=rev
> > Log:
> > Add and fix some tests for PPC64
> >
> > Summary:
> > TestExprsChar.py
> > Char is unsigned char by default in PowerPC.
> >
> > TestDisassembleBreakpoint.py
> > Modify disassemble testcase to consider multiple architectures.
> >
> > TestThreadJump.py
> > Jumping directly to the return line on PowerPC architecture dos not
> > means returning the value that is seen on the code. The last test fails,
> > because it needs the execution of some assembly in the beginning of the
> > function. Avoiding this test for this architecture.
> >
> > TestEhFrameUnwind.py
> > Implement func for ppc64le test case.
> >
> > TestWatchLocation.py
> > TestStepOverWatchpoint.py
> > PowerPC currently supports only one H/W watchpoint.
> >
> > TestDisassembleRawData.py
> > Add PowerPC opcode and instruction for disassemble testcase.
> >
> > Reviewers: labath
> >
> > Reviewed By: labath
> >
> > Subscribers: davide, labath, alexandreyy, lldb-commits, luporl, lbianc
> >
> > Differential Revision: https://reviews.llvm.org/D44472
> > Patch by Alexandre Yukio Yamashita  >.
> >
> > Modified:
> >
>  
> lldb/trunk/packages/Python/lldbsuite/test/expression_command/char/TestExprsChar.py
> >
>  
> lldb/trunk/packages/Python/lldbsuite/test/functionalities/disassembly/TestDisassembleBreakpoint.py
> >
>  
> lldb/trunk/packages/Python/lldbsuite/test/functionalities/unwind/ehframe/main.c
> >
>  
> lldb/trunk/packages/Python/lldbsuite/test/functionalities/watchpoint/hello_watchlocation/TestWatchLocation.py
> >
>  
> lldb/trunk/packages/Python/lldbsuite/test/functionalities/watchpoint/step_over_watchpoint/TestStepOverWatchpoint.py
> >
>  
> lldb/trunk/packages/Python/lldbsuite/test/python_api/disassemble-raw-data/TestDisassembleRawData.py
> >
> > Modified:
> lldb/trunk/packages/Python/lldbsuite/test/expression_command/char/TestExprsChar.py
> > URL:
> http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/expression_command/char/TestExprsChar.py?rev=328488&r1=328487&r2=328488&view=diff
> >
> ==
> > ---
> lldb/trunk/packages/Python/lldbsuite/test/expression_command/char/TestExprsChar.py
> (original)
> > +++
> lldb/trunk/packages/Python/lldbsuite/test/expression_command/char/TestExprsChar.py
> Mon Mar 26 05:42:07 2018
> > @@ -49,6 +49,7 @@ class ExprCharTestCase(TestBase):
> >  archs=[
> >  "arm",
> >  "aarch64",
> > +"powerpc64le",
> >  "s390x"],
> >  bugnumber="llvm.org/pr23069")
> >  @expectedFailureAll(oslist=["windows"], bugnumber="llvm.org/pr21765
> ")
> >
> > Modified:
> lldb/trunk/packages/Python/lldbsuite/test/functionalities/disassembly/TestDisassembleBreakpoint.py
> > URL:
> http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/functionalities/disassembly/TestDisassembleBreakpoint.py?rev=328488&r1=328487&r2=328488&view=diff
> >
> ==
> > ---
> lldb/trunk/packages/Python/lldbsuite/test/functionalities/disassembly/TestDisassembleBreakpoint.py
> (original)
> > +++
> lldb/trunk/packages/Python/lldbsuite/test/functionalities/disassembly/TestDisassembleBreakpoint.py
> Mon Mar 26 05:42:07 2018
> > @@ -26,6 +26,9 @@ class DisassemblyTestCase(TestBase):
> >  self.expect("file " + exe,
> >  patterns=["Current executable set to .*a.out.*"])
> >
> > +self.runCmd("dis -n main")
> > +disassembly_before_break = self.res.GetOutput().splitlines()
> > +
> >  match_object = lldbutil.run_break_set_command(self, "br s -n
> sum")
> >  lldbutil.check_breakpoint_result(
> >  self,
> > @@ -37,36 +40,16 @@ class DisassemblyTestCase(TestBase):
> >  self.expect("run",
> >  patterns=["Process .* launched: "])
> >
> > -self.runCmd("dis -f")
> > -disassembly = self.res.GetOutput()
> > +self.runCmd("dis -n main")
> > +disassembly_after_break = self.res.GetOutput().splitlines()
> >
> > -# ARCH, if not specified, defaults to x86_64.
> > -arch = self.getArchitecture()
> > -if arch 

Re: [Lldb-commits] [lldb] r328488 - Add and fix some tests for PPC64

2018-03-26 Thread Davide Italiano via lldb-commits
Thanks, I'll take a look at the bots myself.

On Mon, Mar 26, 2018 at 8:24 AM, Pavel Labath  wrote:
> I was also looking at this because it broke on our android bots. I have just
> committed r328504 to fix those, and I believe it will fix the issues you are
> seeing on osx (but I'll probably need to go home before I can verify that).
>
>
> On Mon, 26 Mar 2018 at 16:14, Davide Italiano  wrote:
>>
>> This commit broke the Jenkins macOS x86-64 bots
>>
>>
>> http://lab.llvm.org:8080/green/view/LLDB/job/lldb-cmake/5943/testReport/junit/TestDisassembleBreakpoint/DisassemblyTestCase/test_dwarf/
>>
>> Can you take a look? (if you can't, let me know).
>>
>> Thanks,
>>
>> --
>> Davide
>>
>> On Mon, Mar 26, 2018 at 5:42 AM, Pavel Labath via lldb-commits
>>  wrote:
>> > Author: labath
>> > Date: Mon Mar 26 05:42:07 2018
>> > New Revision: 328488
>> >
>> > URL: http://llvm.org/viewvc/llvm-project?rev=328488&view=rev
>> > Log:
>> > Add and fix some tests for PPC64
>> >
>> > Summary:
>> > TestExprsChar.py
>> > Char is unsigned char by default in PowerPC.
>> >
>> > TestDisassembleBreakpoint.py
>> > Modify disassemble testcase to consider multiple architectures.
>> >
>> > TestThreadJump.py
>> > Jumping directly to the return line on PowerPC architecture dos not
>> > means returning the value that is seen on the code. The last test fails,
>> > because it needs the execution of some assembly in the beginning of the
>> > function. Avoiding this test for this architecture.
>> >
>> > TestEhFrameUnwind.py
>> > Implement func for ppc64le test case.
>> >
>> > TestWatchLocation.py
>> > TestStepOverWatchpoint.py
>> > PowerPC currently supports only one H/W watchpoint.
>> >
>> > TestDisassembleRawData.py
>> > Add PowerPC opcode and instruction for disassemble testcase.
>> >
>> > Reviewers: labath
>> >
>> > Reviewed By: labath
>> >
>> > Subscribers: davide, labath, alexandreyy, lldb-commits, luporl, lbianc
>> >
>> > Differential Revision: https://reviews.llvm.org/D44472
>> > Patch by Alexandre Yukio Yamashita
>> > .
>> >
>> > Modified:
>> >
>> > lldb/trunk/packages/Python/lldbsuite/test/expression_command/char/TestExprsChar.py
>> >
>> > lldb/trunk/packages/Python/lldbsuite/test/functionalities/disassembly/TestDisassembleBreakpoint.py
>> >
>> > lldb/trunk/packages/Python/lldbsuite/test/functionalities/unwind/ehframe/main.c
>> >
>> > lldb/trunk/packages/Python/lldbsuite/test/functionalities/watchpoint/hello_watchlocation/TestWatchLocation.py
>> >
>> > lldb/trunk/packages/Python/lldbsuite/test/functionalities/watchpoint/step_over_watchpoint/TestStepOverWatchpoint.py
>> >
>> > lldb/trunk/packages/Python/lldbsuite/test/python_api/disassemble-raw-data/TestDisassembleRawData.py
>> >
>> > Modified:
>> > lldb/trunk/packages/Python/lldbsuite/test/expression_command/char/TestExprsChar.py
>> > URL:
>> > http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/expression_command/char/TestExprsChar.py?rev=328488&r1=328487&r2=328488&view=diff
>> >
>> > ==
>> > ---
>> > lldb/trunk/packages/Python/lldbsuite/test/expression_command/char/TestExprsChar.py
>> > (original)
>> > +++
>> > lldb/trunk/packages/Python/lldbsuite/test/expression_command/char/TestExprsChar.py
>> > Mon Mar 26 05:42:07 2018
>> > @@ -49,6 +49,7 @@ class ExprCharTestCase(TestBase):
>> >  archs=[
>> >  "arm",
>> >  "aarch64",
>> > +"powerpc64le",
>> >  "s390x"],
>> >  bugnumber="llvm.org/pr23069")
>> >  @expectedFailureAll(oslist=["windows"],
>> > bugnumber="llvm.org/pr21765")
>> >
>> > Modified:
>> > lldb/trunk/packages/Python/lldbsuite/test/functionalities/disassembly/TestDisassembleBreakpoint.py
>> > URL:
>> > http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/functionalities/disassembly/TestDisassembleBreakpoint.py?rev=328488&r1=328487&r2=328488&view=diff
>> >
>> > ==
>> > ---
>> > lldb/trunk/packages/Python/lldbsuite/test/functionalities/disassembly/TestDisassembleBreakpoint.py
>> > (original)
>> > +++
>> > lldb/trunk/packages/Python/lldbsuite/test/functionalities/disassembly/TestDisassembleBreakpoint.py
>> > Mon Mar 26 05:42:07 2018
>> > @@ -26,6 +26,9 @@ class DisassemblyTestCase(TestBase):
>> >  self.expect("file " + exe,
>> >  patterns=["Current executable set to .*a.out.*"])
>> >
>> > +self.runCmd("dis -n main")
>> > +disassembly_before_break = self.res.GetOutput().splitlines()
>> > +
>> >  match_object = lldbutil.run_break_set_command(self, "br s -n
>> > sum")
>> >  lldbutil.check_breakpoint_result(
>> >  self,
>> > @@ -37,36 +40,16 @@ class DisassemblyTestCase(TestBase):
>> >  self.expect("run",
>> >  patterns=["Process .* launched: "])
>> >
>> > -self.runCmd("dis -f")
>> > -disassembly = self.res

Re: [Lldb-commits] [lldb] r328488 - Add and fix some tests for PPC64

2018-03-26 Thread Alexandre Yukio Yamashita via lldb-commits
If the issue was not solved yet, I can take a look at it if you send me 
the disassemble outputs with/without the breakpoints.
Thanks.

Em 26/03/2018 12:32, Davide Italiano escreveu:
> Thanks, I'll take a look at the bots myself.
>
> On Mon, Mar 26, 2018 at 8:24 AM, Pavel Labath  wrote:
>> I was also looking at this because it broke on our android bots. I have just
>> committed r328504 to fix those, and I believe it will fix the issues you are
>> seeing on osx (but I'll probably need to go home before I can verify that).
>>
>>
>> On Mon, 26 Mar 2018 at 16:14, Davide Italiano  wrote:
>>> This commit broke the Jenkins macOS x86-64 bots
>>>
>>>
>>> http://lab.llvm.org:8080/green/view/LLDB/job/lldb-cmake/5943/testReport/junit/TestDisassembleBreakpoint/DisassemblyTestCase/test_dwarf/
>>>
>>> Can you take a look? (if you can't, let me know).
>>>
>>> Thanks,
>>>
>>> --
>>> Davide
>>>
>>> On Mon, Mar 26, 2018 at 5:42 AM, Pavel Labath via lldb-commits
>>>  wrote:
 Author: labath
 Date: Mon Mar 26 05:42:07 2018
 New Revision: 328488

 URL: http://llvm.org/viewvc/llvm-project?rev=328488&view=rev
 Log:
 Add and fix some tests for PPC64

 Summary:
 TestExprsChar.py
 Char is unsigned char by default in PowerPC.

 TestDisassembleBreakpoint.py
 Modify disassemble testcase to consider multiple architectures.

 TestThreadJump.py
 Jumping directly to the return line on PowerPC architecture dos not
 means returning the value that is seen on the code. The last test fails,
 because it needs the execution of some assembly in the beginning of the
 function. Avoiding this test for this architecture.

 TestEhFrameUnwind.py
 Implement func for ppc64le test case.

 TestWatchLocation.py
 TestStepOverWatchpoint.py
 PowerPC currently supports only one H/W watchpoint.

 TestDisassembleRawData.py
 Add PowerPC opcode and instruction for disassemble testcase.

 Reviewers: labath

 Reviewed By: labath

 Subscribers: davide, labath, alexandreyy, lldb-commits, luporl, lbianc

 Differential Revision: https://reviews.llvm.org/D44472
 Patch by Alexandre Yukio Yamashita
 .

 Modified:

 lldb/trunk/packages/Python/lldbsuite/test/expression_command/char/TestExprsChar.py

 lldb/trunk/packages/Python/lldbsuite/test/functionalities/disassembly/TestDisassembleBreakpoint.py

 lldb/trunk/packages/Python/lldbsuite/test/functionalities/unwind/ehframe/main.c

 lldb/trunk/packages/Python/lldbsuite/test/functionalities/watchpoint/hello_watchlocation/TestWatchLocation.py

 lldb/trunk/packages/Python/lldbsuite/test/functionalities/watchpoint/step_over_watchpoint/TestStepOverWatchpoint.py

 lldb/trunk/packages/Python/lldbsuite/test/python_api/disassemble-raw-data/TestDisassembleRawData.py

 Modified:
 lldb/trunk/packages/Python/lldbsuite/test/expression_command/char/TestExprsChar.py
 URL:
 http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/expression_command/char/TestExprsChar.py?rev=328488&r1=328487&r2=328488&view=diff

 ==
 ---
 lldb/trunk/packages/Python/lldbsuite/test/expression_command/char/TestExprsChar.py
 (original)
 +++
 lldb/trunk/packages/Python/lldbsuite/test/expression_command/char/TestExprsChar.py
 Mon Mar 26 05:42:07 2018
 @@ -49,6 +49,7 @@ class ExprCharTestCase(TestBase):
   archs=[
   "arm",
   "aarch64",
 +"powerpc64le",
   "s390x"],
   bugnumber="llvm.org/pr23069")
   @expectedFailureAll(oslist=["windows"],
 bugnumber="llvm.org/pr21765")

 Modified:
 lldb/trunk/packages/Python/lldbsuite/test/functionalities/disassembly/TestDisassembleBreakpoint.py
 URL:
 http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/functionalities/disassembly/TestDisassembleBreakpoint.py?rev=328488&r1=328487&r2=328488&view=diff

 ==
 ---
 lldb/trunk/packages/Python/lldbsuite/test/functionalities/disassembly/TestDisassembleBreakpoint.py
 (original)
 +++
 lldb/trunk/packages/Python/lldbsuite/test/functionalities/disassembly/TestDisassembleBreakpoint.py
 Mon Mar 26 05:42:07 2018
 @@ -26,6 +26,9 @@ class DisassemblyTestCase(TestBase):
   self.expect("file " + exe,
   patterns=["Current executable set to .*a.out.*"])

 +self.runCmd("dis -n main")
 +disassembly_before_break = self.res.GetOutput().splitlines()
 +
   match_object = lldbutil.run_break_set_command(self, "br s -n
 sum")
   lldbutil.check_breakpoint_result(
   self,
 @@ -37,36 +40

[Lldb-commits] [lldb] r328557 - Fix check for verbose logging.

2018-03-26 Thread Adrian Prantl via lldb-commits
Author: adrian
Date: Mon Mar 26 10:40:44 2018
New Revision: 328557

URL: http://llvm.org/viewvc/llvm-project?rev=328557&view=rev
Log:
Fix check for verbose logging.

Thanks to Pavel for pointing this out!

Modified:

lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp

Modified: 
lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp?rev=328557&r1=328556&r2=328557&view=diff
==
--- 
lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp
 (original)
+++ 
lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp
 Mon Mar 26 10:40:44 2018
@@ -1440,8 +1440,7 @@ uint32_t AppleObjCRuntimeV2::ParseClassI
   //uint32_t hash;
   //} __attribute__((__packed__));
 
-  Log *log(GetLogIfAllCategoriesSet(LIBLLDB_LOG_TYPES 
-| LLDB_LOG_OPTION_VERBOSE));
+  Log *log(GetLogIfAllCategoriesSet(LIBLLDB_LOG_TYPES));
   uint32_t num_parsed = 0;
 
   // Iterate through all ClassInfo structures
@@ -1450,7 +1449,7 @@ uint32_t AppleObjCRuntimeV2::ParseClassI
 ObjCISA isa = data.GetPointer(&offset);
 
 if (isa == 0) {
-  if (log)
+  if (log && log->GetVerbose())
 log->Printf(
 "AppleObjCRuntimeV2 found NULL isa, ignoring this class info");
   continue;


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


[Lldb-commits] [lldb] r328591 - Add the same new entitlement from r326399 to

2018-03-26 Thread Jason Molenda via lldb-commits
Author: jmolenda
Date: Mon Mar 26 16:13:17 2018
New Revision: 328591

URL: http://llvm.org/viewvc/llvm-project?rev=328591&view=rev
Log:
Add the same new entitlement from r326399 to 
the macos entitlement list.
 

Modified:
lldb/trunk/tools/debugserver/source/debugserver-macosx-entitlements.plist

Modified: 
lldb/trunk/tools/debugserver/source/debugserver-macosx-entitlements.plist
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/tools/debugserver/source/debugserver-macosx-entitlements.plist?rev=328591&r1=328590&r2=328591&view=diff
==
--- lldb/trunk/tools/debugserver/source/debugserver-macosx-entitlements.plist 
(original)
+++ lldb/trunk/tools/debugserver/source/debugserver-macosx-entitlements.plist 
Mon Mar 26 16:13:17 2018
@@ -4,5 +4,7 @@
 
 com.apple.diagnosticd.diagnostic
 
+com.apple.private.cs.debugger
+
 
 


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