diff options
author | Alon Levy <alevy@redhat.com> | 2011-08-01 19:17:48 +0300 |
---|---|---|
committer | Alon Levy <alevy@redhat.com> | 2011-08-30 13:27:32 +0300 |
commit | 38cedb7ad42f11fe451507d82922d4e94cdcf15d (patch) | |
tree | b297de49e65f0be3718145cbf10a3720a8d9e4a9 /scripts | |
parent | b89a0b11b1133bf2991580203867830747ad4de1 (diff) |
xspice: make --cgdb non magical, use XSPICE_ENABLE_GDB
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/xspice | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/scripts/xspice b/scripts/xspice index 3c6b49a..4ebd8e8 100755 --- a/scripts/xspice +++ b/scripts/xspice @@ -27,9 +27,12 @@ def which(x): return candidate return None -cgdb = which('cgdb') if os.path.exists( - os.path.join(os.path.dirname(sys.modules[__name__].__file__), - 'Makefile.am')) else None +if 'XSPICE_ENABLE_GDB' in os.environ: + cgdb = which('cgdb') + if not cgdb: + cgdb = which('gdb') +else: + cgdb = None def add_boolean(flag, *args, **kw): parser.add_argument(flag, action='store_const', const='1', default='0', |