/ .gdbinit
.gdbinit
 1  # Copyright 2011 Shinichiro Hamaji. All rights reserved.
 2  #
 3  # Redistribution and use in source and binary forms, with or without
 4  # modification, are permitted provided that the following conditions
 5  # are met:
 6  #
 7  #   1. Redistributions of source code must retain the above copyright
 8  #      notice, this list of  conditions and the following disclaimer.
 9  #
10  #   2. Redistributions in binary form must reproduce the above
11  #      copyright notice, this list of conditions and the following
12  #      disclaimer in the documentation and/or other materials
13  #      provided with the distribution.
14  #
15  # THIS SOFTWARE IS PROVIDED BY Shinichiro Hamaji ``AS IS'' AND ANY
16  # EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
17  # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
18  # PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL Shinichiro Hamaji OR
19  # CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
20  # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
21  # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
22  # USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23  # ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
24  # OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
25  # OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
26  # SUCH DAMAGE.
27  
28  set follow-fork-mode child
29  
30  python sys.path.insert(0, './tools/')
31  python import gdb_maloader
32  
33  define mreload
34    python reload(gdb_maloader)
35  end
36  
37  define mbt
38    mreload
39    python gdb_maloader.bt()
40  end
41  
42  define mbtr
43    mreload
44    python gdb_maloader.bt(demangle=False)
45  end