Skip to content
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

Document process for running cyrus components through a debugger like gdb #1330

Closed
brong opened this issue Mar 2, 2011 · 4 comments
Closed
Assignees
Labels
documentation requires documentation updates P3 task

Comments

@brong
Copy link
Member

brong commented Mar 2, 2011

From: Jeroen van Meeuwen (Kolab Systems)
Bugzilla-Id: 3413
Version: 2.5.x (next)
Owner: Jeroen van Meeuwen (Kolab Systems)

@brong
Copy link
Member Author

brong commented Mar 2, 2011

From: Jeroen van Meeuwen (Kolab Systems)

As per the title

@brong brong added documentation requires documentation updates P3 task labels Dec 13, 2016
@elliefm
Copy link
Contributor

elliefm commented May 26, 2017

There's a "[gdb]" section of cassandane.ini which allows firing up service daemons in a debugger (technical note: "service daemons" are any programs which are based around master/service.c, and includes imapd, lmtpd, and a few others, but notably does not include the command line tools). The cassandane.ini.example in the cassandane repo contains examples and instructions.

When I'm trying to debug something in a service daemon I find it most useful to throw together a Cassandane test that tries to reproduce it, enable one of the [gdb] options as appropriate and go from there.

For programs that aren't service daemons, you have two options:

  • If they've been installed, just run them with gdb. You might need to fiddle around with sudo depending on permissions.
  • If they haven't been installed (and you're in the source/build tree), you need to run gdb from libtool in order for everything to fit together properly. e.g. libtool --mode=execute gdb imap/cyr_virusscan if you wanted to debug cyr_virusscan

@elliefm
Copy link
Contributor

elliefm commented May 26, 2017

If you need to pass command line arguments to a tool you're debugging, you do this once you're in gdb with something like set args [...] before you run. (I'm not going to go into gdb at length, it's got its own documentation, but that seems like a helpful starting point to someone who's new.)

nicolan pushed a commit that referenced this issue May 26, 2017
Step 1: gdb
Step 2:
Step 3: all bugs are fixed.

Issue #1330
nicolan pushed a commit that referenced this issue May 26, 2017
Step 1: gdb
Step 2:
Step 3: all bugs are fixed.

Issue #1330
@nicolan
Copy link

nicolan commented May 26, 2017

Fixed!

@nicolan nicolan closed this as completed May 26, 2017
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation requires documentation updates P3 task
Projects
None yet
Development

No branches or pull requests

3 participants