]> git.proxmox.com Git - mirror_qemu.git/blame - scripts/qemu-gdb.py
scripts/qemu-gdb: Silently pass through SIGUSR1
[mirror_qemu.git] / scripts / qemu-gdb.py
CommitLineData
4daa187d
AK
1#!/usr/bin/python
2
3# GDB debugging support
4#
5# Copyright 2012 Red Hat, Inc. and/or its affiliates
6#
7# Authors:
8# Avi Kivity <avi@redhat.com>
9#
10# This work is licensed under the terms of the GNU GPL, version 2. See
11# the COPYING file in the top-level directory.
12#
13# Contributions after 2012-01-13 are licensed under the terms of the
14# GNU GPL, version 2 or (at your option) any later version.
15
16
17import gdb
18
93b1b365 19import os, sys
4daa187d 20
93b1b365
PM
21# Annoyingly, gdb doesn't put the directory of scripts onto the
22# module search path. Do it manually.
23
24sys.path.append(os.path.dirname(__file__))
25
191590f0 26from qemugdb import mtree, coroutine
9eddd6a4 27
4daa187d
AK
28class QemuCommand(gdb.Command):
29 '''Prefix for QEMU debug support commands'''
30 def __init__(self):
31 gdb.Command.__init__(self, 'qemu', gdb.COMMAND_DATA,
32 gdb.COMPLETE_NONE, True)
33
4daa187d 34QemuCommand()
191590f0 35coroutine.CoroutineCommand()
93b1b365 36mtree.MtreeCommand()
5e3c72d4
PM
37
38# Default to silently passing through SIGUSR1, because QEMU sends it
39# to itself a lot.
40gdb.execute('handle SIGUSR1 pass noprint nostop')