Commit Graph

337 Commits

Author SHA1 Message Date
Jan Kratochvil d2e0fee77b [lldb] [doc] Change sample commands prefix from > to $
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).

Differential Revision: https://reviews.llvm.org/D74296
2020-02-10 09:50:37 +01:00
Jan Kratochvil 9d223a0106 [lldb] [doc] Status: Linux: Update the paragraph 2020-02-09 18:13:04 +01:00
Kamil Rytarowski 273f638384 [LLDB] [doc] Document NetBSD status and sort OSs alphabetically 2020-02-09 18:02:07 +01:00
Jan Kratochvil 74857b4260 [lldb] [doc] Status: Debugserver (remote debugging) is OK now 2020-02-09 15:22:36 +01:00
Jan Kratochvil 8b37e1e5ac [lldb] [doc] Testing: Fix typos 2020-02-09 15:11:38 +01:00
Kamil Rytarowski 5a285f207e [LLDB] [doc] Remove note about libpanel(3) and NetBSD
libpanel(3) is now supported in all supported versions of NetBSD.
2020-02-09 15:01:17 +01:00
Kamil Rytarowski 0ea4d18a28 [LLDB] [doc] Update the current status of pkgsrc (NetBSD) building 2020-02-09 15:01:17 +01:00
Med Ismail Bennani 7ebe9cc4fc [lldb/Target] Add Assert StackFrame Recognizer
When a thread stops, this checks depending on the platform if the top frame is
an abort stack frame. If so, it looks for an assert stack frame in the upper
frames and set it as the most relavant frame when found.

To do so, the StackFrameRecognizer class holds a "Most Relevant Frame" and a
"cooked" stop reason description. When the thread is about to stop, it checks
if the current frame is recognized, and if so, it fetches the recognized frame's
attributes and applies them.

rdar://58528686

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

Signed-off-by: Med Ismail Bennani <medismail.bennani@gmail.com>
2020-02-06 18:27:48 +01:00
Pavel Labath 98b273c893 Revert "[lldb/Target] Add Assert StackFrame Recognizer"
This reverts commit 2b7f32892b because of test
failures due to dangling pointers.
2020-02-05 15:51:38 -08:00
Med Ismail Bennani 2b7f32892b [lldb/Target] Add Assert StackFrame Recognizer
When a thread stops, this checks depending on the platform if the top frame is
an abort stack frame. If so, it looks for an assert stack frame in the upper
frames and set it as the most relavant frame when found.

To do so, the StackFrameRecognizer class holds a "Most Relevant Frame" and a
"cooked" stop reason description. When the thread is about to stop, it checks
if the current frame is recognized, and if so, it fetches the recognized frame's
attributes and applies them.

rdar://58528686

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

Signed-off-by: Med Ismail Bennani <medismail.bennani@gmail.com>
2020-02-05 17:49:13 +01:00
Med Ismail Bennani 954d04295b Revert "[lldb/Target] Add Assert StackFrame Recognizer"
This reverts commit 03a6b858fd.

The test doesn't pass on Debian.
2020-01-28 18:40:08 +01:00
Med Ismail Bennani 03a6b858fd [lldb/Target] Add Assert StackFrame Recognizer
When a thread stops, this checks depending on the platform if the top frame is
an abort stack frame. If so, it looks for an assert stack frame in the upper
frames and set it as the most relavant frame when found.

To do so, the StackFrameRecognizer class holds a "Most Relevant Frame" and a
"cooked" stop reason description. When the thread is about to stop, it checks
if the current frame is recognized, and if so, it fetches the recognized frame's
attributes and applies them.

rdar://58528686

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

Signed-off-by: Med Ismail Bennani <medismail.bennani@gmail.com>
2020-01-28 18:21:29 +01:00
Jonas Devlieghere 48490e3247 [lldb/Docs] Document testing strategies for the reproducers
Document the different ways we test the reproducers. This is mostly to
describe the new check-lldb-repro target.
2020-01-22 18:02:36 -08:00
Adrian Prantl fa001767f0 Fix typos 2020-01-21 15:32:34 -08:00
Fred Riss 0478eadf73 [lldb/DataFormatters] Fix the `$$deference$$` synthetic child
Summary:
The ValueObject code checks for a special `$$dereference$$` synthetic
child to allow formatter providers to implement a natural
dereferencing behavior in `frame variable` for objects like smart
pointers.

This support was broken when used directly throught the Python API and
not trhough `frame variable`. The reason is that
SBFrame.FindVariable() will return by default the synthetic variable
if it exists, while `frame variable` will not do this eagerly. The
code in `ValueObject::Dereference()` accounted for the latter but not
for the former. The fix is trivial. The test change includes
additional covergage for the already-working bahevior as it wasn't
covered by the testsuite before.

This commit also adds a short piece of documentatione explaining that
it is possible (even advisable) to provide this synthetic child
outstide of the range of the normal children.

Reviewers: jingham

Subscribers: lldb-commits

Tags: #lldb

Differential Revision: https://reviews.llvm.org/D73053
2020-01-21 13:35:55 -08:00
Jonas Devlieghere d053b7a297 [lldb/Docs] Add lldb-x86_64-fedora to the CI page 2020-01-20 11:38:40 -08:00
Jonas Devlieghere a93aa53476 [lldb/Docs] Fix formatting for the variable formatting page 2020-01-17 14:17:26 -08:00
Cyndy Ishida 24fca5cd71 [lldb] add to gdb to lldb doc
Summary: * enabling and disabling a breakpoint were missing.

Reviewers: JDevlieghere

Reviewed By: JDevlieghere

Subscribers: merge_guards_bot, jingham, dexonsmith, ributzka, lldb-commits

Tags: #lldb

Differential Revision: https://reviews.llvm.org/D72898
2020-01-16 19:56:45 -08:00
Jonas Devlieghere 9d30d76904 [lldb/Docs] Extend description section of the main page
The current description is a bit terse. I've copy/pasted the
introduction form the website.
2020-01-13 09:32:02 -08:00
Jonas Devlieghere 6498aff249 [lldb/Bindings] Move bindings into their own subdirectory
All the code required to generate the language bindings for Python and
Lua lives under scripts, even though the majority of this code aren't
scripts at all, and surrounded by scripts that are totally unrelated.

I've reorganized these files and moved everything related to the
language bindings into a new top-level directory named bindings. This
makes the corresponding files self contained and much more discoverable.

Differential revision: https://reviews.llvm.org/D72437
2020-01-09 08:44:34 -08:00
Jonas Devlieghere bbbbf8a106 [lldb/CMake] Use LLDB's autodetection logic for libxml2
Libxml2 is already an optional dependency. It should use the same
infrastructure as the other dependencies.

Differential revision: https://reviews.llvm.org/D72290
2020-01-08 09:03:40 -08:00
Jonas Devlieghere 317cbdad4d [lldb/Docs] Describe optional dependencies on build page.
List the different CMake flags controlling the optional dependencies as
per the discussion on the mailing list:

