| 1 | /*
 | 
|---|
| 2 |  * Project: MoleCuilder
 | 
|---|
| 3 |  * Description: creates and alters molecular systems
 | 
|---|
| 4 |  * Copyright (C)  2010 University of Bonn. All rights reserved.
 | 
|---|
| 5 |  * Please see the LICENSE file or "Copyright notice" in builder.cpp for details.
 | 
|---|
| 6 |  */
 | 
|---|
| 7 | 
 | 
|---|
| 8 | /**
 | 
|---|
| 9 |  * \file debug.dox
 | 
|---|
| 10 |  *
 | 
|---|
| 11 |  *  Herein, notes concerning the debugging of the code are contained.
 | 
|---|
| 12 |  *
 | 
|---|
| 13 |  * Created on: Nov 10, 2011
 | 
|---|
| 14 |  *    Author: heber
 | 
|---|
| 15 |  */
 | 
|---|
| 16 | 
 | 
|---|
| 17 | /**
 | 
|---|
| 18 |  * \page debug Some notes on Debugging
 | 
|---|
| 19 |  *
 | 
|---|
| 20 |  * \section debug-libtool Debug the code with libtool
 | 
|---|
| 21 |  *
 | 
|---|
| 22 |  * Since the switch to shared libraries we use  libtool to do the compiling and
 | 
|---|
| 23 |  * linking.
 | 
|---|
| 24 |  * 
 | 
|---|
| 25 |  * Due to its inner workings, the true executable is not generated until
 | 
|---|
| 26 |  * \code 
 | 
|---|
| 27 |  * make install
 | 
|---|
| 28 |  * \endcode
 | 
|---|
| 29 |  * is executed. If you check on e.g. \b./src/molecuilder in your build directory
 | 
|---|
| 30 |  * after compilation you will notice that it is just a shell script pointing to
 | 
|---|
| 31 |  *  some stuff residing in \b .libs in the same directory.
 | 
|---|
| 32 |  * 
 | 
|---|
| 33 |  * Hence, debugging this shell script will not work, but make \a gdb cry out
 | 
|---|
| 34 |  * that it does not recognize the executable's format:
 | 
|---|
| 35 |  * \code
 | 
|---|
| 36 |  * $> gdb ./src/molecuilder
 | 
|---|
| 37 |  * GNU gdb (GDB) 7.1-ubuntu
 | 
|---|
| 38 |  * Copyright (C) 2010 Free Software Foundation, Inc.
 | 
|---|
| 39 |  * License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
 | 
|---|
| 40 |  * This is free software: you are free to change and redistribute it.
 | 
|---|
| 41 |  * There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
 | 
|---|
| 42 |  * and "show warranty" for details.
 | 
|---|
| 43 |  * This GDB was configured as "x86_64-linux-gnu".
 | 
|---|
| 44 |  * For bug reporting instructions, please see:
 | 
|---|
| 45 |  * <http://www.gnu.org/software/gdb/bugs/>...
 | 
|---|
| 46 |  * "/mnt.auto/bespin/heber/workspace_C/molecuilder/debug64/src/molecuilder": not in executable format: File format not recognized
 | 
|---|
| 47 |  * (gdb) q
 | 
|---|
| 48 |  * \endcode
 | 
|---|
| 49 |  * Instead, execute:
 | 
|---|
| 50 |  * \code
 | 
|---|
| 51 |  * libtool --mode=execute gdb --args ./src/molecuilder -v [some more options ...]
 | 
|---|
| 52 |  * \endcode
 | 
|---|
| 53 |  * You may also set your own alias in \b ~/.bashrc to ease the typing, just add
 | 
|---|
| 54 |  * the following line to the file
 | 
|---|
| 55 |  * \code
 | 
|---|
| 56 |  * alias debug='libtool --mode=execute gdb --args'
 | 
|---|
| 57 |  * \endcode
 | 
|---|
| 58 |  *
 | 
|---|
| 59 |  *
 | 
|---|
| 60 |  * \date 2011-11-10
 | 
|---|
| 61 |  *
 | 
|---|
| 62 |  */
 | 
|---|