mirror of
https://github.com/servo/servo.git
synced 2025-07-29 10:10:34 +01:00
mozilla-central modules for debugger detection
Borrows two python modules from mozilla-central to give mach the ability to detect and pass arguments to a system's preferred debugger. Links to borrowed files: http://hg.mozilla.org/mozilla-central/file/c9cfa9b91dea/testing/mozbase/mozinfo/mozinfo/mozinfo.py http://hg.mozilla.org/mozilla-central/file/c9cfa9b91dea/testing/mozbase/mozdebug/mozdebug/mozdebug.py
This commit is contained in:
parent
4a257bc271
commit
f0d5083557
5 changed files with 489 additions and 0 deletions
30
python/mozdebug/__init__.py
Normal file
30
python/mozdebug/__init__.py
Normal file
|
@ -0,0 +1,30 @@
|
|||
# This Source Code Form is subject to the terms of the Mozilla Public
|
||||
# License, v. 2.0. If a copy of the MPL was not distributed with this file,
|
||||
# You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
"""
|
||||
This module contains a set of function to gather information about the
|
||||
debugging capabilities of the platform. It allows to look for a specific
|
||||
debugger or to query the system for a compatible/default debugger.
|
||||
|
||||
The following simple example looks for the default debugger on the
|
||||
current platform and launches a debugger process with the correct
|
||||
debugger-specific arguments:
|
||||
|
||||
::
|
||||
|
||||
import mozdebug
|
||||
|
||||
debugger = mozdebug.get_default_debugger_name()
|
||||
debuggerInfo = mozdebug.get_debugger_info(debugger)
|
||||
|
||||
debuggeePath = "toDebug"
|
||||
|
||||
processArgs = [self.debuggerInfo.path] + self.debuggerInfo.args
|
||||
processArgs.append(debuggeePath)
|
||||
|
||||
run_process(args, ...)
|
||||
|
||||
"""
|
||||
|
||||
from mozdebug import *
|
Loading…
Add table
Add a link
Reference in a new issue