http://lists.llvm.org/pipermail/lldb-dev/2020-January/015867.html
2020-01-06 13:59:24 -08:00
Jonas Devlieghere 0239526ccc [lldb/Docs] Fix capitalization typo.
This has been bothering me for way too long.
2020-01-06 10:08:05 -08:00
Jonas Devlieghere 320b43c39f [lldb/Docs] Include the man page on the website 2020-01-03 13:59:19 -08:00
Jonas Devlieghere 6e6b6a5754 [lldb/Docs] Include how to generate the man page 2020-01-03 13:34:35 -08:00
Jonas Devlieghere 4e26cf2cfb [lldb/CMake] Rename LLDB_DISABLE_PYTHON to LLDB_ENABLE_PYTHON
This matches the naming scheme used by LLVM and all the other optional
dependencies in LLDB.

Differential revision: https://reviews.llvm.org/D71482
2019-12-13 13:41:11 -08:00
Med Ismail Bennani 7eaae939b9 [FormatEntity] Add mangled function name support
Summary:
Add `function.mangled-name` key for FormatEntity to show the mangled
function names in backtraces.

rdar://54088244

Signed-off-by: Med Ismail Bennani <medismail.bennani@gmail.com>

Subscribers: lldb-commits

Tags: #lldb

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

Signed-off-by: Med Ismail Bennani <medismail.bennani@gmail.com>
2019-12-12 10:22:57 -08:00
Jonas Devlieghere 62456e579e [lldb/CMake] Rename LLDB_DISABLE_LIBEDIT to LLDB_ENABLE_LIBEDIT
This matches the naming scheme used by LLVM.

Differential revision: https://reviews.llvm.org/D71380
2019-12-12 09:23:06 -08:00
Jonas Devlieghere a4304f96d6 [lldb/CMake] Rename LLDB_DISABLE_CURSES to LLDB_ENABLE_CURSES
This matches the naming scheme used by LLVM.

Differential revision: https://reviews.llvm.org/D71377
2019-12-12 09:13:31 -08:00
Adrian Prantl 0ca0fba94d Add resurrecting Type Validators to projects.rst 2019-12-11 13:30:05 -08:00
Jason Molenda e1a7d042c3 Add parray example for lldb, vrs. *ptr@count gdb cmd. 2019-12-04 15:44:15 -08:00
Jason Molenda e11df58580 Upstream debugserver arm64e support.
The changes are minor; primarily debugserver needs to go through
accessor functions/macros when changing pc/fp/sp/lr, and debugserver
needs to clear any existing pointer auth bits from values in two
cases.  debugserver can fetch the number of bits used for addressing
from a sysctl, and will include that in the qHostInfo reply.  Update
qHostInfo documentation to document it.
2019-12-04 15:20:56 -08:00
Jonas Devlieghere bb775bee21 [Docs] Generate the LLDB man page with Sphinx
This patch replaces the existing out-of-date man page for lldb and
replaces it with an RST file from which sphinx generates the actual
troff file. This is similar to how man pages are generated for the rest
of the LLVM utilities.

The man page is generated by building the `docs-lldb-man` target.

Differential revision: https://reviews.llvm.org/D70514
2019-11-21 10:04:11 -08:00
Jonas Devlieghere 0ebb7803e6 [Docs] Fix Sphinx warning (treated as error)
Fixes "undefined label" warning: if the link has no caption the label
must precede a section header.
2019-11-20 13:49:22 -08:00
Adrian Prantl 77f8a3324b Add a "Using LLDB" section to the welcome page of the website
This is an attempt to feature the user-facing resources more
prominently on the LLDB website by calling out the tutorial and the
GDB command map wight on the start page.

I also moved the "Why a new debugger" section to the "Goals"
subpage. Given that LLDB's first release is almost a decade in the
past now, the title is a bit of an anachronism.

Lastly, I moved the Architecture sub-page from "use" to "resources",
since end-users do not care about the source code layout.

Differential Revision: https://reviews.llvm.org/D70449
2019-11-19 10:55:50 -08:00
Jonas Devlieghere f19ea6ea5f [Docs] Add reproducer documentation
This adds a page about LLDB reproducers. It describes how to use the
reproducers on the command line and lists some of the known
issues/limitations.

Differential revision: https://reviews.llvm.org/D70409
2019-11-18 16:03:06 -08:00
Jonas Devlieghere 0aed648649 [Docs] Add Python caveats under the development section
This adds a page named Caveats with a section on some of the things to
be aware of related to Python. It's a question we've seen more than once
pop up and I think it's good to have it documentation on the website.
Even though some of it might be useful to users, I still put it under
"development" because it requires some understanding of how LLDB is
built.

Differential revision: https://reviews.llvm.org/D70252
2019-11-18 09:15:00 -08:00
Jonas Devlieghere 4229f70d22 [LLDB] Make a clear distinction between usage & development docs
This renames the "Goals & Status" section to "Project" and the
"Resources" section to "Development". To better match this layout I've
moved the releases page under "Project".
2019-11-14 09:04:28 -08:00
Diana Picus e03a06b348 Fix typos in docs. NFC 2019-11-14 12:11:57 +01:00
Pavel Labath bcae3b04e8 lldb/docs: update the lldb-x86_64-debian bot url
It is on the "stable" master now.
2019-11-06 16:02:23 +01:00
Jonas Devlieghere 5ae881f96f [Docs] Repurpose 'sources' page as 'contributing'.
The page describing how to get the sources was more about contributing
to LLDB than getting the actual source. This patch moves some things
around and repurposes this page as a contributing to LLDB landing page.
2019-10-28 15:03:05 -07:00
Jonas Devlieghere da2a4c234d [Docs] Update source code link to Github 2019-10-28 11:14:59 -07:00
Jonas Devlieghere 6336317e0a [Docs] Disable Python docs when LLDB_DISABLE_PYTHON is set
This leads to a configuration error because we're trying to get a
property that doesn't exist:

get_target_property() called with non-existent target "swig_wrapper"
2019-10-28 09:53:58 -07:00
Jonas Devlieghere d52b36e354 [CMake] Remove unused variable LLDB_TEST_CXX_COMPILER
CMake allows you to set a custom CXX compiler for the API test suite.
However, this variable is never used, because dotest uses the same
compiler to build C and CXX sources.

I'm not sure if this variable was added with the intention of supporting
a different compiler or if this is just a remnant of old functionality.
Given that this hasn't been working for a while, I assume it's safe to
remove.

Differential revision: https://reviews.llvm.org/D69401
2019-10-24 14:47:07 -07:00
Walter Erquinigo 48a50ee034 [android/process list] support showing process arguments
Summary:
The qfProcessInfo and qsProcessInfo packets currently don't set the processes' arguments, however the platform process list -v command tries to print it.
In this diff I'm adding the arguments as part of the packet, and now the command shows the arguments just like on mac.

On Mac:

