Commit 5b98167e authored by hjk's avatar hjk

Debugger: Remove common bridge.py

The engines know what they want, no need to guess again.

Change-Id: Ie21b0e08eff8b81b217a08d4c47c35c35ae831d7
Reviewed-by: default avatarhjk <hjk121@nokiamail.com>
parent e6eb0612
import binascii
import inspect
import os
import traceback
cdbLoaded = False
lldbLoaded = False
gdbLoaded = False
#######################################################################
#
# Helpers
#
#######################################################################
currentDir = os.path.dirname(os.path.abspath(inspect.getfile(inspect.currentframe())))
#print "DIR: %s " % currentDir
def warn(message):
print "XXX: %s\n" % message.encode("latin1")
PointerCode = None
ArrayCode = None
StructCode = None
UnionCode = None
EnumCode = None
FlagsCode = None
FunctionCode = None
IntCode = None
FloatCode = None
VoidCode = None
SetCode = None
RangeCode = None
StringCode = None
BitStringCode = None
ErrorTypeCode = None
MethodCode = None
MethodPointerCode = None
MemberPointerCode = None
ReferenceCode = None
CharCode = None
BoolCode = None
ComplexCode = None
TypedefCode = None
NamespaceCode = None
SimpleValueCode = None # LLDB only
failReasons = []
# CDB
if False:
try:
import cdb_bridge
cdbLoaded = True
except:
failReasons.append(traceback.format_exc())
# GDB
if not cdbLoaded:
try:
import gdb
execfile(os.path.join(currentDir, "gbridge.py"))
gdbLoaded = True
except:
failReasons.append(traceback.format_exc())
# LLDB
if not gdbLoaded and not cdbLoaded:
#try:
execfile(os.path.join(currentDir, "lbridge.py"))
lldbLoaded = True
#except:
# failReasons.append(traceback.format_exc())
# One is sufficient.
#if cdbLoaded or gdbLoaded or lldbLoaded:
# failReasons = []
try:
execfile(os.path.join(currentDir, "dumper.py"))
execfile(os.path.join(currentDir, "qttypes.py"))
bbsetup()
except:
failReasons.append(traceback.format_exc())
if len(failReasons):
print "CANNOT ACCESS ANY DEBUGGER BACKEND:\n %s" % "\n".join(failReasons)
def warn(message):
print "XXX: %s\n" % message.encode("latin1")
import binascii
import inspect
import os
import traceback
import gdb
cdbLoaded = False
lldbLoaded = False
gdbLoaded = False
#######################################################################
#
......@@ -7,6 +15,9 @@ def warn(message):
#
#######################################################################
def warn(message):
print "XXX: %s\n" % message.encode("latin1")
def savePrint(output):
try:
print(output)
......@@ -320,3 +331,9 @@ class ScanStackCommand(gdb.Command):
ScanStackCommand()
gdbLoaded = True
currentDir = os.path.dirname(os.path.abspath(inspect.getfile(inspect.currentframe())))
execfile(os.path.join(currentDir, "dumper.py"))
execfile(os.path.join(currentDir, "qttypes.py"))
bbsetup()
......@@ -4952,7 +4952,7 @@ void GdbEngine::tryLoadPythonDumpers()
const QByteArray dumperSourcePath =
Core::ICore::resourcePath().toLocal8Bit() + "/dumper/";
postCommand("python execfile('" + dumperSourcePath + "bridge.py')",
postCommand("python execfile('" + dumperSourcePath + "gbridge.py')",
ConsoleCommand, CB(handlePythonSetup));
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment