[Lldb-commits] [PATCH] D74295: [lldb] [testsuite] TestGdbRemoteLibrariesSvr4Support: Fix symlinked builddir

2020-02-09 Thread Jan Kratochvil via Phabricator via lldb-commits
jankratochvil created this revision.
jankratochvil added reviewers: aadsm, labath.
jankratochvil added a project: LLDB.
jankratochvil added a comment.

That testcase has been created by D62502 .


When I have symlinked builddir on Fedora 31 x86_64 I get:

  FAIL: test_libraries_svr4_libs_present 
(TestGdbRemoteLibrariesSvr4Support.TestGdbRemoteLibrariesSvr4Support)
  --
  Traceback (most recent call last):
File 
"/home/jkratoch/redhat/llvm-monorepo/lldb/packages/Python/lldbsuite/test/decorators.py",
 line 140, in wrapper
  func(*args, **kwargs)
File 
"/home/jkratoch/redhat/llvm-monorepo/lldb/packages/Python/lldbsuite/test/decorators.py",
 line 110, in wrapper
  func(*args, **kwargs)
File 
"/home/jkratoch/redhat/llvm-monorepo/lldb/packages/Python/lldbsuite/test/tools/lldb-server/libraries-svr4/TestGdbRemoteLibrariesSvr4Support.py",
 line 133, in test_libraries_svr4_libs_present
  self.libraries_svr4_libs_present()
File 
"/home/jkratoch/redhat/llvm-monorepo/lldb/packages/Python/lldbsuite/test/tools/lldb-server/libraries-svr4/TestGdbRemoteLibrariesSvr4Support.py",
 line 106, in libraries_svr4_libs_present
  self.assertIn(self.getBuildDir() + "/" + lib, libraries_svr4_names)
  AssertionError: 
'/home/jkratoch/redhat/llvm-monorepo-clangassertsymlink/lldb-test-build.noindex/tools/lldb-server/libraries-svr4/TestGdbRemoteLibrariesSvr4Support.test_libraries_svr4_libs_present/libsvr4lib_a.so'
 not found in 
['/home/jkratoch/redhat/llvm-monorepo/lldb/packages/Python/lldbsuite/test/tools/lldb-server/libraries-svr4/linux-vdso.so.1',
 
'/quad/home/jkratoch/redhat/llvm-monorepo-clangassertsymlink/lldb-test-build.noindex/tools/lldb-server/libraries-svr4/TestGdbRemoteLibrariesSvr4Support.test_libraries_svr4_libs_present/libsvr4lib_a.so',
 
'/quad/home/jkratoch/redhat/llvm-monorepo-clangassertsymlink/lldb-test-build.noindex/tools/lldb-server/libraries-svr4/TestGdbRemoteLibrariesSvr4Support.test_libraries_svr4_libs_present/libsvr4lib_b".so',
 '/usr/lib64/libdl-2.30.so', '/usr/lib64/libstdc++.so.6.0.27', 
'/usr/lib64/libm-2.30.so', '/usr/lib64/libgcc_s-9-20190827.so.1', 
'/usr/lib64/libc-2.30.so', '/usr/lib64/ld-2.30.so']
  
Config=x86_64-/quad/home/jkratoch/redhat/llvm-monorepo-clangassertsymlink/bin/clang-11
  --

I think the fix is trivial, right?


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D74295

Files:
  
lldb/packages/Python/lldbsuite/test/tools/lldb-server/libraries-svr4/TestGdbRemoteLibrariesSvr4Support.py


Index: 
lldb/packages/Python/lldbsuite/test/tools/lldb-server/libraries-svr4/TestGdbRemoteLibrariesSvr4Support.py
===
--- 
lldb/packages/Python/lldbsuite/test/tools/lldb-server/libraries-svr4/TestGdbRemoteLibrariesSvr4Support.py
+++ 
lldb/packages/Python/lldbsuite/test/tools/lldb-server/libraries-svr4/TestGdbRemoteLibrariesSvr4Support.py
@@ -103,7 +103,7 @@
 name = child.attrib.get("name")
 libraries_svr4_names.append(os.path.realpath(name))
 for lib in self.get_expected_libs():
-self.assertIn(self.getBuildDir() + "/" + lib, libraries_svr4_names)
+self.assertIn(os.path.realpath(self.getBuildDir() + "/" + lib), 
libraries_svr4_names)
 
 @llgs_test
 @skipUnlessPlatform(["linux", "android", "netbsd"])


Index: lldb/packages/Python/lldbsuite/test/tools/lldb-server/libraries-svr4/TestGdbRemoteLibrariesSvr4Support.py
===
--- lldb/packages/Python/lldbsuite/test/tools/lldb-server/libraries-svr4/TestGdbRemoteLibrariesSvr4Support.py
+++ lldb/packages/Python/lldbsuite/test/tools/lldb-server/libraries-svr4/TestGdbRemoteLibrariesSvr4Support.py
@@ -103,7 +103,7 @@
 name = child.attrib.get("name")
 libraries_svr4_names.append(os.path.realpath(name))
 for lib in self.get_expected_libs():
-self.assertIn(self.getBuildDir() + "/" + lib, libraries_svr4_names)
+self.assertIn(os.path.realpath(self.getBuildDir() + "/" + lib), libraries_svr4_names)
 
 @llgs_test
 @skipUnlessPlatform(["linux", "android", "netbsd"])
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D74295: [lldb] [testsuite] TestGdbRemoteLibrariesSvr4Support: Fix symlinked builddir

2020-02-09 Thread Jan Kratochvil via Phabricator via lldb-commits
jankratochvil added a comment.

That testcase has been created by D62502 .


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D74295/new/

https://reviews.llvm.org/D74295



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


[Lldb-commits] [lldb] 420a518 - [lldb] [testsuite] TestGdbRemoteLibrariesSvr4Support: Fix symlinked builddir

2020-02-09 Thread Jan Kratochvil via lldb-commits

Author: Jan Kratochvil
Date: 2020-02-09T14:49:38+01:00
New Revision: 420a51806850a20ebf4144699457de84513f6abc

URL: 
https://github.com/llvm/llvm-project/commit/420a51806850a20ebf4144699457de84513f6abc
DIFF: 
https://github.com/llvm/llvm-project/commit/420a51806850a20ebf4144699457de84513f6abc.diff

LOG: [lldb] [testsuite] TestGdbRemoteLibrariesSvr4Support: Fix symlinked 
builddir

When I have symlinked builddir on Fedora 31 x86_64 I get:

FAIL: test_libraries_svr4_libs_present 
(TestGdbRemoteLibrariesSvr4Support.TestGdbRemoteLibrariesSvr4Support)
--
...
  File 
"lldb/packages/Python/lldbsuite/test/tools/lldb-server/libraries-svr4/TestGdbRemoteLibrariesSvr4Support.py",
 line 106, in
libraries_svr4_libs_present
self.assertIn(self.getBuildDir() + "/" + lib, libraries_svr4_names)
AssertionError:

'/home/jkratoch/redhat/llvm-monorepo-clangassertsymlink/lldb-test-build.noindex/tools/lldb-server/libraries-svr4/TestGdbRemoteLibrariesSvr4Support.test_libraries_svr4_libs_present/libsvr4lib_a.so'
 not found in 
['/home/jkratoch/redhat/llvm-monorepo/lldb/packages/Python/lldbsuite/test/tools/lldb-server/libraries-svr4/linux-vdso.so.1',
 
'/quad/home/jkratoch/redhat/llvm-monorepo-clangassertsymlink/lldb-test-build.noindex/tools/lldb-server/libraries-svr4/TestGdbRemoteLibrariesSvr4Support.test_libraries_svr4_libs_present/libsvr4lib_a.so',
 
'/quad/home/jkratoch/redhat/llvm-monorepo-clangassertsymlink/lldb-test-build.noindex/tools/lldb-server/libraries-svr4/TestGdbRemoteLibrariesSvr4Support.test_libraries_svr4_libs_present/libsvr4lib_b".so',
 '/usr/lib64/libdl-2.30.so', '/usr/lib64/libstdc++.so.6.0.27', 
'/usr/lib64/libm-2.30.so', '/usr/lib64/libgcc_s-9-20190827.so.1', 
'/usr/lib64/libc-2.30.so', '/usr/lib64/ld-2.30.so']

Config=x86_64-/quad/home/jkratoch/redhat/llvm-monorepo-clangassertsymlink/bin/clang-11
--

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

Added: 


Modified: 

lldb/packages/Python/lldbsuite/test/tools/lldb-server/libraries-svr4/TestGdbRemoteLibrariesSvr4Support.py

Removed: 




diff  --git 
a/lldb/packages/Python/lldbsuite/test/tools/lldb-server/libraries-svr4/TestGdbRemoteLibrariesSvr4Support.py
 
b/lldb/packages/Python/lldbsuite/test/tools/lldb-server/libraries-svr4/TestGdbRemoteLibrariesSvr4Support.py
index 2081d9f34c59..2d9f40500dc8 100644
--- 
a/lldb/packages/Python/lldbsuite/test/tools/lldb-server/libraries-svr4/TestGdbRemoteLibrariesSvr4Support.py
+++ 
b/lldb/packages/Python/lldbsuite/test/tools/lldb-server/libraries-svr4/TestGdbRemoteLibrariesSvr4Support.py
@@ -103,7 +103,7 @@ def libraries_svr4_libs_present(self):
 name = child.attrib.get("name")
 libraries_svr4_names.append(os.path.realpath(name))
 for lib in self.get_expected_libs():
-self.assertIn(self.getBuildDir() + "/" + lib, libraries_svr4_names)
+self.assertIn(os.path.realpath(self.getBuildDir() + "/" + lib), 
libraries_svr4_names)
 
 @llgs_test
 @skipUnlessPlatform(["linux", "android", "netbsd"])



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


[Lldb-commits] [PATCH] D74295: [lldb] [testsuite] TestGdbRemoteLibrariesSvr4Support: Fix symlinked builddir

2020-02-09 Thread Jan Kratochvil via Phabricator via lldb-commits
This revision was automatically updated to reflect the committed changes.
Closed by commit rG420a51806850: [lldb] [testsuite] 
TestGdbRemoteLibrariesSvr4Support: Fix symlinked builddir (authored by 
jankratochvil).

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D74295/new/

https://reviews.llvm.org/D74295

Files:
  
lldb/packages/Python/lldbsuite/test/tools/lldb-server/libraries-svr4/TestGdbRemoteLibrariesSvr4Support.py


Index: 
lldb/packages/Python/lldbsuite/test/tools/lldb-server/libraries-svr4/TestGdbRemoteLibrariesSvr4Support.py
===
--- 
lldb/packages/Python/lldbsuite/test/tools/lldb-server/libraries-svr4/TestGdbRemoteLibrariesSvr4Support.py
+++ 
lldb/packages/Python/lldbsuite/test/tools/lldb-server/libraries-svr4/TestGdbRemoteLibrariesSvr4Support.py
@@ -103,7 +103,7 @@
 name = child.attrib.get("name")
 libraries_svr4_names.append(os.path.realpath(name))
 for lib in self.get_expected_libs():
-self.assertIn(self.getBuildDir() + "/" + lib, libraries_svr4_names)
+self.assertIn(os.path.realpath(self.getBuildDir() + "/" + lib), 
libraries_svr4_names)
 
 @llgs_test
 @skipUnlessPlatform(["linux", "android", "netbsd"])


Index: lldb/packages/Python/lldbsuite/test/tools/lldb-server/libraries-svr4/TestGdbRemoteLibrariesSvr4Support.py
===
--- lldb/packages/Python/lldbsuite/test/tools/lldb-server/libraries-svr4/TestGdbRemoteLibrariesSvr4Support.py
+++ lldb/packages/Python/lldbsuite/test/tools/lldb-server/libraries-svr4/TestGdbRemoteLibrariesSvr4Support.py
@@ -103,7 +103,7 @@
 name = child.attrib.get("name")
 libraries_svr4_names.append(os.path.realpath(name))
 for lib in self.get_expected_libs():
-self.assertIn(self.getBuildDir() + "/" + lib, libraries_svr4_names)
+self.assertIn(os.path.realpath(self.getBuildDir() + "/" + lib), libraries_svr4_names)
 
 @llgs_test
 @skipUnlessPlatform(["linux", "android", "netbsd"])
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [lldb] 0ea4d18 - [LLDB] [doc] Update the current status of pkgsrc (NetBSD) building

2020-02-09 Thread Kamil Rytarowski via lldb-commits

Author: Kamil Rytarowski
Date: 2020-02-09T15:01:17+01:00
New Revision: 0ea4d18a288bf2a4010632f841b421e1bdc5072a

URL: 
https://github.com/llvm/llvm-project/commit/0ea4d18a288bf2a4010632f841b421e1bdc5072a
DIFF: 
https://github.com/llvm/llvm-project/commit/0ea4d18a288bf2a4010632f841b421e1bdc5072a.diff

LOG: [LLDB] [doc] Update the current status of pkgsrc (NetBSD) building

Added: 


Modified: 
lldb/docs/status/releases.rst

Removed: 




diff  --git a/lldb/docs/status/releases.rst b/lldb/docs/status/releases.rst
index de397f233c42..250d656c0b83 100644
--- a/lldb/docs/status/releases.rst
+++ b/lldb/docs/status/releases.rst
@@ -8,14 +8,7 @@ Nightly builds of LLDB are packaged and tested from trunk:
 
 Debian and Ubuntu: https://apt.llvm.org
 
-The pkgsrc framework offers a package with recent LLDB in the wip repository:
-
-::
-
-  cd pkgsrc/wip/lldb-git
-  make install clean
-
 Releases
 
 
-LLDB is packaged in most of the Debian & Ubuntu releases.
+LLDB is packaged in most of the Debian & Ubuntu releases and in pkgsrc 
(NetBSD).



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


[Lldb-commits] [lldb] 5a285f2 - [LLDB] [doc] Remove note about libpanel(3) and NetBSD

2020-02-09 Thread Kamil Rytarowski via lldb-commits

Author: Kamil Rytarowski
Date: 2020-02-09T15:01:17+01:00
New Revision: 5a285f207e109221572a0aabc83f2bce521322bd

URL: 
https://github.com/llvm/llvm-project/commit/5a285f207e109221572a0aabc83f2bce521322bd
DIFF: 
https://github.com/llvm/llvm-project/commit/5a285f207e109221572a0aabc83f2bce521322bd.diff

LOG: [LLDB] [doc] Remove note about libpanel(3) and NetBSD

libpanel(3) is now supported in all supported versions of NetBSD.

Added: 


Modified: 
lldb/docs/resources/build.rst

Removed: 




diff  --git a/lldb/docs/resources/build.rst b/lldb/docs/resources/build.rst
index 41586e22048d..285ea0144d90 100644
--- a/lldb/docs/resources/build.rst
+++ b/lldb/docs/resources/build.rst
@@ -286,14 +286,6 @@ the executable and the working directory to point to 
binaries inside of the
 ninja tree.
 
 
-NetBSD
-^^
-
-Current stable NetBSD release doesn't ship with libpanel(3), therefore it's
-required to disable curses(3) support with the
-``-DLLDB_ENABLE_CURSES:BOOL=FALSE`` option. To make sure check if
-``/usr/include/panel.h`` exists in your system.
-
 macOS
 ^
 



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


[Lldb-commits] [lldb] 8b37e1e - [lldb] [doc] Testing: Fix typos