507    1      wallace    1876110778 wallace    1876110778 x86_64-apple-macosx      /usr/libexec/secd
503    1      wallace    1876110778 wallace    1876110778 x86_64-apple-macosx      /usr/libexec/secinitd
501    1      wallace    1876110778 wallace    1876110778 x86_64-apple-macosx      /usr/libexec/languageassetd --firstLogin
497    1      wallace    1876110778 wallace    1876110778 x86_64-apple-macosx      /usr/libexec/trustd --agent
496    1      wallace    1876110778 wallace    1876110778 x86_64-apple-macosx      /usr/libexec/lsd
494    1      wallace    1876110778 wallace    1876110778 x86_64-apple-macosx      /System/Library/Frameworks/CoreTelephony.framework/Support/CommCenter -L
491    1      wallace    1876110778 wallace    1876110778 x86_64-apple-macosx      /usr/sbin/distnoted agent
489    1      wallace    1876110778 wallace    1876110778 x86_64-apple-macosx      /usr/libexec/UserEventAgent (Aqua)
484    1      wallace    1876110778 wallace    1876110778 x86_64-apple-macosx      /usr/sbin/cfprefsd agent
483    1      wallace    1876110778 wallace    1876110778 x86_64-apple-macosx      /System/Library/Frameworks/LocalAuthentication.framework/Support/coreauthd
On android:

1561   1016   root       0                     0          aarch64-unknown-linux-android  /system/bin/ip6tables-restore--noflush -w -v
1805   982    1000       1000                  1000                                      android:drmService
1811   982    10189      10189                 10189                                     com.qualcomm.embms:remote
1999   1      1000       1000                  1000       aarch64-unknown-linux-android  /system/bin/tlc_serverCCM
2332   982    10038      10038                 10038                                     com.android.systemui
2378   983    1053       1053                  1053                                      webview_zygote
2448   982    5013       5013                  5013                                      com.sec.location.nsflp2
2465   982    10027      10027                 10027                                     com.google.android.gms.persistent

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

llvm-svn: 375029
2019-10-16 18:47:05 +00:00
Jonas Devlieghere ff5640caea [Docs] Update testing documentaton
Update the test documentation after the directory reorganization.

llvm-svn: 374430
2019-10-10 19:35:20 +00:00
Jason Molenda 984d08c680 Expand on the qfProcessInfo documentation, add examples from
lldb-gdb-remote.txt and text explaining the no-criteria mode.

llvm-svn: 373789
2019-10-04 21:01:52 +00:00
Jonas Devlieghere d0727ec211 [Docs] Document lldb-instr
This adds some information on how to instrument the API classes.

llvm-svn: 373277
2019-10-01 00:12:47 +00:00
Raphael Isemann f685aa73aa [lldb][www] Update bot links
llvm-svn: 372971
2019-09-26 11:48:45 +00:00
Jonas Devlieghere 55038137eb [Docs] Document forwarding arguments with lit
Explain how to forward arguments to dotest.py from lit.

llvm-svn: 372894
2019-09-25 16:14:26 +00:00
Jonas Devlieghere 4cd71260c2 [Documentation] Expand on testing variants.
The testing documentation appears to be from an era when the only kind
of tests were the lldbsuite python tests. This patch adds a short
description of the unittests and LIT tests and how to run them.

Patch by: Lawrence D'Anna

Differential revision: https://reviews.llvm.org/D67943

llvm-svn: 372797
2019-09-25 00:58:39 +00:00
Stefan Granitz a206de8a0e [lldb][CMake] Infer `Clang_DIR` if not passed explicitly
Summary:
If we only get `LLVM_DIR` and find Clang in the same provided build-tree, automatically infer `Clang_DIR` like this:

```
LLVM_DIR = /path/to/build-llvm/lib/cmake/llvm
Clang_DIR = /paht/to/build-llvm/lib/cmake/clang
```

Reviewers: JDevlieghere, jingham, xiaobai, compnerd, labath

Reviewed By: JDevlieghere, labath

Subscribers: mgorny, lldb-commits, #lldb

Tags: #lldb

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

llvm-svn: 372210
2019-09-18 10:20:28 +00:00
Raphael Isemann bc35ae7389 [lldb] Remove xcode bot from website listing and fix link to sanitized
llvm-svn: 371172
2019-09-06 07:11:14 +00:00
Sylvestre Ledru c6e825efc7 use https for llvm.org in the doc
llvm-svn: 370303
2019-08-29 07:20:08 +00:00
Sylvestre Ledru 2831d1aedd fix the bugzilla url
llvm-svn: 370302
2019-08-29 07:19:14 +00:00
Sylvestre Ledru d07de02291 Provide a real link to the doc and remove old information
llvm-svn: 370301
2019-08-29 07:14:09 +00:00
Jonas Devlieghere b543c16869 [dotest] Remove -q (quiet) flag.
This patch removes the -q (quiet) flag and changing the default
behavior. Currently the flag serves two purposes that are somewhat
contradictory, as illustrated by the difference between the argument
name (quiet) and the configuration flag (parsable). On the one hand it
reduces output, but on the other hand it prints more output, like the
result of individual tests. My proposal is to guard the extra output
behind the verbose flag and always print the individual test results.

Differential revision: https://reviews.llvm.org/D66837

llvm-svn: 370226
2019-08-28 16:28:58 +00:00
Jonas Devlieghere d979a29935 [Doxygen] Document private class members.
Given that the C++ documentation is meant for LLDB developers it makes
sense to include private class members in the output.

llvm-svn: 369479
2019-08-21 00:10:19 +00:00
Jonas Devlieghere 8509b0a778 [CMake] Remove LLDB_TEST_USE_CUSTOM_C(XX)_COMPILER
Given that LLDB_TEST_USE_CUSTOM_C_COMPILER and LLDB_TEST_C_COMPILER are
both set at configuration time, I don't really see the point of having
both. This patch simplifies things and uses the custom C/C++ compiler
when the variable is set, and uses the default one when it's not set.
The variable can be unset by passing -ULLDB_TEST_C_COMPILER to CMake.

Differential revision: https://reviews.llvm.org/D66429

llvm-svn: 369435
2019-08-20 20:20:20 +00:00
Jonas Devlieghere 30703de3a7 [Docs] Fix (incorrect) code highlighting
llvm-svn: 368233
2019-08-07 23:12:40 +00:00
Stefan Granitz 7f34a3652e [lldb][CMake] Generating Xcode projects
Summary:
Print a warning if the wrong cache script is used when generating a Xcode project, because it's too easy to confuse with Apple-lldb-macOS.cmake

```
  When building with Xcode, we recommend using the corresponding cache
  script.  If this was a mistake, clean your build directory and re-run
  CMake with:

    -C /path/to/llvm-project/lldb/cmake/caches/Apple-lldb-Xcode.cmake

  See: https://lldb.llvm.org/resources/build.html#cmakegeneratedxcodeproject
```

