[Lldb-commits] [PATCH] D98289: [lldb] Fix DW_AT_ranges DW_FORM_sec_offset not using DW_AT_rnglists_base (used by GCC)

2021-03-11 Thread Pavel Labath via Phabricator via lldb-commits
labath added a comment.

I'm not sure what are the "planned changes", but have you compared this 
implementation with the one in llvm. IIRC, I tried to implement it the same one 
as the one over there, but it seems the llvm one has changed since then. At a 
cursory glance it looks like it does not suffer from this problem, so it would 
be preferable if we could fix this problem, by making our implementation be 
more like the llvm one.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D98289

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


[Lldb-commits] [PATCH] D96458: [LLDB] Add support for Arm64/Linux dynamic register sets

2021-03-11 Thread Pavel Labath via Phabricator via lldb-commits
labath added a comment.

Would something like F15819833: reginfo.diff 
 do the trick? It needs a bit of cleanup (I 
haven't actually removed `ConfigureRegisterInfos` function yet -- I just moved 
it right next to the reginfo creation), but I think should make it clear where 
I'm going with this.


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

https://reviews.llvm.org/D96458

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


[Lldb-commits] [PATCH] D98289: [lldb] Fix DW_AT_ranges DW_FORM_sec_offset not using DW_AT_rnglists_base (used by GCC)

2021-03-11 Thread Jan Kratochvil via Phabricator via lldb-commits
jankratochvil added a comment.

There is some discussion what is valid vs. invalid DWARF-5 and whether DWARF-5 
needs some updates: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99490
The planned change is that with this version of the patch `m_ranges_base` 
defauled to 0 but my idea for the 'planned change' was it should default to an 
invalid value (permitting `DW_FORM_sec_offset` but not `DW_FORM_rnglistx`). But 
then I found LLVM DWOs default to 
`llvm::DWARFListTableHeader::getHeaderSize(DWARF32)` which is nowhere stated in 
DWARF-5. And the GCC DWOs are somehow overall broken.
So probably going to propose the LLVM behavior for DWARF-6. I will check the 
LLVM implementation, thanks for the hint.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D98289

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


[Lldb-commits] [PATCH] D98289: [lldb] Fix DW_AT_ranges DW_FORM_sec_offset not using DW_AT_rnglists_base (used by GCC)

2021-03-11 Thread Jan Kratochvil via Phabricator via lldb-commits
jankratochvil added a comment.

Ah there is already a discussion from it: 
http://lists.dwarfstd.org/pipermail/dwarf-discuss-dwarfstd.org/2021-March/004765.html


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D98289

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


[Lldb-commits] [PATCH] D96458: [LLDB] Add support for Arm64/Linux dynamic register sets

2021-03-11 Thread Muhammad Omair Javaid via Phabricator via lldb-commits
omjavaid added a comment.

In D96458#2618846 , @labath wrote:

> Would something like F15819833: reginfo.diff 
>  do the trick? It needs a bit of cleanup 
> (I haven't actually removed `ConfigureRegisterInfos` function yet -- I just 
> moved it right next to the reginfo creation), but I think should make it 
> clear where I'm going with this.

Yes this should work. Thanks for the prompt response. May I use this code in 
follow up?


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

https://reviews.llvm.org/D96458

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


[Lldb-commits] [PATCH] D96458: [LLDB] Add support for Arm64/Linux dynamic register sets

2021-03-11 Thread Pavel Labath via Phabricator via lldb-commits
labath added a comment.

Yes, definitely.


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

https://reviews.llvm.org/D96458

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


[Lldb-commits] [lldb] 3d47f1f - [lldb] Remove implicit_const_form_support.test

2021-03-11 Thread Pavel Labath via lldb-commits

Author: Pavel Labath
Date: 2021-03-11T10:47:06+01:00
New Revision: 3d47f1f9b826003df4c19767d433095df89d1bc5

URL: 
https://github.com/llvm/llvm-project/commit/3d47f1f9b826003df4c19767d433095df89d1bc5
DIFF: 
https://github.com/llvm/llvm-project/commit/3d47f1f9b826003df4c19767d433095df89d1bc5.diff

