[Lldb-commits] [lldb] 7a0e98b - [llvm][lldb] Update links to ABI for the Arm Architecture. [NFC]

2020-02-13 Thread Francesco Petrogalli via lldb-commits

Author: Francesco Petrogalli
Date: 2020-02-13T14:57:53Z
New Revision: 7a0e98bc74a11b160c3eb0b5a52e9925c7038e3e

URL: 
https://github.com/llvm/llvm-project/commit/7a0e98bc74a11b160c3eb0b5a52e9925c7038e3e
DIFF: 
https://github.com/llvm/llvm-project/commit/7a0e98bc74a11b160c3eb0b5a52e9925c7038e3e.diff

LOG: [llvm][lldb] Update links to ABI for the Arm Architecture. [NFC]

Added: 


Modified: 
lldb/source/Plugins/ABI/AArch64/ABIMacOSX_arm64.cpp
llvm/docs/LangRef.rst

Removed: 




diff  --git a/lldb/source/Plugins/ABI/AArch64/ABIMacOSX_arm64.cpp 
b/lldb/source/Plugins/ABI/AArch64/ABIMacOSX_arm64.cpp
index b3fec9637772..ee38516e30bc 100644
--- a/lldb/source/Plugins/ABI/AArch64/ABIMacOSX_arm64.cpp
+++ b/lldb/source/Plugins/ABI/AArch64/ABIMacOSX_arm64.cpp
@@ -2023,7 +2023,7 @@ bool ABIMacOSX_arm64::CreateDefaultUnwindPlan(UnwindPlan 
&unwind_plan) {
 // volatile (and specifically only the lower 8 bytes of these regs), the rest
 // of the fp/SIMD registers are volatile.
 //
-// v. 
https://github.com/ARM-software/software-standards/blob/master/abi/aapcs64/
+// v. https://github.com/ARM-software/abi-aa/blob/master/aapcs64/
 
 // We treat x29 as callee preserved also, else the unwinder won't try to
 // retrieve fp saves.

diff  --git a/llvm/docs/LangRef.rst b/llvm/docs/LangRef.rst
index a561ff6c13fb..2a61e0b19987 100644
--- a/llvm/docs/LangRef.rst
+++ b/llvm/docs/LangRef.rst
@@ -1913,7 +1913,7 @@ attributes are supported:
 present in the IR Module. The signature of the vector variant is
 determined by the rules of the Vector Function ABI (VFABI)
 specifications of the target. For Arm and X86, the VFABI can be
-found at https://github.com/ARM-software/software-standards and
+found at https://github.com/ARM-software/abi-aa and
 https://software.intel.com/en-us/articles/vector-simd-function-abi,
 respectively.
 



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


[Lldb-commits] [lldb] 7c9bcba - [lldb] Add a setting to not install the main executable

2020-01-21 Thread Francesco Petrogalli via lldb-commits

Author: Francesco Petrogalli
Date: 2020-01-21T19:06:44Z
New Revision: 7c9bcba644c4fc2178e20060d9ba2ff1f50ae15e

URL: 
https://github.com/llvm/llvm-project/commit/7c9bcba644c4fc2178e20060d9ba2ff1f50ae15e
DIFF: 
https://github.com/llvm/llvm-project/commit/7c9bcba644c4fc2178e20060d9ba2ff1f50ae15e.diff

LOG: [lldb] Add a setting to not install the main executable

Summary:
Add setting target.auto-install-main-executable that controls whether
the main executable should be automatically installed when connected to
a remote platform even if it does not have an explicit install path
specified. The default is true as the current behaviour.

Reviewers: omjavaid, JDevlieghere, srhines, labath, clayborg

Reviewed By: clayborg

Subscribers: kevin.brodsky, lldb-commits, llvm-commits

Tags: #lldb

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

Added: 

lldb/packages/Python/lldbsuite/test/commands/target/auto-install-main-executable/Makefile

lldb/packages/Python/lldbsuite/test/commands/target/auto-install-main-executable/TestAutoInstallMainExecutable.py

lldb/packages/Python/lldbsuite/test/commands/target/auto-install-main-executable/main.cpp

Modified: 
lldb/include/lldb/Target/Target.h
lldb/source/Target/Target.cpp
lldb/source/Target/TargetProperties.td

Removed: 




diff  --git a/lldb/include/lldb/Target/Target.h 
b/lldb/include/lldb/Target/Target.h
index 1e9153c401ef..4396f05c75aa 100644
--- a/lldb/include/lldb/Target/Target.h
+++ b/lldb/include/lldb/Target/Target.h
@@ -207,6 +207,8 @@ class TargetProperties : public Properties {
 
   bool GetRequireHardwareBreakpoints() const;
 
+  bool GetAutoInstallMainExecutable() const;
+
 private:
   // Callbacks for m_launch_info.
   void Arg0ValueChangedCallback();

diff  --git 
a/lldb/packages/Python/lldbsuite/test/commands/target/auto-install-main-executable/Makefile
 
b/lldb/packages/Python/lldbsuite/test/commands/target/auto-install-main-executable/Makefile
new file mode 100644
index ..1354ec49464a
--- /dev/null
+++ 
b/lldb/packages/Python/lldbsuite/test/commands/target/auto-install-main-executable/Makefile
@@ -0,0 +1,9 @@
+CXX_SOURCES := main.cpp
+CXXFLAGS := -DBUILD=\"stock\"
+
+a.out: a.device.out
+
+include Makefile.rules
+
+a.device.out:
+   $(CXX) $(CXXFLAGS) -DBUILD=\"device\" -o $@ $(SRCDIR)/main.cpp

diff  --git 
a/lldb/packages/Python/lldbsuite/test/commands/target/auto-install-main-executable/TestAutoInstallMainExecutable.py
 
b/lldb/packages/Python/lldbsuite/test/commands/target/auto-install-main-executable/TestAutoInstallMainExecutable.py
new file mode 100644
index ..0169cd494f54
--- /dev/null
+++ 
b/lldb/packages/Python/lldbsuite/test/commands/target/auto-install-main-executable/TestAutoInstallMainExecutable.py
@@ -0,0 +1,137 @@
+"""
+Test target commands: target.auto-install-main-executable.
+"""
+
+import time
+import gdbremote_testcase
+
+from lldbsuite.test.decorators import *
+from lldbsuite.test.lldbtest import *
+from lldbsuite.test import lldbutil
+
+
+class TestAutoInstallMainExecutable(gdbremote_testcase.GdbRemoteTestCaseBase):
+mydir = TestBase.compute_mydir(__file__)
+
+def setUp(self):
+super(TestAutoInstallMainExecutable, self).setUp()
+self._initial_platform = lldb.DBG.GetSelectedPlatform()
+
+def tearDown(self):
+lldb.DBG.SetSelectedPlatform(self._initial_platform)
+super(TestAutoInstallMainExecutable, self).tearDown()
+
+@llgs_test
+@no_debug_info_test
+@skipIf(remote=False)
+@expectedFailureAll(hostoslist=["windows"], triple='.*-android')
+def test_target_auto_install_main_executable(self):
+self.build()
+self.init_llgs_test(False)
+
+# Manually install the modified binary.
+working_dir = lldb.remote_platform.GetWorkingDirectory()
+src_device = lldb.SBFileSpec(self.getBuildArtifact("a.device.out"))
+dest = lldb.SBFileSpec(os.path.join(working_dir, "a.out"))
+err = lldb.remote_platform.Put(src_device, dest)
+if err.Fail():
+raise RuntimeError(
+"Unable copy '%s' to '%s'.\n>>> %s" %
+(src_device.GetFilename(), working_dir, err.GetCString()))
+
+m = re.search("^(.*)://([^/]*):(.*)$", configuration.lldb_platform_url)
+protocol = m.group(1)
+hostname = m.group(2)
+hostport = int(m.group(3))
+listen_url = "*:"+str(hostport+1)
+
+commandline_args = [
+"platform",
+"--listen",
+listen_url,
+"--server"
+]
+
+self.spawnSubprocess(
+self.debug_monitor_exe,
+commandline_args,
+install_remote=False)
+self.addTearDownHook(self.cleanupSubprocesses)
+
+# Wait for the new process gets ready.
+time.sleep(0.1)
+
+new_debugger = lldb.SBDebugger.Create()
+new_

[Lldb-commits] [lldb] 9bb1178 - Revert "[lldb] Add a setting to not install the main executable"

2020-01-21 Thread Francesco Petrogalli via lldb-commits

Author: Francesco Petrogalli
Date: 2020-01-21T19:24:02Z
New Revision: 9bb11785dca6b8ee1edb69b52c936edc95a794f0

URL: 
https://github.com/llvm/llvm-project/commit/9bb11785dca6b8ee1edb69b52c936edc95a794f0
DIFF: 
https://github.com/llvm/llvm-project/commit/9bb11785dca6b8ee1edb69b52c936edc95a794f0.diff

LOG: Revert "[lldb] Add a setting to not install the main executable"

The commit has been reverted as it does not mention the author of the
patch.

This reverts commit 7c9bcba644c4fc2178e20060d9ba2ff1f50ae15e.

Added: 


Modified: 
lldb/include/lldb/Target/Target.h
lldb/source/Target/Target.cpp
lldb/source/Target/TargetProperties.td

Removed: 

lldb/packages/Python/lldbsuite/test/commands/target/auto-install-main-executable/Makefile

lldb/packages/Python/lldbsuite/test/commands/target/auto-install-main-executable/TestAutoInstallMainExecutable.py

lldb/packages/Python/lldbsuite/test/commands/target/auto-install-main-executable/main.cpp



diff  --git a/lldb/include/lldb/Target/Target.h 
b/lldb/include/lldb/Target/Target.h
index 4396f05c75aa..1e9153c401ef 100644
--- a/lldb/include/lldb/Target/Target.h
+++ b/lldb/include/lldb/Target/Target.h
@@ -207,8 +207,6 @@ class TargetProperties : public Properties {
 
   bool GetRequireHardwareBreakpoints() const;
 
-  bool GetAutoInstallMainExecutable() const;
-
 private:
   // Callbacks for m_launch_info.
   void Arg0ValueChangedCallback();

diff  --git 
a/lldb/packages/Python/lldbsuite/test/commands/target/auto-install-main-executable/Makefile
 
b/lldb/packages/Python/lldbsuite/test/commands/target/auto-install-main-executable/Makefile
deleted file mode 100644
index 1354ec49464a..
--- 
a/lldb/packages/Python/lldbsuite/test/commands/target/auto-install-main-executable/Makefile
+++ /dev/null
@@ -1,9 +0,0 @@
-CXX_SOURCES := main.cpp
-CXXFLAGS := -DBUILD=\"stock\"
-
-a.out: a.device.out
-
-include Makefile.rules
-
-a.device.out:
-   $(CXX) $(CXXFLAGS) -DBUILD=\"device\" -o $@ $(SRCDIR)/main.cpp

diff  --git 
a/lldb/packages/Python/lldbsuite/test/commands/target/auto-install-main-executable/TestAutoInstallMainExecutable.py
 
b/lldb/packages/Python/lldbsuite/test/commands/target/auto-install-main-executable/TestAutoInstallMainExecutable.py
deleted file mode 100644
index 0169cd494f54..
--- 
a/lldb/packages/Python/lldbsuite/test/commands/target/auto-install-main-executable/TestAutoInstallMainExecutable.py
+++ /dev/null
@@ -1,137 +0,0 @@
-"""
-Test target commands: target.auto-install-main-executable.
-"""
-
-import time
-import gdbremote_testcase
-
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class TestAutoInstallMainExecutable(gdbremote_testcase.GdbRemoteTestCaseBase):
-mydir = TestBase.compute_mydir(__file__)
-
-def setUp(self):
-super(TestAutoInstallMainExecutable, self).setUp()
-self._initial_platform = lldb.DBG.GetSelectedPlatform()
-
-def tearDown(self):
-lldb.DBG.SetSelectedPlatform(self._initial_platform)
-super(TestAutoInstallMainExecutable, self).tearDown()
-
-@llgs_test
-@no_debug_info_test
-@skipIf(remote=False)
-@expectedFailureAll(hostoslist=["windows"], triple='.*-android')
-def test_target_auto_install_main_executable(self):
-self.build()
-self.init_llgs_test(False)
-
-# Manually install the modified binary.
-working_dir = lldb.remote_platform.GetWorkingDirectory()
-src_device = lldb.SBFileSpec(self.getBuildArtifact("a.device.out"))
-dest = lldb.SBFileSpec(os.path.join(working_dir, "a.out"))
-err = lldb.remote_platform.Put(src_device, dest)
-if err.Fail():
-raise RuntimeError(
-"Unable copy '%s' to '%s'.\n>>> %s" %
-(src_device.GetFilename(), working_dir, err.GetCString()))
-
-m = re.search("^(.*)://([^/]*):(.*)$", configuration.lldb_platform_url)
-protocol = m.group(1)
-hostname = m.group(2)
-hostport = int(m.group(3))
-listen_url = "*:"+str(hostport+1)
-
-commandline_args = [
-"platform",
-"--listen",
-listen_url,
-"--server"
-]
-
-self.spawnSubprocess(
-self.debug_monitor_exe,
-commandline_args,
-install_remote=False)
-self.addTearDownHook(self.cleanupSubprocesses)
-
-# Wait for the new process gets ready.
-time.sleep(0.1)
-
-new_debugger = lldb.SBDebugger.Create()
-new_debugger.SetAsync(False)
-
-def del_debugger(new_debugger=new_debugger):
-del new_debugger
-self.addTearDownHook(del_debugger)
-
-new_platform = lldb.SBPlatform(lldb.remote_platform.GetName())
-new_debugger.SetSelectedPlatform(new_platform)
-new_interpreter = new_debugger.GetC

[Lldb-commits] [lldb] 95116c5 - [lldb] Add a setting to not install the main executable

2020-01-21 Thread Francesco Petrogalli via lldb-commits

Author: Daniel Kiss
Date: 2020-01-21T19:26:18Z
New Revision: 95116c591fab993df76bd20cfa74d2d44a1a9cc6

URL: 
https://github.com/llvm/llvm-project/commit/95116c591fab993df76bd20cfa74d2d44a1a9cc6
DIFF: 
https://github.com/llvm/llvm-project/commit/95116c591fab993df76bd20cfa74d2d44a1a9cc6.diff

LOG: [lldb] Add a setting to not install the main executable

Summary:
Add setting target.auto-install-main-executable that controls whether
the main executable should be automatically installed when connected to
a remote platform even if it does not have an explicit install path
specified. The default is true as the current behaviour.

Reviewers: omjavaid, JDevlieghere, srhines, labath, clayborg

Reviewed By: clayborg

Subscribers: kevin.brodsky, lldb-commits, llvm-commits

Tags: #lldb

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

Added: 

lldb/packages/Python/lldbsuite/test/commands/target/auto-install-main-executable/Makefile

lldb/packages/Python/lldbsuite/test/commands/target/auto-install-main-executable/TestAutoInstallMainExecutable.py

lldb/packages/Python/lldbsuite/test/commands/target/auto-install-main-executable/main.cpp

Modified: 
lldb/include/lldb/Target/Target.h
lldb/source/Target/Target.cpp
lldb/source/Target/TargetProperties.td

Removed: 




diff  --git a/lldb/include/lldb/Target/Target.h 
b/lldb/include/lldb/Target/Target.h
index 1e9153c401ef..4396f05c75aa 100644
--- a/lldb/include/lldb/Target/Target.h
+++ b/lldb/include/lldb/Target/Target.h
@@ -207,6 +207,8 @@ class TargetProperties : public Properties {
 
   bool GetRequireHardwareBreakpoints() const;
 
+  bool GetAutoInstallMainExecutable() const;
+
 private:
   // Callbacks for m_launch_info.
   void Arg0ValueChangedCallback();

diff  --git 
a/lldb/packages/Python/lldbsuite/test/commands/target/auto-install-main-executable/Makefile
 
b/lldb/packages/Python/lldbsuite/test/commands/target/auto-install-main-executable/Makefile
new file mode 100644
index ..1354ec49464a
--- /dev/null
+++ 
b/lldb/packages/Python/lldbsuite/test/commands/target/auto-install-main-executable/Makefile
@@ -0,0 +1,9 @@
+CXX_SOURCES := main.cpp
+CXXFLAGS := -DBUILD=\"stock\"
+
+a.out: a.device.out
+
+include Makefile.rules
+
+a.device.out:
+   $(CXX) $(CXXFLAGS) -DBUILD=\"device\" -o $@ $(SRCDIR)/main.cpp

diff  --git 
a/lldb/packages/Python/lldbsuite/test/commands/target/auto-install-main-executable/TestAutoInstallMainExecutable.py
 
b/lldb/packages/Python/lldbsuite/test/commands/target/auto-install-main-executable/TestAutoInstallMainExecutable.py
new file mode 100644
index ..0169cd494f54
--- /dev/null
+++ 
b/lldb/packages/Python/lldbsuite/test/commands/target/auto-install-main-executable/TestAutoInstallMainExecutable.py
@@ -0,0 +1,137 @@
+"""
+Test target commands: target.auto-install-main-executable.
+"""
+
+import time
+import gdbremote_testcase
+
+from lldbsuite.test.decorators import *
+from lldbsuite.test.lldbtest import *
+from lldbsuite.test import lldbutil
+
+
+class TestAutoInstallMainExecutable(gdbremote_testcase.GdbRemoteTestCaseBase):
+mydir = TestBase.compute_mydir(__file__)
+
+def setUp(self):
+super(TestAutoInstallMainExecutable, self).setUp()
+self._initial_platform = lldb.DBG.GetSelectedPlatform()
+
+def tearDown(self):
+lldb.DBG.SetSelectedPlatform(self._initial_platform)
+super(TestAutoInstallMainExecutable, self).tearDown()
+
+@llgs_test
+@no_debug_info_test
+@skipIf(remote=False)
+@expectedFailureAll(hostoslist=["windows"], triple='.*-android')
+def test_target_auto_install_main_executable(self):
+self.build()
+self.init_llgs_test(False)
+
+# Manually install the modified binary.
+working_dir = lldb.remote_platform.GetWorkingDirectory()
+src_device = lldb.SBFileSpec(self.getBuildArtifact("a.device.out"))
+dest = lldb.SBFileSpec(os.path.join(working_dir, "a.out"))
+err = lldb.remote_platform.Put(src_device, dest)
+if err.Fail():
+raise RuntimeError(
+"Unable copy '%s' to '%s'.\n>>> %s" %
+(src_device.GetFilename(), working_dir, err.GetCString()))
+
+m = re.search("^(.*)://([^/]*):(.*)$", configuration.lldb_platform_url)
+protocol = m.group(1)
+hostname = m.group(2)
+hostport = int(m.group(3))
+listen_url = "*:"+str(hostport+1)
+
+commandline_args = [
+"platform",
+"--listen",
+listen_url,
+"--server"
+]
+
+self.spawnSubprocess(
+self.debug_monitor_exe,
+commandline_args,
+install_remote=False)
+self.addTearDownHook(self.cleanupSubprocesses)
+
+# Wait for the new process gets ready.
+time.sleep(0.1)
+
+new_debugger = lldb.SBDebugger.Create()
+new_debugger.