Also set the generator inside the cache script.

Reviewers: JDevlieghere, jingham, clayborg

Reviewed By: JDevlieghere

Subscribers: mgorny, lldb-commits, #lldb

Tags: #lldb

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

llvm-svn: 368066
2019-08-06 17:21:34 +00:00
Stefan Granitz 3fe3529955 [lldb][docs] Update landing page for monorepo
Summary: Following up from D65330, here's an update for the landing page.

Reviewers: jryans, clayborg, amccarth, labath

Reviewed By: jryans, amccarth, labath

Subscribers: arphaman, lldb-commits, #lldb

Tags: #lldb

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

llvm-svn: 367539
2019-08-01 10:33:54 +00:00
Stefan Granitz a60966daa2 [lldb][docs] Add CMake version notes for -B flag
The original documentation update was reviewed with D65330

llvm-svn: 367407
2019-07-31 10:31:57 +00:00
Jonas Devlieghere d3ae0bc310 [dotest] Remove multiprocessing
Now that the Xcode project is removed, I want to focus on dotest as a
test framework, and remove its driver capabilities for which we already
rely on llvm's lit. Removing multiprocessing is the first step in that
direction.

Differential revision: https://reviews.llvm.org/D65311

llvm-svn: 367331
2019-07-30 16:42:47 +00:00
Stefan Granitz 39fba29861 [lldb][docs] Update documentation for monorepo and CMake caches
Summary: The lldb build system made good progress in the last months, but documentation was still lacking behind. Here's a patch to catch up.

Reviewers: JDevlieghere, jingham, labath, stella.stamenova, teemperor, jryans, kastiglione, xiaobai, compnerd, zturner

Reviewed By: labath, stella.stamenova, jryans

Subscribers: clayborg, amccarth, friss, lldb-commits, #lldb

Tags: #lldb

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

llvm-svn: 367302
2019-07-30 10:21:28 +00:00
Jonas Devlieghere 29af3b4e67 [Docs] Remove reproducers from the project page.
Jim pointed out that this was still open on the website.

llvm-svn: 367066
2019-07-25 22:22:43 +00:00
Jim Ingham 2b6afdf710 Mention adding predicates to settings in the projects page.
llvm-svn: 367059
2019-07-25 21:37:57 +00:00
Jim Ingham d16a034c7c Remove a project that was completed.
llvm-svn: 367057
2019-07-25 21:29:29 +00:00
Jonas Devlieghere 6fef5b20b0 [Docs] Remove stale documentation
This removes a stale piece of documentation about building LLDB with the
Xcode project.

llvm-svn: 366741
2019-07-22 21:26:50 +00:00
Jonas Devlieghere c2cd84bcfb [docs] Adjust variable formatting table
While the in-place hints on valid formats are up to date (e.g. when
choosing an invalid format expr -f nonExisting -- 42), the corresponding
online docs table is not. The formats "address", "hex float",
"instruction" and "void" are missing, and "decimal" refers to an
outdated abbreviation 'i' instead of 'd'.

Patch by: Lukas Böger

Differential revision: https://reviews.llvm.org/D63813

llvm-svn: 366364
2019-07-17 19:49:01 +00:00
Dave Lee 90148db02a [Docs] Replace SVN revisions with lldb versions
Summary: Replaces references to svn commits with the lldb version number those commits first appeared in. Themotivation is to show that these features are no longer that new and can generally be adopted.

Reviewers: JDevlieghere

Subscribers: lldb-commits

Tags: #lldb

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

llvm-svn: 365559
2019-07-09 21:21:45 +00:00
Jonas Devlieghere 667ca68bde [Docs] Remove stale builder
llvm-svn: 365086
2019-07-03 20:53:57 +00:00
Jonas Devlieghere d2f8b92820 [Docs] Update documentation build instructions.
Given that we use Ninja as the build system in the instructions below,
we might as well use it to build the documentation as well.

llvm-svn: 365083
2019-07-03 20:47:49 +00:00
Jonas Devlieghere a4210f7b10 Remove code-signing.txt now that it's part of the docs
The file's content is part of the website:
https://lldb.llvm.org/resources/build.html

llvm-svn: 365082
2019-07-03 20:47:46 +00:00
Jonas Devlieghere a767b05cf7 [Docs] Unify build instructions
The current build instructions are structured according the host
platform. Instead of having instructions on how to build with CMake
repeated for every platform, I unified them, using subsections if things
are different for between platforms. I also added the code signing
instructions, which were hidden in a text file in the repository.

llvm-svn: 365081
2019-07-03 20:45:06 +00:00
Raphael Isemann 48fe0fe884 [lldb] Mention automatic codesign setup script [NFC]
The script is the modern way of getting the certificate, so we should mention it in
the documentation.

Patch idea by Davidino Italiano!

llvm-svn: 364967
2019-07-02 21:07:25 +00:00
J. Ryan Stinnett d45eaf9405 [Docs] Modernize references to macOS
Summary:
This updates all places in documentation that refer to "Mac OS X", "OS X", etc.
to instead use the modern name "macOS" when no specific version number is
mentioned.

If a specific version is mentioned, this attempts to use the OS name at the time
of that version:

* Mac OS X for 10.0 - 10.7
* OS X for 10.8 - 10.11
* macOS for 10.12 - present

Reviewers: JDevlieghere

Subscribers: mgorny, christof, arphaman, cfe-commits, lldb-commits, libcxx-commits, llvm-commits

Tags: #clang, #lldb, #libc, #llvm

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

llvm-svn: 362113
2019-05-30 16:46:22 +00:00
Adrian Prantl 5d95b11b6b Update list of supported architectures.
llvm-svn: 361049
2019-05-17 17:05:23 +00:00
Jonas Devlieghere 777cad2c44 [Docs] Remove SVN checkout from LLDB build steps
This removes several older paragraphs in the LLDB build steps for Unix
systems which suggested checking out various components via SVN. Since
there's a separate page about getting the LLDB source which only
mentions Git, it seems appropriate to remove this older info from the
build docs.

Patch by: J. Ryan Stinnett

Differential revision: https://reviews.llvm.org/D62041

llvm-svn: 361046
2019-05-17 16:22:26 +00:00
Jonas Devlieghere 65cab8c639 [Docs] Fix headings in remote debugging
Add the proper headings instead of using just a bold font. Also add the
local ToC.

llvm-svn: 360971
2019-05-17 01:38:16 +00:00
Jonas Devlieghere 1e0ec81cf1 [Docs] Remove architectures from feature matrix
This is outdated, there's a bunch of architectures missing. If we want
them to be part of this table they should be a separate row anyway.

llvm-svn: 360967
2019-05-17 01:04:37 +00:00
Jonas Devlieghere b5d7ad1d9a [Docs] Unify sidebar padding
Unify the padding across list items and the list header.