LOG: [lldb] Remove implicit_const_form_support.test

It is superseded by dwarf5-implicit-const.s (added in D98197), which tests it 
more thoroughly.

Added: 


Modified: 


Removed: 
lldb/test/Shell/Breakpoint/implicit_const_form_support.test



diff  --git a/lldb/test/Shell/Breakpoint/implicit_const_form_support.test 
b/lldb/test/Shell/Breakpoint/implicit_const_form_support.test
deleted file mode 100644
index 6d715788576c..
--- a/lldb/test/Shell/Breakpoint/implicit_const_form_support.test
+++ /dev/null
@@ -1,33 +0,0 @@
-# RUN: yaml2obj %p/Inputs/implicit_const_form_support.yaml -o %ttest
-# RUN: lldb-test breakpoints %ttest %s | FileCheck %s
-
-## The intention of the test is to check that DW_FORM_implicit_const
-## is supported and handled properly.
-
-## About implicit_const_form_support.yaml:
-## The following invocation and code were used to produce the binary
-## which was converted to yaml and reduced:
-## gcc version 8.0.1 20180319 (experimental) (GCC)
-##
-## g++ test.cpp -g -gdwarf-5 -o test
-##
-## // test.cpp
-## int foo1() {
-##  return 0;
-## }
-## 
-## int foo2() {
-##  return 0;
-## }
-## 
-## int main() {
-##  return foo1() + foo2();
-## }
-
-b foo1
-# CHECK-LABEL: b foo1
-# CHECK: Address: {{.*}}foo1() at test.cpp:2:9
-
-b foo2
-# CHECK-LABEL: b foo2
-# CHECK: Address: {{.*}}foo2() at test.cpp:6:9



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


[Lldb-commits] [PATCH] D98289: [lldb] Fix DW_AT_ranges DW_FORM_sec_offset not using DW_AT_rnglists_base (used by GCC)

2021-03-11 Thread David Blaikie via Phabricator via lldb-commits
dblaikie added a comment.

In D98289#2618881 , @jankratochvil 
wrote:

> Ah there is already a discussion from it: 
> http://lists.dwarfstd.org/pipermail/dwarf-discuss-dwarfstd.org/2021-March/004765.html

Yeah, happy to discuss/clarify/help with anything in this front either on that 
thread, in this review, or elsewhere.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D98289

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


[Lldb-commits] [PATCH] D97017: [lldb-server] Exit the DataAvailableCallback loop when `done` or `interrupt` are set

2021-03-11 Thread Pavel Labath via Phabricator via lldb-commits
labath added a comment.

What are the situations where we set `done` or `interrupt`? The ones I could 
find are:

- the `k` packet. This packet is (for good reasons) specified very vaguely. The 
spec says it should have no reply, but lldb will actually try to listen for a 
reply anyway. I think that making lldb-server stop sending the `k` reply might 
be a good thing (for protocol conformance), but that still doesn't mean we 
should exit immediately after receiving it. The ideal behavior would be to 
wait(2) for the inferior, and only exit after it has been reaped properly.
- the interrupt (^C) packet in the platform personality. I'm not sure that we 
ever actually send this packet on platform connections, but even if we did, 
exiting does not seem like the proper response.

So overall, I'm not sure that this patch is really a good idea.




