1 # This file is part of Valgrind, a dynamic binary instrumentation
4 # Copyright (C) 2022-2022 Philippe Waroquiers
6 # This program is free software; you can redistribute it and/or
7 # modify it under the terms of the GNU General Public License as
8 # published by the Free Software Foundation; either version 2 of the
9 # License, or (at your option) any later version.
11 # This program is distributed in the hope that it will be useful, but
12 # WITHOUT ANY WARRANTY; without even the implied warranty of
13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 # General Public License for more details.
16 # You should have received a copy of the GNU General Public License
17 # along with this program; if not, see <http://www.gnu.org/licenses/>.
19 # The GNU General Public License is contained in the file COPYING.
22 Loads valgrind-monitor-def.py if not yet loaded.
23 The purpose of this file is to avoid re-defining the python commands
24 by reloading valgrind-monitor-def.py, as such redefinition causes a
25 segmentation violation in GDB <= 13.
30 if gdb
.convenience_variable("valgrind_monitor_loaded") == None:
31 gdb
.execute("source " + os
.path
.dirname(__file__
) + "/valgrind-monitor-def.py")
32 gdb
.set_convenience_variable ("valgrind_monitor_loaded", 1)
33 print("Loaded "+ __file__
)
34 print("""Type "help valgrind" for more info.""")