mirror of
https://gitlab.com/qemu-project/qemu
synced 2024-09-06 18:05:37 +00:00
![Peter Maydell](/assets/img/avatar_default.png)
SIGUSR1 is QEMU's IPI signal, and it gets sent a lot, so is best silently passed through to the guest without stopping. Make qemu-gdb.py do this bit of configuration for the user. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Message-id: 1439574392-4403-4-git-send-email-peter.maydell@linaro.org
41 lines
1 KiB
Python
41 lines
1 KiB
Python
#!/usr/bin/python
|
|
|
|
# GDB debugging support
|
|
#
|
|
# Copyright 2012 Red Hat, Inc. and/or its affiliates
|
|
#
|
|
# Authors:
|
|
# Avi Kivity <avi@redhat.com>
|
|
#
|
|
# This work is licensed under the terms of the GNU GPL, version 2. See
|
|
# the COPYING file in the top-level directory.
|
|
#
|
|
# Contributions after 2012-01-13 are licensed under the terms of the
|
|
# GNU GPL, version 2 or (at your option) any later version.
|
|
|
|
|
|
import gdb
|
|
|
|
import os, sys
|
|
|
|
# Annoyingly, gdb doesn't put the directory of scripts onto the
|
|
# module search path. Do it manually.
|
|
|
|
sys.path.append(os.path.dirname(__file__))
|
|
|
|
from qemugdb import mtree, coroutine
|
|
|
|
class QemuCommand(gdb.Command):
|
|
'''Prefix for QEMU debug support commands'''
|
|
def __init__(self):
|
|
gdb.Command.__init__(self, 'qemu', gdb.COMMAND_DATA,
|
|
gdb.COMPLETE_NONE, True)
|
|
|
|
QemuCommand()
|
|
coroutine.CoroutineCommand()
|
|
mtree.MtreeCommand()
|
|
|
|
# Default to silently passing through SIGUSR1, because QEMU sends it
|
|
# to itself a lot.
|
|
gdb.execute('handle SIGUSR1 pass noprint nostop')
|