⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 .gdbinit

📁 debug source code under unix platform.
💻 GDBINIT
字号:
# mpatrol# A library for controlling and tracing dynamic memory allocations.# Copyright (C) 1997-2002 Graeme S. Roy <graeme@epc.co.uk>## This library is free software; you can redistribute it and/or# modify it under the terms of the GNU Library General Public# License as published by the Free Software Foundation; either# version 2 of the License, or (at your option) any later version.## This library is distributed in the hope that it will be useful,# but WITHOUT ANY WARRANTY; without even the implied warranty of# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU# Library General Public License for more details.## You should have received a copy of the GNU Library General Public# License along with this library; if not, write to the Free# Software Foundation, Inc., 59 Temple Place, Suite 330, Boston,# MA 02111-1307, USA.# GDB command file for use with mpatrol# $Id: .gdbinit,v 1.7 2002/01/08 20:30:57 graeme Exp $# Set mpatrol library options in the current process environment.# GDB doesn't support commands with variable arguments so we have# to make use of the shell in order to set the new environment.# Note that there is a known problem when using option arguments# that contain spaces, so try to avoid using such arguments.define malloptprintf "Enter mpatrol library options: "shell read arg; echo set environment MPATROL_OPTIONS `mpatrol --show-env $arg` >/tmp/mpatrol.gdbsource /tmp/mpatrol.gdbshell rm -f /tmp/mpatrol.gdbshow environment MPATROL_OPTIONSenddocument malloptSets mpatrol library options in the current process environment.end# Display information about an address in the heap.define printalloccall __mp_printinfo($arg0)enddocument printallocDisplays information about an address in the heap.end# Break at a specific allocation index.define allocstopcall __mp_setoption(-3, $arg0)enddocument allocstopBreaks at a specific allocation index.end# Break at a specific reallocation index.define reallocstopcall __mp_setoption(-4, $arg0)enddocument reallocstopBreaks at a specific reallocation index.end# Break when a specific allocation is freed.define freestopcall __mp_setoption(-5, $arg0)enddocument freestopBreaks when a specific allocation is freed.end

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -