Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -62,13 +62,13 @@ Arch Linux:

.. code-block:: console

$ sudo pacman -S --needed autoconf automake gawk gcc libelf libtool make pkgconf python python-setuptools
$ sudo pacman -S --needed gcc libelf make pkgconf python python-pip python-setuptools

Debian/Ubuntu:

.. code-block:: console

$ sudo apt-get install autoconf automake gawk gcc libelf-dev libdw-dev libtool make pkgconf python3 python3-dev python3-setuptools
$ sudo apt-get install gcc liblzma-dev libelf-dev libdw-dev make pkgconf python3 python3-dev python3-pip python3-setuptools zlib1g-dev

Note that Debian Stretch, Ubuntu Trusty, and Ubuntu Xenial (and older) ship
Python versions which are too old. Python 3.6 or newer must be installed
Expand All @@ -78,7 +78,7 @@ Fedora:

.. code-block:: console

$ sudo dnf install autoconf automake elfutils-devel gawk gcc libtool make pkgconf python3 python3-devel python3-setuptools
$ sudo dnf install elfutils-devel gcc make pkgconf python3 python3-devel python3-pip python3-setuptools

Optionally, install:

Expand Down
8 changes: 8 additions & 0 deletions docs/advanced_usage.rst
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,14 @@ Some of drgn's behavior can be modified through environment variables:
:exc:`drgn.MissingDebugInfoError`. Any additional errors are truncated. The
default is 5; -1 is unlimited.

``DRGN_PREFER_ORC_UNWINDER```
Whether to prefer using `ORC
<https://www.kernel.org/doc/html/latest/x86/orc-unwinder.html>`_ over DWARF
for stack unwinding (0 or 1). The default is 0. Note that drgn will always
fall back to ORC for functions lacking DWARF call frame information and
vice versa. This environment variable is mainly intended for testing and
may be ignored in the future.

``DRGN_USE_LIBKDUMPFILE_FOR_ELF``
Whether drgn should use libkdumpfile for ELF vmcores (0 or 1). The default
is 0. This functionality will be removed in the future.
Expand Down
13 changes: 10 additions & 3 deletions docs/installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,21 @@ The build requires:
- `GNU Make <https://www.gnu.org/software/make/>`_
- `pkgconf <http://pkgconf.org/>`_
- `setuptools <https://pypi.org/project/setuptools/>`_

.. include:: ../README.rst
:start-after: start-install-dependencies
:end-before: end-install-dependencies

Building from the Git repository (rather than a release tarball) additionally
requires:

- `autoconf <https://www.gnu.org/software/autoconf/>`_
- `automake <https://www.gnu.org/software/automake/>`_
- `libtool <https://www.gnu.org/software/libtool/>`_
- `GNU Awk <https://www.gnu.org/software/gawk/>`_ 4.0 or newer

.. include:: ../README.rst
:start-after: start-install-dependencies
:end-before: end-install-dependencies
Simply add ``autoconf automake gawk libtool`` to the appropriate installation
command above.

Installation
------------
Expand Down
28 changes: 20 additions & 8 deletions libdrgn/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -16,18 +16,21 @@ include_HEADERS = drgn.h
ARCH_DEFS = arch_ppc64.defs \
arch_x86_64.defs

BUILT_SOURCES = drgn.h $(ARCH_DEFS:.defs=.inc)
ARCH_INCS = $(ARCH_DEFS:.defs=.inc)

BUILT_SOURCES = drgn.h $(ARCH_INCS)

noinst_LTLIBRARIES = libdrgnimpl.la

libdrgnimpl_la_SOURCES = $(ARCH_DEFS:.defs=.c) \
$(ARCH_INCS) \
arch_register_layout.h \
binary_buffer.c \
binary_buffer.h \
binary_search_tree.h \
bitops.h \
cfi.h \
cfi.c \
cfi.h \
cityhash.h \
debug_info.c \
debug_info.h \
Expand All @@ -37,6 +40,7 @@ libdrgnimpl_la_SOURCES = $(ARCH_DEFS:.defs=.c) \
error.h \
hash_table.c \
hash_table.h \
helpers.h \
language.c \
language.h \
language_c.c \
Expand All @@ -54,6 +58,7 @@ libdrgnimpl_la_SOURCES = $(ARCH_DEFS:.defs=.c) \
object.h \
object_index.c \
object_index.h \
orc.h \
path.c \
path.h \
platform.c \
Expand Down Expand Up @@ -110,9 +115,9 @@ BUILT_SOURCES += python/docstrings.h
noinst_LTLIBRARIES += _drgn.la
endif

CLEANFILES = python/constants.c python/docstrings.c python/docstrings.h

_drgn_la_SOURCES = python/docstrings.h \
_drgn_la_SOURCES = python/constants.c \
python/docstrings.c \
python/docstrings.h \
python/drgnpy.h \
python/error.c \
python/helpers.c \
Expand All @@ -127,8 +132,6 @@ _drgn_la_SOURCES = python/docstrings.h \
python/type.c \
python/util.c

nodist__drgn_la_SOURCES = python/constants.c python/docstrings.c

_drgn_la_CFLAGS = -fvisibility=hidden
_drgn_la_CPPFLAGS = $(AM_CPPFLAGS) $(PYTHON_CPPFLAGS) -iquote $(srcdir)/python \
-iquote python
Expand All @@ -152,9 +155,18 @@ python/docstrings.c: ../_drgn.pyi $(drgndoc_docstrings_deps)
python/docstrings.h: ../_drgn.pyi $(drgndoc_docstrings_deps)
$(AM_V_GEN)$(drgndoc_docstrings) -H -m _drgn:drgn $< > $@

EXTRA_DIST = $(ARCH_DEFS) build-aux/gen_arch.awk build-aux/gen_constants.py
EXTRA_DIST = $(ARCH_DEFS) \
build-aux/gen_arch.awk \
build-aux/gen_constants.py \
drgn.h.in

EXTRA_PROGRAMS = examples/load_debug_info

examples_load_debug_info_SOURCES = examples/load_debug_info.c
examples_load_debug_info_LDADD = libdrgnimpl.la

CLEANFILES = $(ARCH_INCS) \
drgn.h \
python/constants.c \
python/docstrings.c \
python/docstrings.h
Loading