blob: 1c94b2a9dd9f51860869f2de6bf447877e646d22 [file] [log] [blame]
Avi Kivity4daa1872012-03-18 16:48:44 +02001#!/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
Peter Maydell93b1b362015-08-14 18:46:29 +010019import os, sys
Avi Kivity4daa1872012-03-18 16:48:44 +020020
Peter Maydell93b1b362015-08-14 18:46:29 +010021# 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
Peter Maydell191590f2015-08-14 18:46:30 +010026from qemugdb import mtree, coroutine
Stefan Hajnoczi9eddd6a2015-03-26 22:42:34 +000027
Avi Kivity4daa1872012-03-18 16:48:44 +020028class 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
Avi Kivity4daa1872012-03-18 16:48:44 +020034QemuCommand()
Peter Maydell191590f2015-08-14 18:46:30 +010035coroutine.CoroutineCommand()
Peter Maydell93b1b362015-08-14 18:46:29 +010036mtree.MtreeCommand()