llvm-svn: 360964
2019-05-17 00:45:05 +00:00
Adrian Prantl 2b9a3ea13f Slightly update the macOS part of status.rst to be less out-of-date.
llvm-svn: 360956
2019-05-16 23:39:08 +00:00
Adrian Prantl 8b92bb359e Update LLDB license on the LLDB home page to Apache+LLVM.
llvm-svn: 360822
2019-05-15 21:58:43 +00:00
Adrian Prantl 0d11505c73 Get back the navigation sidebar on the LLDB website.
This returns the look & feel of the Sphinx-generated LLDB website to
the original pre-Sphinx layout.

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

llvm-svn: 360819
2019-05-15 21:49:00 +00:00
Stefan Granitz a5588c4583 [CMake] Add error to clarify that lldb requires libcxx
Summary:
This adds a specific error message to clarify that lldb requires libcxx when
built together with clang on macOS. In addition, the lldb building docs are also
updated.

Fixes https://bugs.llvm.org/show_bug.cgi?id=41866

Reviewers: sgraenitz, JDevlieghere, EricWF

Reviewed By: sgraenitz

Subscribers: mgorny, lldb-commits

Tags: #lldb

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

llvm-svn: 360756
2019-05-15 08:59:02 +00:00
Jonas Devlieghere c31a45e62a [Docs] Document lldb-dotest
Document the lldb-dotest binary.

llvm-svn: 360748
2019-05-15 04:42:30 +00:00
Adrian Prantl 19ae9d010d Rename MacOS X -> macOS where applicable.
llvm-svn: 360691
2019-05-14 16:37:43 +00:00
Adrian Prantl 39084ce3ce LLDB website: Change the title back to "The LLDB Debugger"
This is what the old homepage also used.

llvm-svn: 360641
2019-05-14 02:31:56 +00:00
Jonas Devlieghere a2ad769226 [Docs] Differentiate between public and private API
On the homepage we should have a clear distinction between the public
and private C++ APIs.

llvm-svn: 360638
2019-05-14 00:36:05 +00:00
Jonas Devlieghere 42d65c572b [Docs] Fix code formattign in variable.rst
Fixes missing newline between :: and the actual code.

llvm-svn: 360632
2019-05-13 23:05:51 +00:00
Jonas Devlieghere 2f67cbb62c [Docs] Fix table formatting in Pytho reference
llvm-svn: 360398
2019-05-10 00:23:02 +00:00
Jonas Devlieghere 7b844849fe [Docs] Port python reference page
I somehow forgot to port over this page from the old website. Thank you
Jim for the heads up!

llvm-svn: 360386
2019-05-09 22:14:14 +00:00
Jonas Devlieghere 9f15718b3d [Docs] list command: lldb run <args>
The run command is only an abbreviation for the more verbose process
launch -- <args> but it works just as with GDB and therefore should be
mentioned in the GDB to LLDB command map.

For educational purposes I've not listed it as the first option on the
LLDB side so that new LLDB user can, if they want, also know what the
"native" way is for LLDB.

Here's the help documentation for the run command in lldb which gives
proof:

> (lldb) help run
>      Launch the executable in the debugger.
>
> Syntax: run [<run-args>]
>
> Command Options Usage:
>   run [<run-args>]
>
> 'run' is an abbreviation for 'process launch -c /bin/sh --'

Patch by: Konrad Kleine

Differential revision: https://reviews.llvm.org/D61483

llvm-svn: 360269
2019-05-08 16:31:47 +00:00
Jonas Devlieghere 46d318c2b5 [Docs] Fix incorrect heading and update titles.
This patch fixes two incorrect headings in source.rst which caused it to
show up on the homepage. I also updated the titles to have more sensible
links there.

llvm-svn: 360219
2019-05-08 01:51:26 +00:00
Jonas Devlieghere da9a274a60 [Docs] Re-order homepage: Download -> Build -> Test
I also reformatted some paragraphs to 80 cols.

llvm-svn: 360218
2019-05-08 01:38:12 +00:00
Jonas Devlieghere f496ee1f7e [Docs] Add timestamp
llvm-svn: 360209
2019-05-07 23:14:06 +00:00
Jonas Devlieghere 214de0f8ee [Docs] Add remote.html redirect
Add a redirect for the old remote.html page and sort the pages to make
dding redirects easier in the future.

llvm-svn: 360083
2019-05-06 21:28:01 +00:00
Alex Langford babcbaf971 [CMake] Fix subtle CMake bug
CMake specifies that the DEPENDS field of add_custom_target is for files
and output of add_custom_command. In order to add a target dependency,
add_dependencies should be used.

llvm-svn: 359490
2019-04-29 19:44:43 +00:00
Jonas Devlieghere 8c3513ffc4 [Docs] Generate the python reference without building all of LLDB
As discussed on the mailing list, we should be able to generate the
Python reference without building all of LLDB. To make that possible I
create a dummy python package, which is then parsed by epydoc. The
latter will complain that it couldn't import lldb, but that doesn't
matter as far as generation of the docs is concerned.

Differential revision: https://reviews.llvm.org/D61216

llvm-svn: 359465
2019-04-29 16:29:10 +00:00
Jonas Devlieghere 196123255e [Docs] Add more redirects
Found two more broken links.

llvm-svn: 359063
2019-04-24 01:58:17 +00:00
Jonas Devlieghere 6d0dc28a32 [Docs] Update the CI page
- Add the Sphinx bot
 - Add a little more info

llvm-svn: 359062
2019-04-24 01:48:43 +00:00
Jonas Devlieghere 6f7759672d [Docs] Move external links up
With a duplicate link removed and the API reference moved up, the page
didn't make much sense anymore.

llvm-svn: 359061
2019-04-24 01:48:40 +00:00
Jonas Devlieghere 36371d61ec [Docs] Fix link to C++ docs
... and add a redirect for the old URL.

llvm-svn: 359052
2019-04-24 00:10:23 +00:00
Jonas Devlieghere 3ba5f66177 [Docs] Add missing leading slash
llvm-svn: 359005
2019-04-23 16:00:43 +00:00
Jonas Devlieghere 056fde7527 [Docs] Add 301 redirects for old URLs
llvm-svn: 359004
2019-04-23 15:57:47 +00:00
Jonas Devlieghere d44a7be17b [Docs] Move API docs to the front page
This moves the links to the C++ and Python API docs up to the main page.
As of now the links are still broken [1], but at least this will prevent
the additional frustration of searching for the links only to find out
they're broken.

[1] http://lists.llvm.org/pipermail/lldb-dev/2019-April/014992.html

llvm-svn: 358928
2019-04-22 22:41:55 +00:00
Jonas Devlieghere f7f03622ec [Docs] Add more info about building the docs
Including the C++ and Python reference.

llvm-svn: 358777
2019-04-19 19:03:58 +00:00
Jonas Devlieghere 52cf94090f [Docs] Make Doxygen functional
This fixes the doxygen configuration to be functional again. I removed
the customer header and footer, as well as the no-longer-existent style
sheet. I also widened the scope of the documentation, from just the
public API to include the private interfaces as well.

llvm-svn: 358773
2019-04-19 18:02:35 +00:00
Jonas Devlieghere f2293a95de [Docs] Add LLDB bots
llvm-svn: 358693
2019-04-18 17:31:20 +00:00
Adrian Prantl 515d1306ff Don't abort() in lldb_assert and document why.
rdar://problem/49356014

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

llvm-svn: 357268
2019-03-29 16:12:27 +00:00
Adrian Prantl 0e4c482124 Pass ConstString by value (NFC)
My apologies for the large patch. With the exception of ConstString.h
itself it was entirely produced by sed.

ConstString has exactly one const char * data member, so passing a
ConstString by reference is not any more efficient than copying it by
value. In both cases a single pointer is passed. But passing it by
value makes it harder to accidentally return the address of a local
object.

(This fixes rdar://problem/48640859 for the Apple folks)

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

llvm-svn: 355553
2019-03-06 21:22:25 +00:00
Jim Ingham cbf575a5a0 Mention predicting exception catch at throw site
llvm-svn: 354914
2019-02-26 19:18:09 +00:00
Jonas Devlieghere edb874b231 Add LLDB website and documentation in reStructuredText for Sphinx
The current LLDB website is written in HTML which is hard to maintain.
We have quite a bit of HTML code checked in which can make it hard to
differentiate between documentation written by us and documentation
generated by a tool.

In line with the other LLVM projects, I propose generating the
documentation with Sphix. I think text/rst files provide a lower barrier
for new or casual contributors to fix or update.

This patch adds a copy of the LLDB website and documentation in
reStructuredText. It also adds a new ninja target `docs-lldb-html` when
-DLLVM_ENABLE_SPHINX:BOOL is enabled.

This is the first step in having the website and documentation being
generated from the repository, rather than having the output checked-in
under the www folder. During the hopefully short transition period,
please also update the reStructuredText files when modifying the
website.

Differential revision: https://reviews.llvm.org/D55376

llvm-svn: 352644
2019-01-30 18:51:40 +00:00
James Y Knight 5d71fc5d7b Adjust documentation for git migration.
This fixes most references to the paths:
 llvm.org/svn/
 llvm.org/git/
 llvm.org/viewvc/
 github.com/llvm-mirror/
 github.com/llvm-project/
 reviews.llvm.org/diffusion/

to instead point to https://github.com/llvm/llvm-project.

This is *not* a trivial substitution, because additionally, all the
checkout instructions had to be migrated to instruct users on how to
use the monorepo layout, setting LLVM_ENABLE_PROJECTS instead of
checking out various projects into various subdirectories.

I've attempted to not change any scripts here, only documentation. The
scripts will have to be addressed separately.

Additionally, I've deleted one document which appeared to be outdated
and unneeded:
  lldb/docs/building-with-debug-llvm.txt

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

llvm-svn: 352514
2019-01-29 16:37:27 +00:00
Jason Molenda c14a6ae4a7 Add a description of the similar packets defined in the
gdb-remote serial protocol documentation, call out the 
incompatability of lldb's vFile:open: packet as it stands
today.  Need to think about whether to change lldb's
enum values (breaking any existing lldb-server's out there)
or create a different packet and abandon vFile:open: at
least for a while.

llvm-svn: 349316
2018-12-16 18:44:54 +00:00
Jason Molenda 65b60ba8b2 Clarify a few minor details.
llvm-svn: 349313
2018-12-16 18:33:58 +00:00
Jason Molenda fbdb8b2e1c Update the vFile:open: description to note that the flags
in the packet are lldb enum values, not the open(2) oflags -- 
forgot about that wrinkle.  Also added a comment to File.h 
noting that the existing values cannot be modified or we'll
have a compatibilty break with any alternative platform
implementations, or older versions of lldb-server.

llvm-svn: 349282
2018-12-15 18:40:38 +00:00
Jason Molenda 4e67b0a61a Ah, forgot qModuleInfo. Need to look that one up
and finish filling this in.

llvm-svn: 349232
2018-12-15 02:51:01 +00:00
Jason Molenda f1127d5224 A brief outline of the packets that need to be implemented
to write an lldb platform server that doesn't link against
LLDB.framework to be able to fully run the lldb testsuite
on a remote system.  The platform packets weren't covered 
in the existing lldb-gdb-remote.txt doc, so I wanted to 
jot them down in one place.

llvm-svn: 349231
2018-12-15 02:36:39 +00:00
Nathan Lanza 3c617b2c23 Test commit
llvm-svn: 346067
2018-11-03 05:12:15 +00:00
Adrian Prantl d8f460e864 Enable AUTOBRIEF in doxygen configuration.
This brings the LLDB configuration closer to LLVM's and removes visual
clutter in the source code by removing the @brief commands from
comments.

This patch also reflows the paragraphs in all doxygen comments.

See also https://reviews.llvm.org/D46290.

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

llvm-svn: 331373
2018-05-02 16:55:16 +00:00
Pavel Labath 878e96f266 Fix error in QEnableErrorStrings gdb-remote docs
this probably happened because we changed the name of the packet
mid-review.

llvm-svn: 329295
2018-04-05 15:17:43 +00:00
Adrian Prantl 5ec76fe720 Compile the LLDB tests out-of-tree.
This patch is the result of a discussion on lldb-dev, see
http://lists.llvm.org/pipermail/lldb-dev/2018-January/013111.html for
background.

For each test (should be eventually: each test configuration) a
separate build directory is created and we execute

  make VPATH=$srcdir/path/to/test -C $builddir/path/to/test -f $srcdir/path/to/test/Makefile -I $srcdir/path/to/test

In order to make this work all LLDB tests need to be updated to find
the executable in the test build directory, since CWD still points at
the test's source directory, which is a requirement for unittest2.

Although we have done extensive testing, I'm expecting that this first
attempt will break a few bots. Please DO NOT HESITATE TO REVERT this
patch in order to get the bots green again. We will likely have to
iterate on this some more.

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

llvm-svn: 323803
2018-01-30 18:29:16 +00:00
Vedant Kumar 3c3345be1b [CMake] Make check-lldb work with LLDB_CODESIGN_IDENTITY=''
On Darwin, if a test machine isn't set up for code-signing (see
docs/code-signing.txt), running check-lldb should use the system
debugserver instead of the unsigned one built in-tree. This makes it
possible to run lldb's test suite without having code-signing set up,
which is really convenient.

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

llvm-svn: 322803
2018-01-18 01:16:30 +00:00
Ravitheja Addepally dab1d5f3cd Adding Support for Error Strings in Remote Packets
Summary:
This patch adds support for sending strings along with
error codes in the reply packets. The implementation is
based on the feedback recieved in the lldb-dev mailing
list. The patch also adds an extra packet for the client
to query if the server has the capability to provide
strings along with error replys.

Reviewers: labath, jingham, sas, lldb-commits, clayborg

Reviewed By: labath, clayborg

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

llvm-svn: 307768
2017-07-12 11:15:34 +00:00
Ravitheja Addepally e714c4f535 Implementation of remote packets for Trace data.
Summary:
The changes consist of new packets for trace manipulation and
trace collection. The new packets are also documented. The packets
are capable of providing custom trace specific parameters to start
tracing and also retrieve such configuration from the server.

Reviewers: clayborg, lldb-commits, tberghammer, labath, zturner

Reviewed By: clayborg, labath

Subscribers: krytarowski, lldb-commits

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

llvm-svn: 303972
2017-05-26 11:46:27 +00:00
Jason Molenda 1e7ecd3e64 Fix a race condition in FuncUnwinders where the mutex was being
acquired only after checking if the ivar shared pointer was already
filled in.  But when I assign an UnwindPlan object to the shared
pointer, I assign an empty object and then fill it in.  That leaves
a window where another thread could get the shared pointer to the
empty (but quickly being-filled-in) object and lead to a crash.

Also two changes from Greg for correctness on the TestMultipleDebuggers
test case.

<rdar://problem/30564102> 

llvm-svn: 296084
2017-02-24 03:35:46 +00:00
Jason Molenda 6546b9a209 Small tweaks to the markup in StructuredDataPlugins.
llvm-svn: 289520
2016-12-13 05:59:24 +00:00
Jason Molenda 30011bf4a8 Touch-up the markup of the DarwinLog.md documentation.
llvm-svn: 289518
2016-12-13 05:54:17 +00:00
Pavel Labath 2f1fbaebe2 gdb-remote: Add jModulesInfo packet
Summary:
This adds the jModulesInfo packet, which is the equivalent of qModulesInfo, but it enables us to
query multiple modules at once. This makes a significant speed improvement in case the
application has many (over a hundred) modules, and the communication link has a non-negligible
latency. This functionality is accessed by ProcessGdbRemote::PrefetchModuleSpecs(), which does
the caching. GetModuleSpecs() is modified to first consult the cache before asking the remote
stub. PrefetchModuleSpecs is currently only called from POSIX-DYLD dynamic loader plugin, after
it reads the list of modules from the inferior memory, but other uses are possible.

This decreases the attach time to an android application by about 40%.

Reviewers: clayborg

Subscribers: tberghammer, lldb-commits, danalbert

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

llvm-svn: 280919
2016-09-08 10:07:04 +00:00
Todd Fiala 759300192a Add StructuredData plugin type; showcase with new DarwinLog feature
Take 2, with missing cmake line fixed.  Build tested on
Ubuntu 14.04 with clang-3.6.

See docs/structured_data/StructuredDataPlugins.md for details.

differential review: https://reviews.llvm.org/D22976

reviewers: clayborg, jingham
llvm-svn: 279202
2016-08-19 04:21:48 +00:00
Todd Fiala a07e4a8352 Revert "Add StructuredData plugin type; showcase with new DarwinLog feature"
This reverts commit 1d885845d1451e7b232f53fba2e36be67aadabd8.

llvm-svn: 279200
2016-08-19 03:03:58 +00:00
Todd Fiala aef7de8492 Add StructuredData plugin type; showcase with new DarwinLog feature
See docs/structured_data/StructuredDataPlugins.md for details.

differential review: https://reviews.llvm.org/D22976

reviewers: clayborg, jingham
llvm-svn: 279198
2016-08-19 02:52:07 +00:00
Tamas Berghammer d7d69f8083 Support loading files even when incorrect file name specified by the linker
"Incorrect" file name seen on Android whene the main executable is
called "app_process32" (or 64) but the linker specifies the package
name (e.g. com.android.calculator2). Additionally it can be present
in case of some linker bugs.

This CL adds logic to try to fetch the correct file name from the proc
file system based on the base address sepcified by the linker in case
we are failed to load the module by name.

Differential revision: http://reviews.llvm.org/D22219

llvm-svn: 276411
2016-07-22 12:55:35 +00:00
Jason Molenda a2992311a2 Add support to debugserver for some new ways to interact with dyld
to find the solibs loaded in a process.  Support two new ways of
sending the jGetLoadedDynamicLibrariesInfos packet to debugserver
and add a new jGetSharedCacheInfo packet.  Update the documentation
for these packets as well.  The changes to lldb to use these will
be a separate commit.

<rdar://problem/25251243> 

llvm-svn: 274718
2016-07-07 01:09:23 +00:00
Jason Molenda 17b45390db Revert r273524, it may have been the cause of a linux testbot failure
for TestNamespaceLookup.py; didn't see anything obviously wrong so I'll
need to look at this more closely before re-committing.  (passed OK on
macOS ;)

llvm-svn: 273531
2016-06-23 04:24:16 +00:00
Jason Molenda cb6dae22e2 Do some minor renames of "Mac OS X" to "macOS".
There's uses of "macosx" that will be more tricky to
change, like in triples (e.g. "x86_64-apple-macosx10.11") - 
for now I'm just updating source comments and strings printed 
for humans.

llvm-svn: 273524
2016-06-23 01:18:16 +00:00
Francis Ricci 86f37ffa6f test commit
llvm-svn: 267443
2016-04-25 19:02:05 +00:00
Ed Maste f7fe3b99c7 Include -c, -core in the lldb(1) man page
llvm-svn: 255771
2015-12-16 15:37:21 +00:00
Ed Maste d4ff820fb8 Man page whitespace/formatting change to appease igor(1)
igor is a tool to detect common problems and style conformance issues in
man pages and other documents.  This is a non-content change to address
the items it reported, before making content changes.

See http://www.wonkity.com/~wblock/igor/igor.1.html for more information
about igor(1).

llvm-svn: 255769
2015-12-16 14:59:48 +00:00
Jason Molenda 7e9bd599a2 Add a new "thread-pcs" key-value pair to the T packet response from
debugserver.  thread-pcs has a comma separated list of base 16
addresses - the current pc value for every thread in the process.
It is a partner of the "threads:" key where a list of thread IDs
is given.  The pc values in thread-pcs correspond one-to-one with
the thread IDs in the threads list.

This is a part of performance work.  When lldb is instruction
stepping / fast stepping over a range of addresses for e.g. a "next"
command, and it steps in to another function, lldb will put a
breakpoint on the return address and continue the process.  Before
it calls continue, it calls Thread::SetupForResume on all the
threads, and SetupForResume needs to get the current pc value for
every thread to see if any are at a breakpoint site.

The result is that issuing a "c" continue requires that we send
"read pc register" packets for every thread.

We may do this sequence of step-into-function / continue-to-get-out
many times for a single user-visible "next" or "step" command, and
with highly multithreaded programs, we are sending many extra
packets to get all the thread values.

I looked at including this data in the "jstopinfo" JSON that
we already have in the T packet.  But there are three problems that
would make this increase the size of the T packet significantly.
First, numbers in JSON are base 10.  Second, a proper JSON would
have something like "thread_pcs": { "34224331112":383772734222, ...}
for thread-id 34224331112 and pc 383772734222 - so we're including
a whole extra copy of the thread id in addition to the pc.  Third,
the JSON text is hex-ascii'fied so the size of it is doubled.
In one example, 

threads:585db8,585dc7,585dc8,585dc9,585dca,585dce;thread-pcs:100001400,7fff8badc6de,7fff8badcff6,7fff8badc6de,7fff8badc6de,7fff8badc6de;

The "thread-pcs" adds 86 characters - 136 characters for both 
threads and thread-pcs.  Doing this in JSON would look like

threads={"5791160":4294972416,"5791175":140735536809694,"5791176":140735536812022,"5791177":140735536809694,"5791178":140735536809694,"5791182":140735536809694}

or 160 characters -- or 320 characters once it is hex-asciified.

Given that it's 86 characters vrs 320, I went with the old style
approach.  I've seen real world programs that have up to 60 threads
in them, so this could result in vastly larger packets if it
was all done in the JSON with hex-ascii expansion.

If we had an all-JSON T packet, where we didn't need to hex-ascii
encode anything, that would have been the better approach.  But
we'd already have a list of threads in JSON at that point so
the additional text wouldn't be too bad.

I'm working on finishing the patches to lldb to use this data;
will commit those once I've had a chance to test them more.  But
I wanted to commit the debugserver bits which are more
straightforward.


<rdar://problem/21963031> 

llvm-svn: 255711
2015-12-15 23:47:44 +00:00
Tamas Berghammer ccd6cffba3 Modify "platform connect" to connect to processes as well
The standard remote debugging workflow with gdb is to start the
application on the remote host under gdbserver (e.g.: gdbserver :5039
a.out) and then connect to it with gdb.

The same workflow is supported by debugserver/lldb-gdbserver with a very
similar syntax but to access all features of lldb we need to be
connected also to an lldb-platform instance running on the target.

Before this change this had to be done manually with starting a separate
lldb-platform on the target machine and then connecting to it with lldb
before connecting to the process.

This change modifies the behavior of "platform connect" with
automatically connecting to the process instance if it was started by
the remote platform. With this command replacing gdbserver in a gdb
based worflow is usually as simple as replacing the command to execute
gdbserver with executing lldb-platform.

Differential revision: http://reviews.llvm.org/D14952

llvm-svn: 255016
2015-12-08 14:08:19 +00:00
Jason Molenda 6acc86c3f5 Have debugserver send the OS version string plus
major, minor, and patchlevel in the qHostInfo reply.  
Document that qHostInfo may report major/minor/patch
separately / in addition to the version: combination.

<rdar://problem/22125465> 

llvm-svn: 244716
2015-08-12 03:27:33 +00:00
Ed Maste 8b559ecf52 Improve man page markup
Patch by Baptiste Daroussin

Differential Revision: http://reviews.llvm.org/D11561

llvm-svn: 243749
2015-07-31 14:26:15 +00:00
Pavel Labath 4a4bb12e0d Add jThreadsInfo support to lldb-server
Summary:
This commit adds initial support for the jThreadsInfo packet to lldb-server. The current
implementation does not expedite inferior memory.  I have also added a description of the new
packet to our protocol documentation (mostly taken from Greg's earlier commit message).

Reviewers: clayborg, ovyalov, tberghammer

Subscribers: lldb-commits

Differential Revision: http://reviews.llvm.org/D11187

llvm-svn: 242402
2015-07-16 14:14:35 +00:00
Jason Molenda 20ee21bde6 Add a another packet to the gdb-remote protocol,
jGetLoadedDynamicLibrariesInfos.  This packet is similar to
qXfer:libraries:read except that lldb supplies the number of solibs
that should be reported about, and the start address for the list
of them.  At the initial process launch we'll read the full list
of solibs linked by the process -- at this point we could be using
qXfer:libraries:read -- but on subsequence solib-loaded notifications,
we'll be fetching a smaller number of solibs, often only one or two.

A typical Mac/iOS GUI app may have a couple hundred different 
solibs loaded  - doing all of the loads via memory reads takes 
a couple of megabytes of traffic between lldb and debugserver.
Having debugserver summarize the load addresses of all the solibs
and sending it in JSON requires a couple of hundred kilobytes
of traffic.  It's a significant performance improvement when 
communicating over a slower channel.

This patch leaves all of the logic for loading the libraries
in DynamicLoaderMacOSXDYLD -- it only call over ot ProcesGDBRemote
to get the JSON result.

If the jGetLoadedDynamicLibrariesInfos packet is not implemented,
the normal technique of using memory read packets to get all of
the details from the target will be used.

<rdar://problem/21007465>

llvm-svn: 241964
2015-07-10 23:15:22 +00:00
Jason Molenda 91ffe0a570 Add a new wart, I mean feature, on to gdb-remote protocol: compression.
For some communication channels, sending large packets can be very 
slow.  In those cases, it may be faster to compress the contents of
the packet on the target device and decompress it on the debug host
system.  For instance, communicating with a device using something
like Bluetooth may be an environment where this tradeoff is a good one.

This patch adds a new field to the response to the "qSupported" packet
(which returns a "qXfer:features:" response) -- SupportedCompressions
and DefaultCompressionMinSize.  These tell you what the remote
stub can support.

lldb, if it wants to enable compression and can handle one of those 
algorithms, it can send a QEnableCompression packet specifying the
algorithm and optionally the minimum packet size to use compression
on.  lldb may have better knowledge about the best tradeoff for
a given communication channel.

I added support to debugserver an lldb to use the zlib APIs
(if -DHAVE_LIBZ=1 is in CFLAGS and -lz is in LDFLAGS) and the
libcompression APIs on Mac OS X 10.11 and later 
(if -DHAVE_LIBCOMPRESSION=1).  libz "zlib-deflate" compression.
libcompression can support deflate, lz4, lzma, and a proprietary
lzfse algorithm.  libcompression has been hand-tuned for Apple
hardware so it should be preferred if available.

debugserver currently only adds the SupportedCompressions when
it is being run on an Apple watch (TARGET_OS_WATCH).  Comment
that #if out from RNBRemote.cpp if you want to enable it to
see how it works.  I haven't tested this on a native system
configuration but surely it will be slower to compress & decompress
the packets in a same-system debug session.

I haven't had a chance to add support for this to 
GDBRemoteCommunciationServer.cpp yet.

<rdar://problem/21090180> 

llvm-svn: 240066
2015-06-18 21:46:06 +00:00
Tamas Berghammer 783bfc8caa Fetch object file load address if it isn't specified by the linker
Differential revision: http://reviews.llvm.org/D10490

llvm-svn: 240052
2015-06-18 20:43:56 +00:00
Bruce Mitchener 58ef391f3e Fix a variety of typos.
No functional change.

llvm-svn: 239995
2015-06-18 05:27:05 +00:00