Debian Codegraph @

doc/html/imap/reference/faqs/o-gdb.html

raw
1 <!DOCTYPE html>
2 <html class="writer-html5" lang="en" data-content_root="../../../">
3 <head>
4 <meta charset="utf-8" /><meta name="viewport" content="width=device-width, initial-scale=1" />
5
6 <meta name="viewport" content="width=device-width, initial-scale=1.0" />
7 <title>How to run gdb on Cyrus components &mdash; Cyrus IMAP 3.12.3 documentation</title>
8 <link rel="stylesheet" type="text/css" href="../../../_static/pygments.css?v=fa44fd50" />
9 <link rel="stylesheet" type="text/css" href="../../../_static/css/theme.css?v=86f27845" />
10 <link rel="stylesheet" type="text/css" href="../../../_static/graphviz.css?v=eafc0fe6" />
11 <link rel="stylesheet" href="../../../_static/cyrus.css" type="text/css" />
12
13
14
15 <script src="../../../_static/jquery.js?v=8dae8fb0"></script>
16 <script src="../../../_static/_sphinx_javascript_frameworks_compat.js?v=2cd50e6c"></script>
17 <script src="../../../_static/documentation_options.js?v=2c828074"></script>
18 <script src="../../../_static/doctools.js?v=888ff710"></script>
19 <script src="../../../_static/sphinx_highlight.js?v=dc90522c"></script>
20 <script src="../../../_static/js/theme.js"></script>
21 <link rel="index" title="Index" href="../../../genindex.html" />
22 <link rel="search" title="Search" href="../../../search.html" />
23 <link rel="next" title="Cyrus delivers claims that the mailbox does not exist" href="o-mailbox-doesnotexist.html" />
24 <link rel="prev" title="I have multiple imapd-SERVICES configured and experience occasional freezes when I try to log in!" href="o-freezes.html" />
25 </head>
26
27 <body class="wy-body-for-nav">
28 <div class="wy-grid-for-nav">
29 <nav data-toggle="wy-nav-shift" class="wy-nav-side">
30 <div class="wy-side-scroll">
31 <div class="wy-side-nav-search" >
32
33
34
35 <a href="../../../index.html" class="icon icon-home">
36 Cyrus IMAP
37 </a>
38 <div class="version">
39 3.12.3
40 </div>
41 <div role="search">
42 <form id="rtd-search-form" class="wy-form" action="../../../search.html" method="get">
43 <input type="text" name="q" placeholder="Search docs" aria-label="Search docs" />
44 <input type="hidden" name="check_keywords" value="yes" />
45 <input type="hidden" name="area" value="default" />
46 </form>
47 </div>
48 </div><div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="Navigation menu">
49 <p class="caption" role="heading"><span class="caption-text">Cyrus IMAP</span></p>
50 <ul class="current">
51 <li class="toctree-l1"><a class="reference internal" href="../../../download.html">Download</a></li>
52 <li class="toctree-l1"><a class="reference internal" href="../../../quickstart.html">Quickstart Guide</a></li>
53 <li class="toctree-l1"><a class="reference internal" href="../../../overview.html">Overview</a></li>
54 <li class="toctree-l1"><a class="reference internal" href="../../../setup.html">Setup</a></li>
55 <li class="toctree-l1 current"><a class="reference internal" href="../../../operations.html">Operations</a><ul class="current">
56 <li class="toctree-l2"><a class="reference internal" href="../manpages/index.html">Man pages</a></li>
57 <li class="toctree-l2"><a class="reference internal" href="../admin.html">Administrator Guide</a></li>
58 <li class="toctree-l2 current"><a class="reference internal" href="../faq.html">Frequently Asked Questions</a><ul class="current">
59 <li class="toctree-l3"><a class="reference internal" href="../faq.html#features">Features</a></li>
60 <li class="toctree-l3"><a class="reference internal" href="../faq.html#installation-problems">Installation Problems</a></li>
61 <li class="toctree-l3"><a class="reference internal" href="../faq.html#common-feature-requests">Common Feature Requests</a></li>
62 <li class="toctree-l3 current"><a class="reference internal" href="../faq.html#common-operational-questions">Common Operational Questions</a><ul class="current">
63 <li class="toctree-l4"><a class="reference internal" href="o-acls.html">How do I view ACLs on a mailbox?</a></li>
64 <li class="toctree-l4"><a class="reference internal" href="o-annotations.html">What annotations are available?</a></li>
65 <li class="toctree-l4"><a class="reference internal" href="o-configdir-tempfs.html">Is it safe to put &lt;configdirectory&gt;/proc and &lt;configdirectory&gt;/lock on a tmpfs filesystem?</a></li>
66 <li class="toctree-l4"><a class="reference internal" href="o-coredump.html">How to enable core dumps</a></li>
67 <li class="toctree-l4"><a class="reference internal" href="o-delete-mailbox.html">Why can I not delete a mailbox as an admin user?</a></li>
68 <li class="toctree-l4"><a class="reference internal" href="o-deleted-expired-expunged-purged.html">When is What ... Deleted, Expired, Expunged or Purged?</a></li>
69 <li class="toctree-l4"><a class="reference internal" href="o-deliverdb-size.html">Why is deliver.db so large?</a></li>
70 <li class="toctree-l4"><a class="reference internal" href="o-freezes.html">I have multiple imapd-SERVICES configured and experience occasional freezes when I try to log in!</a></li>
71 <li class="toctree-l4 current"><a class="current reference internal" href="#">How to run gdb on Cyrus components</a></li>
72 <li class="toctree-l4"><a class="reference internal" href="o-mailbox-doesnotexist.html">Cyrus delivers claims that the mailbox does not exist</a></li>
73 <li class="toctree-l4"><a class="reference internal" href="o-mixedcase.html">Why is mail being rejected with No Mailbox found due to MiXed CaSe incoming e-mail?</a></li>
74 <li class="toctree-l4"><a class="reference internal" href="o-otherdatabases.html">Can I use MySQL (or another SQL database) as the primary mail store?</a></li>
75 <li class="toctree-l4"><a class="reference internal" href="o-pop3slow.html">Why do POP3 connections take so long, but once the connection is established all is well?</a></li>
76 <li class="toctree-l4"><a class="reference internal" href="o-reconstruct.html">Why does reconstruct -m not work?</a></li>
77 <li class="toctree-l4"><a class="reference internal" href="o-sharedfilesystem-gpfs.html">Shared File Systems GPFS for high availability</a></li>
78 <li class="toctree-l4"><a class="reference internal" href="o-telemetry.html">How to enable telemetry</a></li>
79 <li class="toctree-l4"><a class="reference internal" href="o-toomanyprocesses.html">The process count keeps growing!</a></li>
80 <li class="toctree-l4"><a class="reference internal" href="o-unable-join-environment.html">&quot;unable to join environment&quot; error</a></li>
81 <li class="toctree-l4"><a class="reference internal" href="o-vacation-mailfrom.html">Why does Cyrus set the MAIL FROM address of the sender of vacation responses to '&lt;&gt;'?</a></li>
82 </ul>
83 </li>
84 <li class="toctree-l3"><a class="reference internal" href="../faq.html#common-interoperability-problems">Common Interoperability Problems</a></li>
85 </ul>
86 </li>
87 </ul>
88 </li>
89 <li class="toctree-l1"><a class="reference internal" href="../../../developers.html">Developers</a></li>
90 <li class="toctree-l1"><a class="reference internal" href="../../../support.html">Support/Community</a></li>
91 </ul>
92 <p class="caption" role="heading"><span class="caption-text">Cyrus SASL</span></p>
93 <ul>
94 <li class="toctree-l1"><a class="reference external" href="http://www.cyrusimap.org/sasl">Cyrus SASL</a></li>
95 </ul>
96
97 </div>
98 </div>
99 </nav>
100
101 <section data-toggle="wy-nav-shift" class="wy-nav-content-wrap"><nav class="wy-nav-top" aria-label="Mobile navigation menu" >
102 <i data-toggle="wy-nav-top" class="fa fa-bars"></i>
103 <a href="../../../index.html">Cyrus IMAP</a>
104 </nav>
105
106 <div class="wy-nav-content">
107 <div class="rst-content">
108 <div role="navigation" aria-label="Page navigation">
109 <ul class="wy-breadcrumbs">
110 <li><a href="../../../index.html" class="icon icon-home" aria-label="Home"></a></li>
111 <li class="breadcrumb-item"><a href="../../../operations.html">Operations</a></li>
112 <li class="breadcrumb-item"><a href="../faq.html">Frequently Asked Questions</a></li>
113 <li class="breadcrumb-item active">How to run gdb on Cyrus components</li>
114 <li class="wy-breadcrumbs-aside">
115 <a href="https://github.com/cyrusimap/cyrus-imapd/blob/master/docsrc/imap/reference/faqs/o-gdb.rst" class="fa fa-github"> Edit on GitHub</a>
116 </li>
117 </ul>
118 <hr/>
119 </div>
120 <div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
121 <div itemprop="articleBody">
122
123 <section id="how-to-run-gdb-on-cyrus-components">
124 <span id="faqs-o-gdb"></span><h1>How to run gdb on Cyrus components<a class="headerlink" href="#how-to-run-gdb-on-cyrus-components" title="Link to this heading"></a></h1>
125 <aside class="sidebar">
126 <p class="sidebar-title">What is a service daemon?</p>
127 <p>A service daemon is any program based around master/service.c. This includes
128 imapd, lmtpd (and some others), but does <em>not</em> include the command line
129 tools.</p>
130 </aside>
131 <p>An easy way to debug something in a service daemon is to write a
132 <a class="reference internal" href="../../developer/developer-testing.html#developer-testing"><span class="std std-ref">Cassandane test</span></a> that tries to reproduce the
133 bug. Cassandane has a <code class="docutils literal notranslate"><span class="pre">[gdb]</span></code> section in cassandane.ini which allows for
134 starting service daemons in a debugger.</p>
135 <p>The cassandane.ini.example in the cassandane repository contains examples and
136 instructions.</p>
137 <p>For programs that aren't service daemons, there are two options:</p>
138 <p>If they are installed, run them with gdb. You might need to use <code class="docutils literal notranslate"><span class="pre">sudo</span></code>
139 depending on permissions. If they haven't been installed (and you're in the
140 source/build tree), you need to run gdb from <code class="docutils literal notranslate"><span class="pre">libtool</span></code> in order for everything
141 to work.</p>
142 <p>For example, if you wanted to debug cyr_virusscan:</p>
143 <div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>$<span class="w"> </span>./libtool<span class="w"> </span>--mode<span class="o">=</span>execute<span class="w"> </span>gdb<span class="w"> </span>imap/cyr_virusscan
144 </pre></div>
145 </div>
146 <p>Command line arguments for a tool you're debugging, must be given to gdb before
147 you run. Use something like <a class="reference external" href="https://sourceware.org/gdb/current/onlinedocs/gdb/Arguments.html#Arguments">set args [ ... ]</a>.</p>
148 <p><a class="reference external" href="http://sourceware.org/gdb/current/onlinedocs/gdb/">More information on gdb</a>.</p>
149 </section>
150
151
152 </div>
153 </div>
154 <footer><div class="rst-footer-buttons" role="navigation" aria-label="Footer">
155 <a href="o-freezes.html" class="btn btn-neutral float-left" title="I have multiple imapd-SERVICES configured and experience occasional freezes when I try to log in!" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left" aria-hidden="true"></span> Previous</a>
156 <a href="o-mailbox-doesnotexist.html" class="btn btn-neutral float-right" title="Cyrus delivers claims that the mailbox does not exist" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right" aria-hidden="true"></span></a>
157 </div>
158
159 <hr/>
160
161 <div role="contentinfo">
162 <p>&#169; Copyright 1993–2026, The Cyrus Team.</p>
163 </div>
164
165 Built with <a href="https://www.sphinx-doc.org/">Sphinx</a> using a
166 <a href="https://github.com/readthedocs/sphinx_rtd_theme">theme</a>
167 provided by <a href="https://readthedocs.org">Read the Docs</a>.
168
169
170 </footer>
171 </div>
172 </div>
173 </section>
174 </div>
175 <script>
176 jQuery(function () {
177 SphinxRtdTheme.Navigation.enable(true);
178 });
179 </script>
180
181
182
183
184 </body>
185 </html>