Comment at: 
lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp:1064
+
+if (done || interrupt) {
+  m_mainloop.RequestTermination();

omjavaid wrote:
> GDBRemoteCommunicationServer::GetPacketAndSendResponse sets done on 
> eServerPacketType_invalid (empty packet) wouldnt termination be too strict 
> for that case. 
> 
Possibly. Although, I don't think a well-behaved client should ever be sending 
an empty packet, so terminating the connection when it does send it, wouldn't 
be too bad imo.


Repository:
  rLLDB LLDB

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

https://reviews.llvm.org/D97017

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


[Lldb-commits] [lldb] aada898 - [lldb] Add missing debugserver dependency to check-lldb

2021-03-11 Thread Raphael Isemann via lldb-commits

Author: Raphael Isemann
Date: 2021-03-11T15:55:43+01:00
New Revision: aada8984e617058bfc9aa1f879d584ad04d2e7df

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

LOG: [lldb] Add missing debugserver dependency to check-lldb

D96202 removes the test dependency on debugserver which is causing a bunch of
tests to fail on a clean build.

This patch re-adds the dependency. I decided to not add the dependency in the
`test/API` folder as we actually need it in all kinds of tests (we have shell,
API and a few unit tests such as the LLDBServerTests that depend on the
debugserver binary). lldb-server is also handled in the same way.

Reviewed By: JDevlieghere, labath

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

Added: 


Modified: 
lldb/test/CMakeLists.txt

Removed: 




diff  --git a/lldb/test/CMakeLists.txt b/lldb/test/CMakeLists.txt
index 34fc377e0e20..9944e37a46fc 100644
--- a/lldb/test/CMakeLists.txt
+++ b/lldb/test/CMakeLists.txt
@@ -49,6 +49,9 @@ if (CMAKE_SYSTEM_NAME MATCHES "Darwin")
   add_lldb_test_dependency(darwin-debug)
 endif()
 
+if(TARGET debugserver)
+  add_lldb_test_dependency(debugserver)
+endif()
 if(TARGET lldb-server)
   add_lldb_test_dependency(lldb-server)
 endif()



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


[Lldb-commits] [PATCH] D98196: [lldb] Add missing debugserver/lldb-server dependencies to check-lldb

2021-03-11 Thread Raphael Isemann via Phabricator via lldb-commits
This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rGaada8984e617: [lldb] Add missing debugserver dependency to 
check-lldb (authored by teemperor).
Herald added a subscriber: lldb-commits.

Changed prior to commit:
  https://reviews.llvm.org/D98196?vs=329052&id=329957#toc

Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D98196

Files:
  lldb/test/CMakeLists.txt


Index: lldb/test/CMakeLists.txt
===
--- lldb/test/CMakeLists.txt
+++ lldb/test/CMakeLists.txt
@@ -49,6 +49,9 @@
   add_lldb_test_dependency(darwin-debug)
 endif()
 
+if(TARGET debugserver)
+  add_lldb_test_dependency(debugserver)
+endif()
 if(TARGET lldb-server)
   add_lldb_test_dependency(lldb-server)
 endif()


Index: lldb/test/CMakeLists.txt
===
--- lldb/test/CMakeLists.txt
+++ lldb/test/CMakeLists.txt
@@ -49,6 +49,9 @@
   add_lldb_test_dependency(darwin-debug)
 endif()
 
+if(TARGET debugserver)
+  add_lldb_test_dependency(debugserver)
+endif()
 if(TARGET lldb-server)
   add_lldb_test_dependency(lldb-server)
 endif()
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D98441: [lldb] Fix the man page build

2021-03-11 Thread Raphael Isemann via Phabricator via lldb-commits
This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rG75f97cdafe52: [lldb] Fix the man page build (authored by 
teemperor).
Herald added a subscriber: lldb-commits.

Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D98441

Files:
  lldb/docs/conf.py


Index: lldb/docs/conf.py
===
--- lldb/docs/conf.py
+++ lldb/docs/conf.py
@@ -15,16 +15,21 @@
 import sys, os, re
 from datetime import date
 
-# If extensions (or modules to document with autodoc) are in another directory,
-# add these directories to sys.path here. If the directory is relative to the
-# documentation root, use os.path.abspath to make it absolute, like shown here.
-
-# Add the current directory that contains the mock _lldb native module which
-# is imported by the `lldb` module.
-sys.path.insert(0, os.path.abspath("."))
-# Add the build directory that contains the `lldb` module. LLDB_SWIG_MODULE is
-# set by CMake.
-sys.path.insert(0, os.getenv("LLDB_SWIG_MODULE"))
+building_man_page = tags.has('builder-man')
+
+# For the website we need to setup the path to the generated LLDB module that
+# we can generate documentation for its API.
+if not building_man_page:
+# If extensions (or modules to document with autodoc) are in another 
directory,
+# add these directories to sys.path here. If the directory is relative to 
the
+# documentation root, use os.path.abspath to make it absolute, like shown 
here.
+
+# Add the current directory that contains the mock _lldb native module 
which
+# is imported by the `lldb` module.
+sys.path.insert(0, os.path.abspath("."))
+# Add the build directory that contains the `lldb` module. 
LLDB_SWIG_MODULE is
+# set by CMake.
+sys.path.insert(0, os.getenv("LLDB_SWIG_MODULE"))
 
 # Put the generated Python API documentation in the 'python_api' folder. This
 # also defines the URL these files will have in the generated website.
@@ -37,8 +42,12 @@
 
 # Add any Sphinx extension module names here, as strings. They can be 
extensions
 # coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
-extensions = ['sphinx.ext.todo', 'sphinx.ext.mathjax', 
'sphinx.ext.intersphinx',
-  'sphinx_automodapi.automodapi']
+extensions = ['sphinx.ext.todo', 'sphinx.ext.mathjax', 
'sphinx.ext.intersphinx']
+
+# Unless we only generate the basic manpage we need the plugin for generating
+# the Python API documentation.
+if not building_man_page:
+extensions.append('sphinx_automodapi.automodapi')
 
 # Add any paths that contain templates here, relative to this directory.
 templates_path = ['_templates']
@@ -52,7 +61,7 @@
   import recommonmark
 except ImportError:
   # manpages do not use any .md sources
-  if not tags.has('builder-man'):
+  if not building_man_page:
 raise
 else:
   import sphinx
@@ -97,7 +106,12 @@
 # List of patterns, relative to source directory, that match files and
 # directories to ignore when looking for source files.
 exclude_patterns = ['_build', 'analyzer']
-
+# Ignore the generated Python documentation that is only used on the website.
+# Without this we will get a lot of warnings about doc pages that aren't
+# included by any doctree (as the manpage ignores those pages but they are
+# potentially still around from a previous website generation).
+if building_man_page:
+exclude_patterns.append(automodapi_toctreedirnm)
 # Use the recommended 'any' rule so that referencing SB API classes is possible
 # by just writing `SBData`.
 default_role = 'any'


Index: lldb/docs/conf.py
===
--- lldb/docs/conf.py
+++ lldb/docs/conf.py
@@ -15,16 +15,21 @@
 import sys, os, re
 from datetime import date
 
-# If extensions (or modules to document with autodoc) are in another directory,
-# add these directories to sys.path here. If the directory is relative to the
-# documentation root, use os.path.abspath to make it absolute, like shown here.
-
-# Add the current directory that contains the mock _lldb native module which
-# is imported by the `lldb` module.
-sys.path.insert(0, os.path.abspath("."))
-# Add the build directory that contains the `lldb` module. LLDB_SWIG_MODULE is
-# set by CMake.
-sys.path.insert(0, os.getenv("LLDB_SWIG_MODULE"))
+building_man_page = tags.has('builder-man')
+
+# For the website we need to setup the path to the generated LLDB module that
+# we can generate documentation for its API.
+if not building_man_page:
+# If extensions (or modules to document with autodoc) are in another directory,
+# add these directories to sys.path here. If the directory is relative to the
+# documentation root, use os.path.abspath to make it absolute, like shown here.
+
+# Add the current directory that contains the mock _lldb native module whic

[Lldb-commits] [lldb] 75f97cd - [lldb] Fix the man page build

2021-03-11 Thread Raphael Isemann via lldb-commits

Author: Raphael Isemann
Date: 2021-03-11T19:51:47+01:00
New Revision: 75f97cdafe52cbfd4ba39c3b8c334ab0ca0106a2

URL: 
https://github.com/llvm/llvm-project/commit/75f97cdafe52cbfd4ba39c3b8c334ab0ca0106a2
DIFF: 
https://github.com/llvm/llvm-project/commit/75f97cdafe52cbfd4ba39c3b8c334ab0ca0106a2.diff

LOG: [lldb] Fix the man page build

In D94489 we changed the way we build the docs and now have some additional
dependencies to generate the Python API docs. As the same sphinx project is
generating the man pages for LLDB it should have in theory the same setup code
that sets up the mocked LLDB module.

However, as we don't have that setup code the man page generation just fails as
there is no mocked LLDB module and the Python API generation errors out.

The man page anyway doesn't cover the Python API so I don't think there is any
point of going through the whole process (and requiring the sphinx plugins) just
to generate the (eventually unused) Python docs.

This patch just skips the relevant Python API generation when we are building
the man page.

Reviewed By: JDevlieghere

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

Added: 


Modified: 
lldb/docs/conf.py

Removed: 




diff  --git a/lldb/docs/conf.py b/lldb/docs/conf.py
index d55aad2bcff71..b614f43f55c00 100644
--- a/lldb/docs/conf.py
+++ b/lldb/docs/conf.py
@@ -15,16 +15,21 @@
 import sys, os, re
 from datetime import date
 
-# If extensions (or modules to document with autodoc) are in another directory,
-# add these directories to sys.path here. If the directory is relative to the
-# documentation root, use os.path.abspath to make it absolute, like shown here.
-
-# Add the current directory that contains the mock _lldb native module which
-# is imported by the `lldb` module.
-sys.path.insert(0, os.path.abspath("."))
-# Add the build directory that contains the `lldb` module. LLDB_SWIG_MODULE is
-# set by CMake.
-sys.path.insert(0, os.getenv("LLDB_SWIG_MODULE"))
+building_man_page = tags.has('builder-man')
+
+# For the website we need to setup the path to the generated LLDB module that
+# we can generate documentation for its API.
+if not building_man_page:
+# If extensions (or modules to document with autodoc) are in another 
directory,
+# add these directories to sys.path here. If the directory is relative to 
the
+# documentation root, use os.path.abspath to make it absolute, like shown 
here.
+
+# Add the current directory that contains the mock _lldb native module 
which
+# is imported by the `lldb` module.
+sys.path.insert(0, os.path.abspath("."))
+# Add the build directory that contains the `lldb` module. 
LLDB_SWIG_MODULE is
+# set by CMake.
+sys.path.insert(0, os.getenv("LLDB_SWIG_MODULE"))
 
 # Put the generated Python API documentation in the 'python_api' folder. This
 # also defines the URL these files will have in the generated website.
@@ -37,8 +42,12 @@
 
 # Add any Sphinx extension module names here, as strings. They can be 
extensions
 # coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
-extensions = ['sphinx.ext.todo', 'sphinx.ext.mathjax', 
'sphinx.ext.intersphinx',
-  'sphinx_automodapi.automodapi']
+extensions = ['sphinx.ext.todo', 'sphinx.ext.mathjax', 
'sphinx.ext.intersphinx']
+
+# Unless we only generate the basic manpage we need the plugin for generating
+# the Python API documentation.
+if not building_man_page:
+extensions.append('sphinx_automodapi.automodapi')
 
 # Add any paths that contain templates here, relative to this directory.
 templates_path = ['_templates']
@@ -52,7 +61,7 @@
   import recommonmark
 except ImportError:
   # manpages do not use any .md sources
-  if not tags.has('builder-man'):
+  if not building_man_page:
 raise
 else:
   import sphinx
@@ -97,7 +106,12 @@
 # List of patterns, relative to source directory, that match files and
 # directories to ignore when looking for source files.
 exclude_patterns = ['_build', 'analyzer']
-
+# Ignore the generated Python documentation that is only used on the website.
+# Without this we will get a lot of warnings about doc pages that aren't
+# included by any doctree (as the manpage ignores those pages but they are
+# potentially still around from a previous website generation).
+if building_man_page:
+exclude_patterns.append(automodapi_toctreedirnm)
 # Use the recommended 'any' rule so that referencing SB API classes is possible
 # by just writing `SBData`.
 default_role = 'any'



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