-
Notifications
You must be signed in to change notification settings - Fork 239
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added new chapter on debuginfod (jsc#SLE-20452) #1177
Open
tbazant
wants to merge
2
commits into
main
Choose a base branch
from
toba/admin-debuginfod-jsc#SLE-20452
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 1 commit
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,107 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!DOCTYPE chapter | ||
[ | ||
<!ENTITY % entities SYSTEM "generic-entities.ent"> | ||
%entities; | ||
]> | ||
<chapter xmlns="http://docbook.org/ns/docbook" xmlns:xi="http://www.w3.org/2001/XInclude" xmlns:xlink="http://www.w3.org/1999/xlink" version="5.0" xml:id="debuginfo"> | ||
<title>Getting debugging data and sources with &debuginfod;</title> | ||
<info> | ||
<dm:docmanager xmlns:dm="urn:x-suse:ns:docmanager"> | ||
<dm:bugtracker></dm:bugtracker> | ||
<dm:translation>yes</dm:translation> | ||
</dm:docmanager> | ||
</info> | ||
<sect1 xml:id="debuginfo-introduction"> | ||
<title>Introduction</title> | ||
|
||
<para> | ||
Developers often need to solve bugs in software packages. Debugging tools, | ||
for example GDB, use information contained in special files that are not | ||
available in the installed binary version of the package. It is available in | ||
the source or <emphasis>debuginfo</emphasis> version of the package. | ||
tbazant marked this conversation as resolved.
Show resolved
Hide resolved
tbazant marked this conversation as resolved.
Show resolved
Hide resolved
|
||
Installing packages with extended debugging information requires system | ||
administrator privileges and occupies a lot of disk space. | ||
</para> | ||
|
||
<para> | ||
The &debuginfod; service contains an HTTP file server that provides | ||
debugging information for debugging tools without the need to install | ||
debuginfo versions of packages. | ||
</para> | ||
</sect1> | ||
<sect1 xml:id="debuginfo-how-it-works"> | ||
<title>How &debuginfod; works</title> | ||
|
||
<para> | ||
&debuginfod; periodically scans remote and local directory trees and RPM | ||
package archives to extract the build IDs of discovered executables and | ||
debuginfo files. It stores these IDs into a built-in database and indexes | ||
them to the related file or package names. | ||
</para> | ||
</sect1> | ||
<sect1 xml:id="debuginfo-configuration"> | ||
<title>Configuring &debuginfod;</title> | ||
|
||
<para> | ||
You can query external &debuginfod; servers, run local &debuginfod; server, | ||
or a combination of both approaches. | ||
</para> | ||
|
||
<sect2 xml:id="debuginfo-configuration-local"> | ||
<title>Runing local &debuginfod; server</title> | ||
<para> | ||
To run a local &debuginfod; server, follow these steps: | ||
</para> | ||
<procedure> | ||
<step> | ||
<para> | ||
Install the <package>elfutils-debuginfod</package> package: | ||
</para> | ||
<screen>&prompt.sudo;zypper install elfutils-debuginfod</screen> | ||
</step> | ||
<step> | ||
<para> | ||
Start the &debuginfod; service: | ||
</para> | ||
<screen>&prompt.sudo;systemctl start debuginfod.service</screen> | ||
</step> | ||
<step> | ||
<para> | ||
Add the local server's URL to the <varname>DEBUGINFOD_URLS</varname> | ||
environment variable: | ||
</para> | ||
<screen>&prompt.sudo;export DEBUGINFOD_URLS="http://localhost:8002/ $DEBUGINFOD_URLS"</screen> | ||
</step> | ||
</procedure> | ||
</sect2> | ||
|
||
<sect2 xml:id="debuginfo-configuration-remote"> | ||
<title>Adding remote &debuginfod; servers</title> | ||
<para> | ||
To be able to query remote &debuginfod; server, add its URL to the | ||
<varname>DEBUGINFOD_URLS</varname> environment variable. For example: | ||
</para> | ||
<screen>&prompt.sudo;export DEBUGINFOD_URLS="https://debuginfod.opensuse.org/ $DEBUGINFOD_URLS"</screen> | ||
</sect2> | ||
</sect1> | ||
<sect1 xml:id="debuginfo-usage"> | ||
<title>Querying executables for debugging information</title> | ||
|
||
<para> | ||
The <command>debuginfod-find</command> command—which is part of the | ||
<package>debuginfod-client</package> package—queries configured | ||
&debuginfod; servers for debugging information. It uses build IDs to | ||
identify the queried data. For example, for an executable | ||
<filename>/bin/ls</filename>, you can find the build ID by running the | ||
following command and the query for the debugging information: | ||
</para> | ||
|
||
<screen> | ||
&prompt.user;readelf -n /bin/ls | grep 'Build ID' | ||
Build ID: e21f1b05e314b4c54ee57ec057c4f40c1df49dd3 | ||
&prompt.user;debuginfod-find debuginfo e21f1b05e314b4c54ee57ec057c4f40c1df49dd3 | ||
/root/.cache/debuginfod_client/e21f1b05e314b4c54ee57ec057c4f40c1df49dd3/debuginfo | ||
</screen> | ||
</sect1> | ||
</chapter> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you please verify if
debuginfod
is enabled in the GDB version we ship inSLE15SP4
? If not, we should emphasize that as it is a primary use case.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it is not :-(
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm going to ask my colleague if we can enable the support as SLE15SP4 contains the latest release of gdb.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i got the info from Michael Matz that default support in gdb is not going to be enabled in SLE 15 product line
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
However, there's a high chance we can deliver the functionality in the next Toolchain module update (Autumn 2022).