summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlon Levy <alevy@redhat.com>2011-08-01 19:22:40 +0300
committerAlon Levy <alevy@redhat.com>2011-08-01 19:22:40 +0300
commit428273075a0a9fd6781bec8680ca30f83b001345 (patch)
tree6f2638c6c4a5d814c48ad1296def4534e9a4c9f8
parent21c8e5a31860d4d916ab8302a864262f3af356d2 (diff)
spice2: --cgdb: check for gdb as well
-rwxr-xr-xspice28
1 files changed, 8 insertions, 0 deletions
diff --git a/spice2 b/spice2
index 326d348..3f6f45b 100755
--- a/spice2
+++ b/spice2
@@ -560,6 +560,14 @@ def build_qemu_cmdline(args):
# wrap in various tools
if args.cgdb:
cgdb = which('cgdb')
+ if not cgdb:
+ gdb = which('gdb')
+ if gdb:
+ print "using gdb instead of cgdb"
+ cgdb = gdb
+ else:
+ print "missing both cgdb and gdb"
+ sys.exit(1)
cmdline = [cgdb, '--args'] + cmdline
if args.memcheck:
print "wrapping with valgrind memcheck"