diff options
author | Alexander Kanavin <alex.kanavin@gmail.com> | 2021-04-26 12:42:10 +0200 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2021-05-03 13:37:48 +0100 |
commit | e1ebdcff7cfd27402d873a967edf84d328a52223 (patch) | |
tree | b4cb7420f8cedbbbb201d1813c05f3cbb868e4cc /documentation/dev-manual | |
parent | f353ba0ec23a26dc9058e272dc769382ebd5c32f (diff) | |
download | poky-e1ebdcff7cfd27402d873a967edf84d328a52223.tar.gz |
dev-manual/common-tasks.rst: correct the documentation for debuginfod
Particularly,
- correctly describe the use of DEBUGINFOD_URLS; drop it from bitbake variables
- all necessary component tweaks are enabled by default via DISTRO_FEATURES
- provide on-target examples of what to look for when things work properly
(From yocto-docs rev: 6d5d568d427b22675b999f94ead829ab1bef0b21)
Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
Reviewed-by: Quentin Schulz <foss@0leil.net>
Reviewed-by: Michael Opdenacker <michael.opdenacker@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'documentation/dev-manual')
-rw-r--r-- | documentation/dev-manual/common-tasks.rst | 40 |
1 files changed, 24 insertions, 16 deletions
diff --git a/documentation/dev-manual/common-tasks.rst b/documentation/dev-manual/common-tasks.rst index dcd3a11c3e..37c7a19bfa 100644 --- a/documentation/dev-manual/common-tasks.rst +++ b/documentation/dev-manual/common-tasks.rst | |||
@@ -9705,39 +9705,47 @@ methods you can use: running a debuginfod server and using gdbserver. | |||
9705 | Using the debuginfod server method | 9705 | Using the debuginfod server method |
9706 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | 9706 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
9707 | 9707 | ||
9708 | "debuginfod" from "elfutils" is a way to distribute "debuginfo" files. | 9708 | ``debuginfod`` from ``elfutils`` is a way to distribute ``debuginfo`` files. |
9709 | Running a "debuginfod" server makes debug symbols readily available, | 9709 | Running a ``debuginfod`` server makes debug symbols readily available, |
9710 | which means you don't need to download debugging information | 9710 | which means you don't need to download debugging information |
9711 | and the binaries of the process being debugged. You can just fetch | 9711 | and the binaries of the process being debugged. You can just fetch |
9712 | debug symbols from the server. | 9712 | debug symbols from the server. |
9713 | 9713 | ||
9714 | To run a debuginfod server, you need to do the following: | 9714 | To run a ``debuginfod`` server, you need to do the following: |
9715 | 9715 | ||
9716 | - Ensure that this variable is set in your ``local.conf`` file:: | 9716 | - Ensure that ``debuginfod`` is present in :term:`DISTRO_FEATURES` |
9717 | (it already is in ``OpenEmbedded-core`` defaults and ``poky`` reference distribution). | ||
9718 | If not, set in your distro config file or in ``local.conf``:: | ||
9717 | 9719 | ||
9718 | PACKAGECONFIG_pn-elfutils-native = "debuginfod libdebuginfod" | 9720 | DISTRO_FEATURES_append = " debuginfod" |
9719 | 9721 | ||
9720 | This :term:`PACKAGECONFIG` option enables debuginfod and libdebuginfod for | 9722 | This distro feature enables the server and client library in ``elfutils``, |
9721 | "elfutils-native". | 9723 | and enables ``debuginfod`` support in clients (at the moment, ``gdb`` and ``binutils``). |
9722 | 9724 | ||
9723 | - Run the following commands to set up the "debuginfod" server:: | 9725 | - Run the following commands to launch the ``debuginfod`` server on the host:: |
9724 | 9726 | ||
9725 | $ oe-debuginfod | 9727 | $ oe-debuginfod |
9726 | 9728 | ||
9729 | - To use ``debuginfod`` on the target, you need to know the ip:port where | ||
9730 | ``debuginfod`` is listening on the host (port defaults to 8002), and export | ||
9731 | that into the shell environment, for example in ``qemu``:: | ||
9727 | 9732 | ||
9728 | To use debuginfod on the target, you need the following: | 9733 | root@qemux86-64:~# export DEBUGINFOD_URLS="http://192.168.7.1:8002/" |
9729 | 9734 | ||
9730 | - Ensure that this variable is set in your ``local.conf`` file:: | 9735 | - Then debug info fetching should simply work when running the target ``gdb``, |
9736 | ``readelf`` or ``objdump``, for example:: | ||
9731 | 9737 | ||
9732 | DEBUGINFOD_URLS = "http://localhost:8002/" | 9738 | root@qemux86-64:~# gdb /bin/cat |
9739 | ... | ||
9740 | Reading symbols from /bin/cat... | ||
9741 | Downloading separate debug info for /bin/cat... | ||
9742 | Reading symbols from /home/root/.cache/debuginfod_client/923dc4780cfbc545850c616bffa884b6b5eaf322/debuginfo... | ||
9733 | 9743 | ||
9734 | This :term:`DEBUGINFOD_URLS` option does the client configuration. | 9744 | - It's also possible to use ``debuginfod-find`` to just query the server:: |
9735 | 9745 | ||
9736 | :: | 9746 | root@qemux86-64:~# debuginfod-find debuginfo /bin/ls |
9737 | 9747 | /home/root/.cache/debuginfod_client/356edc585f7f82d46f94fcb87a86a3fe2d2e60bd/debuginfo | |
9738 | PACKAGECONFIG_pn-gdb = "debuginfod" | ||
9739 | 9748 | ||
9740 | This :term:`PACKAGECONFIG` option enables "debuginfod" for "gdb". | ||
9741 | 9749 | ||
9742 | Using the gdbserver method | 9750 | Using the gdbserver method |
9743 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | 9751 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |