Commit Graph

41 Commits

Author SHA1 Message Date
Omar Sandoval
f884aa9250 README: make badges inline on GitHub again
Work around github/markup#1801.

Signed-off-by: Omar Sandoval <osandov@osandov.com>
2024-06-05 13:51:08 -07:00
Omar Sandoval
2087f6bb40 Add scaffolding for libdrgn C unit tests
So far we've been getting away with only unit testing through Python.
However, there's plenty of (existing and upcoming) internal code that
would be nice to unit test directly in C. For a framework, I opted for
check (https://libcheck.github.io/check/) because it is minimal, mature,
and available on all major distros. Add the autotools scaffolding,
including a copy of the checkmk script from check 0.15.2 since RHEL and
CentOS don't package it. We check the dependencies at configure time but
only fail if they're not available at `make check` time. Also wire up
`setup.py test` to run `make check`.

Signed-off-by: Omar Sandoval <osandov@osandov.com>
2024-04-26 14:53:53 -07:00
Omar Sandoval
68d8eb1b69 Add "Getting Help" section to README and docs main page
And mention the new Matrix room.

Signed-off-by: Omar Sandoval <osandov@osandov.com>
2024-03-27 16:25:00 -07:00
Omar Sandoval
d3edc0a337 docs: update examples to use default program
Using the default program is nicer to read and type, so prefer it for
documentation.

Signed-off-by: Omar Sandoval <osandov@osandov.com>
2023-11-30 14:44:51 -08:00
Omar Sandoval
87b7292aa5 Relicense drgn from GPLv3+ to LGPLv2.1+
drgn is currently licensed as GPLv3+. Part of the long term vision for
drgn is that other projects can use it as a library providing
programmatic interfaces for debugger functionality. A more permissive
license is better suited to this goal. We decided on LGPLv2.1+ as a good
balance between software freedom and permissiveness.

All contributors not employed by Meta were contacted via email and
consented to the license change. The only exception was the author of
commit c4fbf7e589 ("libdrgn: fix for compilation error"), who did not
respond. That commit reverted a single line of code to one originally
written by me in commit 640b1c011d ("libdrgn: embed DWARF index in
DWARF info cache").

Signed-off-by: Omar Sandoval <osandov@osandov.com>
2022-11-01 17:05:16 -07:00
Michel Alexandre Salim
120f766dc9 Update installation instructions
- add repology link
- add Debian and Ubuntu instructions

Signed-off-by: Michel Alexandre Salim <michel@michel-slm.name>
2022-10-28 16:09:57 -07:00
Omar Sandoval
3865e8bdc8 docs: fix "Duplicate explicit target name" Sphinx warning
Apparently Sphinx doesn't like it when you use the same link text for
two different links. Fix it by adding an extra underscore, which makes
it an anonymous reference.

Fixes: 9c69d2dd4b ("README: update libkdumpfile installation instructions")
Signed-off-by: Omar Sandoval <osandov@osandov.com>
2022-08-25 13:26:36 -07:00
Omar Sandoval
9c69d2dd4b README: update libkdumpfile installation instructions
It is also packaged in the AUR, so make the instructions more accurate
for each distro.

Signed-off-by: Omar Sandoval <osandov@osandov.com>
2022-08-19 01:26:50 -07:00
Omar Sandoval
ca373fe38a docs: use "programmable debugger" description consistently
Replace the old "Scriptable debugger library" and
"Debugger-as-a-library" taglines with the one we're using on GitHub,
"Programmable debugger". Make up for it by emphasizing that drgn can
also be used as a library a tiny bit more in the README.

Signed-off-by: Omar Sandoval <osandov@osandov.com>
2022-08-19 01:21:32 -07:00
Omar Sandoval
eda56c153b README: add openSUSE installation instructions
drgn is now packaged for openSUSE. Add instructions for installing with
zypper or from source. Also reindent the Arch Linux instructions
correctly.

Signed-off-by: Omar Sandoval <osandov@osandov.com>
2022-08-16 23:29:35 -07:00
Omar Sandoval
af6f5a887d libdrgn: replace gen_arch.awk with gen_arch_inc_strswitch.py
Now that we have gen_strswitch.py, there's no reason to keep this AWK
script around. Replace it with a Python script that outputs a strswitch
file. This also gets rid of our gawk dependency.

Signed-off-by: Omar Sandoval <osandov@osandov.com>
2022-03-02 16:10:43 -08:00
Omar Sandoval
36f7e8b59b README: add libtool to build dependencies for Debian and Arch
Fixes: 1b7badad0a ("docs: expand and reorganize installation instructions")
Signed-off-by: Omar Sandoval <osandov@osandov.com>
2021-12-02 02:01:46 -08:00
Omar Sandoval
d18be05b7a README: mention Meta
Signed-off-by: Omar Sandoval <osandov@osandov.com>
2021-11-21 16:01:39 -08:00
Omar Sandoval
c0d8709b45 Update copyright headers to Meta
Signed-off-by: Omar Sandoval <osandov@osandov.com>
2021-11-21 15:59:44 -08:00
Omar Sandoval
1b7badad0a docs: expand and reorganize installation instructions
* Mention installing drgn using a package manager on Fedora/EPEL.
  Closes #103.
* Mention that pip installs a binary wheel by default.
* Include instructions for installing from source in README.

Signed-off-by: Omar Sandoval <osandov@osandov.com>
2021-11-03 16:18:22 -07:00
Omar Sandoval
bc2d5333c0 README: update link to crash
Signed-off-by: Omar Sandoval <osandov@osandov.com>
2021-11-03 11:48:34 -07:00
Omar Sandoval
8358c31d26 docs: document how to get debugging symbols
I couldn't find any good summaries of how to get debugging symbols on
various distros, so I guess we'll have to maintain our own.

Signed-off-by: Omar Sandoval <osandov@osandov.com>
2021-11-02 17:48:36 -07:00
Omar Sandoval
7382856a41 docs: improve quick start documentation
Add an example of stack traces and parameters/local variables and use
some more interesting helpers.

Signed-off-by: Omar Sandoval <osandov@osandov.com>
2021-08-02 16:20:30 -07:00
Omar Sandoval
8f7e524b6b docs: update links to main branch
The master branch was renamed to main. GitHub redirects links to the old
branch, but we might as well update them explicitly.

Signed-off-by: Omar Sandoval <osandov@osandov.com>
2021-05-04 17:25:33 -07:00
Omar Sandoval
f285764f8a Include full libdrgn distribution in drgn sdist
Building drgn from an sdist currently requires autotools and gawk
because libdrgn in the sdist is more or less a git checkout. It's more
user-friendly to include the autotools output and generated code. Do
this by extending the sdist command to include a full libdrgn
distribution with `make distdir`.

Signed-off-by: Omar Sandoval <osandov@osandov.com>
2021-03-30 23:19:38 -07:00
Omar Sandoval
587ecd4df8 README: add pip to installation dependencies
The README instructs the user to install with pip, but doesn't actually
mention that pip needs to be installed.

Signed-off-by: Omar Sandoval <osandov@osandov.com>
2021-03-30 22:51:46 -07:00
Omar Sandoval
ce7a5e62f8 README: fix installation dependencies for old Debian and Ubuntu
The libelf-dev and libdw-dev packages on Debian Stretch, Ubuntu Xenial,
and older are missing dependencies on liblzma-dev and zlib1g-dev, which
causes pkg-config to fail when running configure. Add them explicitly
for old versions.

Signed-off-by: Omar Sandoval <osandov@osandov.com>
2021-03-30 22:42:11 -07:00
Omar Sandoval
e5bc41f16c libdrgn: add latest elf.h and dwarf.h to support elfutils 0.165
The oldest LTS version of Ubuntu, 16.04, has elfutils 0.165. This
version is missing some ELF and DWARF definitions used by drgn. Add
copies of elf.h from glibc 2.33 and dwarf.h and elfutils/known-dwarf.h
from elfutils 0.183 to get the latest definitions and drop the minimum
required version of elfutils further to 0.165.

Signed-off-by: Omar Sandoval <osandov@osandov.com>
2021-03-21 23:18:39 -07:00
Serapheim Dimitropoulos
a68abd5de4 libdrgn: stretch minimum supported version of libelf to 0.170
Currently libdrgn requires libelf to be of version 0.175 or
later. This patch allows the library to be compiled with libelf
0.170 (the newest version supported by Ubuntu 18.04 LTS).

Signed-off-by: Serapheim Dimitropoulos <serapheim@delphix.com>
2021-03-21 14:28:29 -07:00
Omar Sandoval
4c5c5f3842 Remove bundled version of elfutils
We currently bundle a version of elfutils with patches to export
additional stack tracing functionality. This has a few drawbacks:

- Most of drgn's build time is actually building elfutils.
- Distributions don't like packages that bundle verions of other
  packages.
- elfutils, and thus drgn, can't be built with clang.

Now that we've replaced the elfutils DWARF unwinder with our own, we
don't need the patches, so we can drop the bundled elfutils and fix
these issues.

Signed-off-by: Omar Sandoval <osandov@osandov.com>
2021-03-16 00:52:09 -07:00
Omar Sandoval
1631c11f37 Migrate to GitHub Actions
Travis CI is no longer offering free open source CI, so migrate to
GitHub Actions. The only downside is that GitHub Actions doesn't support
nested virtualization, but we can work around that by falling back to
slow emulation.

Signed-off-by: Omar Sandoval <osandov@osandov.com>
2021-01-01 02:59:50 -08:00
Omar Sandoval
c4b0d313ac README: update Travis CI badge to travis-ci.com
Signed-off-by: Omar Sandoval <osandov@osandov.com>
2020-12-04 14:38:15 -08:00
Omar Sandoval
9f3fadd3de README: use code-block instead of highlight
PyPI's RST parser apparently doesn't know the highlight directive, which
snuck into the README in commit 4de147e478 ("Add CONTRIBUTING.rst").
Use code-block instead.

Signed-off-by: Omar Sandoval <osandov@osandov.com>
2020-07-27 23:28:23 -07:00
Omar Sandoval
4de147e478 Add CONTRIBUTING.rst
This documents best practices for contributing to drgn. We now require a
DCO sign-off.

Also clean up some related areas in the documentation.

Signed-off-by: Omar Sandoval <osandov@osandov.com>
2020-07-07 17:44:02 -07:00
Omar Sandoval
8b264f8823 Update copyright headers to Facebook and add missing headers
drgn was originally my side project, but for awhile now it's also been
my work project. Update the copyright headers to reflect this, and add a
copyright header to various files that were missing it.
2020-05-15 15:13:02 -07:00
Omar Sandoval
3b0988bd81 docs: mention tools directory
This will need to be fleshed out in the future, but at least mention it
to start.
2020-04-17 16:15:35 -07:00
Omar Sandoval
2addae5e13 Update README to note that C++ support is in progress 2020-04-03 16:58:30 -07:00
Omar Sandoval
f4822be904 Document PyPI package and installation with pip 2020-01-23 15:15:33 -08:00
Omar Sandoval
660276a0b8 Format Python code with Black
I'm not a fan of 100% of the Black coding style, but I've spent too much
time manually formatting Python code, so let's just pull the trigger.
2020-01-14 11:51:58 -08:00
Omar Sandoval
71312a4039 Tweak README introduction 2020-01-10 16:40:49 -08:00
Omar Sandoval
6a13d74c0c libdrgn: build with bundled elfutils
Now that we have the bundled version of elfutils, build it from libdrgn
and link to it. We can also get rid of the elfutils version checks from
the libdrgn code.
2019-09-19 11:07:12 -07:00
Serapheim Dimitropoulos
93d7ea9f01 Add support for kdump-compressed core dumps with libkdumpfile 2019-08-02 00:20:16 -07:00
Omar Sandoval
9a6ec851ac Clarify that --kernel is the default in a couple more places
Update the README to reflect that --kernel is the default, and clarify
it a bit in argparse.
2019-06-28 14:05:07 -07:00
Omar Sandoval
0cc16bcdbb Add pronunciation to README 2019-04-17 01:18:44 -07:00
Omar Sandoval
fc3db80957 Configure Travis CI 2019-04-11 14:17:44 -07:00
Omar Sandoval
393a1f3149 Document with Sphinx
drgn has pretty thorough in-program documentation, but it doesn't have a
nice overview or introduction to the basic concepts. This commit adds
that using Sphinx. In order to avoid documenting everything in two
places, the libdrgn bindings have their docstrings generated from the
API documentation. The alternative would be to use Sphinx's autodoc
extension, but that's not as flexible and would also require building
the extension to build the docs. The documentation for the helpers is
generated using autodoc and a small custom extension.
2019-04-11 12:48:15 -07:00