2020-02-09 Thread Jan Kratochvil via lldb-commits

Author: Jan Kratochvil
Date: 2020-02-09T15:11:38+01:00
New Revision: 8b37e1e5ac090a498eb4940be3264e9d5ba8c97c

URL: 
https://github.com/llvm/llvm-project/commit/8b37e1e5ac090a498eb4940be3264e9d5ba8c97c
DIFF: 
https://github.com/llvm/llvm-project/commit/8b37e1e5ac090a498eb4940be3264e9d5ba8c97c.diff

LOG: [lldb] [doc] Testing: Fix typos

Added: 


Modified: 
lldb/docs/resources/test.rst

Removed: 




diff  --git a/lldb/docs/resources/test.rst b/lldb/docs/resources/test.rst
index 9966ad12eac2..63faf83ed597 100644
--- a/lldb/docs/resources/test.rst
+++ b/lldb/docs/resources/test.rst
@@ -9,7 +9,7 @@ The LLDB test suite consists of three 
diff erent kinds of test:
   located under ``lldb/packages/Python/lldbsuite`` and are written in Python
   using ``dotest`` (LLDB's custom testing framework on top of unittest2).
 * Integration tests that test the debugger through the command line. These are
-  locarted under `lldb/tests/Shell` and are written in a shell-style format
+  located under `lldb/test/Shell` and are written in a shell-style format
   using FileCheck to verify its output.
 
 All three test suites use the `LLVM Integrated Tester
@@ -82,7 +82,7 @@ run as part of a test suite.
 
 ::
 
-   > ./bin/llvm-lit -sv lldb/test --filter 
+   > ./bin/llvm-lit -sv tools/lldb/test --filter 
 
 
 Because lit automatically scans a directory for tests, it's also possible to



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


[Lldb-commits] [PATCH] D74296: [lldb] [doc] Sample commands prefix from > to $

2020-02-09 Thread Jan Kratochvil via Phabricator via lldb-commits
jankratochvil created this revision.
jankratochvil added a reviewer: JDevlieghere.
jankratochvil added a project: LLDB.

Remove all beginning `> ` from the sample commands as my accidental copy-paste 
(multiple times...) will discard `./bin/llvm-lit` which is difficult to rebuild 
(I have to `rm -rf` and `cmake` it all again).


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D74296

Files:
  lldb/docs/resources/test.rst


Index: lldb/docs/resources/test.rst
===
--- lldb/docs/resources/test.rst
+++ lldb/docs/resources/test.rst
@@ -51,8 +51,8 @@
 
 ::
 
-   > cmake -DLLDB_TEST_USER_ARGS="-A i386 -C /path/to/custom/clang" -G Ninja
-   > ninja check-lldb
+   $ cmake -DLLDB_TEST_USER_ARGS="-A i386 -C /path/to/custom/clang" -G Ninja
+   $ ninja check-lldb
 
 Note that multiple ``-A`` and ``-C`` flags can be specified to
 ``LLDB_TEST_USER_ARGS``.
@@ -82,7 +82,7 @@
 
 ::
 
-   > ./bin/llvm-lit -sv tools/lldb/test --filter 
+   $ ./bin/llvm-lit -sv tools/lldb/test --filter 
 
 
 Because lit automatically scans a directory for tests, it's also possible to
@@ -90,7 +90,7 @@
 
 ::
 
-   > ./bin/llvm-lit -sv 
tools/lldb/test/Shell/Commands/CommandScriptImmediateOutput
+   $ ./bin/llvm-lit -sv 
tools/lldb/test/Shell/Commands/CommandScriptImmediateOutput
 
 
 For the SB API tests it is possible to forward arguments to ``dotest.py`` by
@@ -98,7 +98,7 @@
 
 ::
 
-   > ./bin/llvm-lit -sv tools/lldb/test --param dotest-args='-C gcc'
+   $ ./bin/llvm-lit -sv tools/lldb/test --param dotest-args='-C gcc'
 
 
 Below is an overview of running individual test in the unit and API test suites
@@ -119,12 +119,12 @@
 
 ::
 
-   > ./bin/lldb-dotest -p TestInferiorCrashing.py
+   $ ./bin/lldb-dotest -p TestInferiorCrashing.py
 
 ::
 
-   > cd $lldb/test
-   > python dotest.py --executable  -p TestInferiorCrashing.py 
../packages/Python/lldbsuite/test
+   $ cd $lldb/test
+   $ python dotest.py --executable  -p TestInferiorCrashing.py 
../packages/Python/lldbsuite/test
 
 If the test is not specified by name (e.g. if you leave the ``-p`` argument
 off),  all tests in that directory will be executed:
@@ -132,17 +132,17 @@
 
 ::
 
-   > ./bin/lldb-dotest functionalities/data-formatter
+   $ ./bin/lldb-dotest functionalities/data-formatter
 
 ::
 
-   > python dotest.py --executable  
functionalities/data-formatter
+   $ python dotest.py --executable  
functionalities/data-formatter
 
 Many more options that are available. To see a list of all of them, run:
 
 ::
 
-   > python dotest.py -h
+   $ python dotest.py -h
 
 
 Running a Specific Test or Set of Tests: Unit Tests
@@ -154,14 +154,14 @@
 
 ::
 
-   > ./tools/lldb/unittests/Host/HostTests
+   $ ./tools/lldb/unittests/Host/HostTests
 
 
 To run a specific test, pass a filter, for example:
 
 ::
 
-   > ./tools/lldb/unittests/Host/HostTests 
--gtest_filter=SocketTest.DomainListenConnectAccept
+   $ ./tools/lldb/unittests/Host/HostTests 
--gtest_filter=SocketTest.DomainListenConnectAccept
 
 
 Running the Test Suite Remotely


Index: lldb/docs/resources/test.rst
===
--- lldb/docs/resources/test.rst
+++ lldb/docs/resources/test.rst
@@ -51,8 +51,8 @@
 
 ::
 
-   > cmake -DLLDB_TEST_USER_ARGS="-A i386 -C /path/to/custom/clang" -G Ninja
-   > ninja check-lldb
+   $ cmake -DLLDB_TEST_USER_ARGS="-A i386 -C /path/to/custom/clang" -G Ninja
+   $ ninja check-lldb
 
 Note that multiple ``-A`` and ``-C`` flags can be specified to
 ``LLDB_TEST_USER_ARGS``.
@@ -82,7 +82,7 @@
 
 ::
 
-   > ./bin/llvm-lit -sv tools/lldb/test --filter 
+   $ ./bin/llvm-lit -sv tools/lldb/test --filter 
 
 
 Because lit automatically scans a directory for tests, it's also possible to
@@ -90,7 +90,7 @@
 
 ::
 
-   > ./bin/llvm-lit -sv tools/lldb/test/Shell/Commands/CommandScriptImmediateOutput
+   $ ./bin/llvm-lit -sv tools/lldb/test/Shell/Commands/CommandScriptImmediateOutput
 
 
 For the SB API tests it is possible to forward arguments to ``dotest.py`` by
@@ -98,7 +98,7 @@
 
 ::
 
-   > ./bin/llvm-lit -sv tools/lldb/test --param dotest-args='-C gcc'
+   $ ./bin/llvm-lit -sv tools/lldb/test --param dotest-args='-C gcc'
 
 
 Below is an overview of running individual test in the unit and API test suites
@@ -119,12 +119,12 @@
 
 ::
 
-   > ./bin/lldb-dotest -p TestInferiorCrashing.py
+   $ ./bin/lldb-dotest -p TestInferiorCrashing.py
 
 ::
 
-   > cd $lldb/test
-   > python dotest.py --executable  -p TestInferiorCrashing.py ../packages/Python/lldbsuite/test
+   $ cd $lldb/test
+   $ python dotest.py --executable  -p TestInferiorCrashing.py ../packages/Python/lldbsuite/test
 
 If the test is not specified by name (e.g. if you leave the ``-p`` argument
 off),  all tests in that directory will be executed:
@@ -132,17 +132,17 @@
 
 ::
 
-   > ./bin/lldb-dotest functionalities/data-formatter
+   $ ./bin/lldb-dotest functionalities/data-formatter
 
 ::
 
-   > python dotest.py --executab

[Lldb-commits] [lldb] 74857b4 - [lldb] [doc] Status: Debugserver (remote debugging) is OK now

2020-02-09 Thread Jan Kratochvil via lldb-commits

Author: Jan Kratochvil
Date: 2020-02-09T15:22:36+01:00
New Revision: 74857b4260ec9db8d688c2d377a5f370efc150b4

URL: 
https://github.com/llvm/llvm-project/commit/74857b4260ec9db8d688c2d377a5f370efc150b4
DIFF: 
https://github.com/llvm/llvm-project/commit/74857b4260ec9db8d688c2d377a5f370efc150b4.diff

LOG: [lldb] [doc] Status: Debugserver (remote debugging) is OK now

Added: 


Modified: 
lldb/docs/status/status.rst

Removed: 




diff  --git a/lldb/docs/status/status.rst b/lldb/docs/status/status.rst
index 9b4bd58bb617..e793e5e7bc2c 100644
--- a/lldb/docs/status/status.rst
+++ b/lldb/docs/status/status.rst
@@ -53,7 +53,7 @@ Features Matrix
 
+++-++--+
 | Core file debugging| OK (ELF)   | OK (ELF)| OK 
(MachO) | OK (Minidump)|
 
+++-++--+
-| Debugserver (remote debugging) | Not ported | Not ported  | OK   
  | Not ported   |
+| Debugserver (remote debugging) | Not ported | OK (lldb-server)| OK   
  | Not ported   |
 
+++-++--+
 | Disassembly| OK | OK  | OK   
  | OK   |
 
+++-++--+



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


[Lldb-commits] [lldb] 273f638 - [LLDB] [doc] Document NetBSD status and sort OSs alphabetically

2020-02-09 Thread Kamil Rytarowski via lldb-commits

Author: Kamil Rytarowski
Date: 2020-02-09T18:02:07+01:00
New Revision: 273f638384d69f71838978001bf2f542d472b5f9

URL: 
https://github.com/llvm/llvm-project/commit/273f638384d69f71838978001bf2f542d472b5f9
DIFF: 
https://github.com/llvm/llvm-project/commit/273f638384d69f71838978001bf2f542d472b5f9.diff

LOG: [LLDB] [doc] Document NetBSD status and sort OSs alphabetically

Added: 


Modified: 
lldb/docs/status/status.rst

Removed: 




diff  --git a/lldb/docs/status/status.rst b/lldb/docs/status/status.rst
index e793e5e7bc2c..180d7ed5e4bc 100644
--- a/lldb/docs/status/status.rst
+++ b/lldb/docs/status/status.rst
@@ -1,6 +1,21 @@
 Status
 ==
 
+FreeBSD
+---
+
+LLDB on FreeBSD lags behind the Linux implementation but is improving rapidly.
+For more details, see the Features by OS section below.
+
+Linux
+-
+
+LLDB is improving on Linux. While the debugserver has not been ported (to
+enable remote debugging) Linux is nearing feature completeness with Darwin to
+debug x86_64 programs, and is partially working with i386 programs. ARM
+architectures on Linux are untested. For more details, see the Features by OS
+section below.
+
 macOS
 -
 
@@ -15,20 +30,10 @@ used from Python on the command line. This allows debug 
sessions to be
 scripted. It also allows powerful debugging actions to be created and attached
 to a variety of debugging workflows.
 
-Linux
--
-
-LLDB is improving on Linux. While the debugserver has not been ported (to
-enable remote debugging) Linux is nearing feature completeness with Darwin to
-debug x86_64 programs, and is partially working with i386 programs. ARM
-architectures on Linux are untested. For more details, see the Features by OS
-section below.
-
-FreeBSD

+NetBSD
+--
 
-LLDB on FreeBSD lags behind the Linux implementation but is improving rapidly.
-For more details, see the Features by OS section below.
+LLDB is improving on NetBSD and reaching feature completeness with Linux.
 
 Windows
 ---
@@ -40,26 +45,26 @@ section below.
 
 Features Matrix
 ---
-+++-++--+
-| Feature| FreeBSD| Linux   | 
macOS  | Windows  |
-+++=++==+
-| Backtracing| OK | OK  | OK   
  | OK   |
-+++-++--+
-| Breakpoints| OK | OK  | OK   
  | OK   |
-+++-++--+
-| C++11: | OK | OK  | OK   
  | Unknown  |
-+++-++--+
-| Commandline lldb tool  | OK | OK  | OK   
  | OK   |
-+++-++--+
-| Core file debugging| OK (ELF)   | OK (ELF)| OK 
(MachO) | OK (Minidump)|
-+++-++--+
-| Debugserver (remote debugging) | Not ported | OK (lldb-server)| OK   
  | Not ported   |
-+++-++--+
-| Disassembly| OK | OK  | OK   
  | OK   |
-+++-++--+
-| Expression evaluation  | Unknown| Works with some bugs| OK   
  | Works with some bugs |
-+++-++--+
-| JIT debugging  | Unknown| Symbolic debugging only | 
Untested   | No   |
-+++-++--+
-| Objective-C 2.0:   | Unknown| Not applicable  | OK   
  | Not applicable   |
-+++-++--+
++++-++--+--+
+| Feature| FreeBSD| Linux   | 
macOS  | NetBSD   | Windows  |
++==

[Lldb-commits] [lldb] 9d223a0 - [lldb] [doc] Status: Linux: Update the paragraph

2020-02-09 Thread Jan Kratochvil via lldb-commits

Author: Jan Kratochvil
Date: 2020-02-09T18:13:04+01:00
New Revision: 9d223a0106d0bde18aa6e353ec338206b235e3f2

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

LOG: [lldb] [doc] Status: Linux: Update the paragraph

Added: 


Modified: 
lldb/docs/status/status.rst

Removed: 




diff  --git a/lldb/docs/status/status.rst b/lldb/docs/status/status.rst
index 180d7ed5e4bc..8a922d086764 100644
--- a/lldb/docs/status/status.rst
+++ b/lldb/docs/status/status.rst
@@ -10,11 +10,9 @@ For more details, see the Features by OS section below.
 Linux
 -
 
-LLDB is improving on Linux. While the debugserver has not been ported (to
-enable remote debugging) Linux is nearing feature completeness with Darwin to
-debug x86_64 programs, and is partially working with i386 programs. ARM
-architectures on Linux are untested. For more details, see the Features by OS
-section below.
+LLDB is improving on Linux. Linux is nearing feature completeness with Darwin
+to debug x86_64, i386, ARM, AArch64, IBM POWER (ppc64), IBM Z (s390x), and
+MIPS64 programs. For more details, see the Features by OS section below.
 
 macOS
 -



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


[Lldb-commits] [PATCH] D73206: Pass `CompileUnit *` along `DWARFDIE` for DWZ

2020-02-09 Thread Jan Kratochvil via Phabricator via lldb-commits
jankratochvil added a comment.

In D73206#1859944 , @labath wrote:

> From a high-level, this approach looks like it could be viable. However, you 
> have taken this a lot further than I would have expected. What I was 
> expecting to see would be that a bunch of the DWARF internal functions would 
> get an extra argument (be it a CompileUnit, DWARFUnit, or whatever), but I 
> did not expect that this would also appear on the "generic" interfaces. My 
> idea was that the external interface would keep getting just a single 
> user_id_t, but then during the process of decoding that integer into a 
> DWARFDie, we would also produce the additional CompileUnit object.


In such case there need to be two kinds of `user_id_t`. One internal to DWARF/ 
not containing MainCU and one for "generic" interfaces which does contain 
MainCU. Because internally if `user_id_t` contains MainCU then already also 
`DWARFDIE` and `DIERef` must contain MainCU - see for example 
`ElaboratingDIEIterator` calling `DWARFDIE::GetID` where is no chance to know 
the MainCU (without heavy refactorization to pass it down the call chain) - and 
the code does not really need to know MainCU, it is just using `user_id_t` as a 
unique DIE identifier.

> Now, that doesn't mean that adding a CompileUnit argument to these functions 
> too is a bad idea. Quite the opposite -- _if it actually works_, it would be 
> great because it would give us a lot more freedom in encoding the information 
> into the user_id_t value. However, I have some doubts about that. For 
> example, right now we don't create any CompileUnit objects for types  in 
> DWARF type units, and I'm not sure how much we want to change that because of 
> the sheer number of type units.  That means we'd still have to have a way to 
> encode a precise type location in a user_id_t without a CompileUnit, though 
> maybe we would be ablle to assume that a CompileUnit is always available in 
> the DWZ case (?).

Yes, if there is no `CompileUnit` available then DWZ is not used for that type 
and the `DWARFUnit` itself can be used. `CompileUnit *` can remain `nullptr` 
when not known.

The new plan:

- `SymbolFile` and `SB*` API should say unchanged with MainCUs encoded into 
`user_id_t` they use
- types like `Function` do contain `CompileUnit *` but still it may be easier 
for the APIs to encode MainCU into their `user_id_t`.
- indexes contain now `DIERef`. They should contain rather a new 
MainCU-extended variant of `DIERef`.
- `DWARFASTParser` (+`DWARFASTParserClang`) API - there must be an additional 
`CompileUnit *` parameter as it uses `DWARFDIE`. (`DWARFDIE` cannot fit MainCU 
into its 16 bytes.)
- `DWARFMappedHash` also must have new MainCU field I think.
- `NameToDIE` should be using the new MainCU-enhanced `DIERef`.

Given that `user_id_t` and `DIERef` will exist both with and without MainCU 
(depending on which code is using them) it would be nice to make a new 
MainCU-extended inherited type for them so that their mistaken use is 
compile-time checked. But `user_id_t` is just an integer typedef so it would 
need to be class-wrapped.  For `user_id_t` one needs to also make a new 
MainCU-extended type of `UserID`.

> This duality does make me think that we'd be better off in not adding the 
> CompileUnit arguments and encoding everything into a user_id_t. However, I am 
> not sure if we really have a choice here -- it may be that this information 
> is so complex that it will not be possible to reasonably encode it into 64 
> bits.

That my DWZ branch (`git clone -b dwz git://git.jankratochvil.net/lldb`) 
already encodes MainCU to all of `DWARFDIE` (becoming 24B instead of 16B), 
`DIERef` (staying 8B) and `user_id_t` (staying 8B, reducing DWO unit number 
from 31 bits to 29 bits). One can encode MainCU into the DWO field as both can 
never exist together.

> PS. It would be easier to evaluate this if this was based on master instead 
> of some patch which is taking the source in the direction we don't want to go 
> it.

I need to verify the new refactorization satisfies all the requirements of my 
existing functional non-regressing DWZ implementation I have. I would then have 
to create a second proof of concept patch being to post here based on `master`. 
Which I hope is not required for your review before its real implementation. I 
understand the final refactorization patch will be based on `master` and DWZ 
will be rebased on top of it.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D73206/new/

https://reviews.llvm.org/D73206



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


[Lldb-commits] [lldb] 512c03b - [DebugInfo] Add a DWARFDataExtractor constructor that takes ArrayRef

2020-02-09 Thread Fangrui Song via lldb-commits

Author: Fangrui Song
Date: 2020-02-09T17:45:32-08:00
New Revision: 512c03bac449d8d40c5fc8d0ff1719f887c7fdc3

URL: 
https://github.com/llvm/llvm-project/commit/512c03bac449d8d40c5fc8d0ff1719f887c7fdc3
DIFF: 
https://github.com/llvm/llvm-project/commit/512c03bac449d8d40c5fc8d0ff1719f887c7fdc3.diff

LOG: [DebugInfo] Add a DWARFDataExtractor constructor that takes 
ArrayRef

Similar to D67797 (DataExtractor).

Added: 


Modified: 
lldb/source/Plugins/SymbolFile/DWARF/DWARFDataExtractor.cpp
lldb/source/Plugins/SymbolFile/DWARF/DWARFUnit.cpp
llvm/include/llvm/DebugInfo/DWARF/DWARFDataExtractor.h
llvm/lib/DebugInfo/DWARF/DWARFDebugLoc.cpp
llvm/tools/llvm-readobj/DwarfCFIEHPrinter.h

Removed: 




diff  --git a/lldb/source/Plugins/SymbolFile/DWARF/DWARFDataExtractor.cpp 
b/lldb/source/Plugins/SymbolFile/DWARF/DWARFDataExtractor.cpp
index 4eea18e0f237..cf483286a66d 100644
--- a/lldb/source/Plugins/SymbolFile/DWARF/DWARFDataExtractor.cpp
+++ b/lldb/source/Plugins/SymbolFile/DWARF/DWARFDataExtractor.cpp
@@ -23,8 +23,7 @@ DWARFDataExtractor::GetDWARFOffset(lldb::offset_t 
*offset_ptr) const {
 
 llvm::DWARFDataExtractor DWARFDataExtractor::GetAsLLVM() const {
   return llvm::DWARFDataExtractor(
-  llvm::StringRef(reinterpret_cast(GetDataStart()),
-  GetByteSize()),
+  llvm::makeArrayRef(GetDataStart(), GetByteSize()),
   GetByteOrder() == lldb::eByteOrderLittle, GetAddressByteSize());
 }
 } // namespace lldb_private

diff  --git a/lldb/source/Plugins/SymbolFile/DWARF/DWARFUnit.cpp 
b/lldb/source/Plugins/SymbolFile/DWARF/DWARFUnit.cpp
index 8944078d7fff..e4a89160969e 100644
--- a/lldb/source/Plugins/SymbolFile/DWARF/DWARFUnit.cpp
+++ b/lldb/source/Plugins/SymbolFile/DWARF/DWARFUnit.cpp
@@ -468,8 +468,8 @@ void DWARFUnit::SetLoclistsBase(dw_addr_t loclists_base) {
 std::unique_ptr
 DWARFUnit::GetLocationTable(const DataExtractor &data) const {
   llvm::DWARFDataExtractor llvm_data(
-  toStringRef(data.GetData()),
-  data.GetByteOrder() == lldb::eByteOrderLittle, 
data.GetAddressByteSize());
+  data.GetData(), data.GetByteOrder() == lldb::eByteOrderLittle,
+  data.GetAddressByteSize());
 
   if (m_is_dwo || GetVersion() >= 5)
 return std::make_unique(llvm_data, GetVersion());

diff  --git a/llvm/include/llvm/DebugInfo/DWARF/DWARFDataExtractor.h 
b/llvm/include/llvm/DebugInfo/DWARF/DWARFDataExtractor.h
index 6f7ddb2ef421..c4ba982ce808 100644
--- a/llvm/include/llvm/DebugInfo/DWARF/DWARFDataExtractor.h
+++ b/llvm/include/llvm/DebugInfo/DWARF/DWARFDataExtractor.h
@@ -32,6 +32,11 @@ class DWARFDataExtractor : public DataExtractor {
   /// Constructor for cases when there are no relocations.
   DWARFDataExtractor(StringRef Data, bool IsLittleEndian, uint8_t AddressSize)
 : DataExtractor(Data, IsLittleEndian, AddressSize) {}
+  DWARFDataExtractor(ArrayRef Data, bool IsLittleEndian,
+ uint8_t AddressSize)
+  : DataExtractor(
+StringRef(reinterpret_cast(Data.data()), 
Data.size()),
+IsLittleEndian, AddressSize) {}
 
   /// Extracts a value and applies a relocation to the result if
   /// one exists for the given offset.

diff  --git a/llvm/lib/DebugInfo/DWARF/DWARFDebugLoc.cpp 
b/llvm/lib/DebugInfo/DWARF/DWARFDebugLoc.cpp
index 131017e749d6..8f047bb872e5 100644
--- a/llvm/lib/DebugInfo/DWARF/DWARFDebugLoc.cpp
+++ b/llvm/lib/DebugInfo/DWARF/DWARFDebugLoc.cpp
@@ -109,7 +109,7 @@ DWARFLocationInterpreter::Interpret(const 
DWARFLocationEntry &E) {
 static void dumpExpression(raw_ostream &OS, ArrayRef Data,
bool IsLittleEndian, unsigned AddressSize,
const MCRegisterInfo *MRI, DWARFUnit *U) {
-  DWARFDataExtractor Extractor(toStringRef(Data), IsLittleEndian, AddressSize);
+  DWARFDataExtractor Extractor(Data, IsLittleEndian, AddressSize);
   DWARFExpression(Extractor, AddressSize).print(OS, MRI, U);
 }
 

diff  --git a/llvm/tools/llvm-readobj/DwarfCFIEHPrinter.h 
b/llvm/tools/llvm-readobj/DwarfCFIEHPrinter.h
index 0a365d4fe72a..3d0b75f93771 100644
--- a/llvm/tools/llvm-readobj/DwarfCFIEHPrinter.h
+++ b/llvm/tools/llvm-readobj/DwarfCFIEHPrinter.h
@@ -186,12 +186,9 @@ void PrinterContext::printEHFrame(
   if (Error E = Result.takeError())
 reportError(std::move(E), ObjF->getFileName());
 
-  auto Contents = Result.get();
-  DWARFDataExtractor DE(
-  StringRef(reinterpret_cast(Contents.data()),
-Contents.size()),
-  ELFT::TargetEndianness == support::endianness::little,
-  ELFT::Is64Bits ? 8 : 4);
+  DWARFDataExtractor DE(*Result,
+ELFT::TargetEndianness == support::endianness::little,
+ELFT::Is64Bits ? 8 : 4);
   DWARFDebugFrame EHFrame(Triple::ArchType(ObjF->getArch()), /*IsEH=*/true,
   /*EHFrameAddress=*/Address);
   EHFrame.parse(DE);



_