Debugger: Remove workaround for GDBs with broken parse_and_eval

This mostly affected pre-7.2 version which we don't officially
support anymore anyways. No need to waste cycles on them.

Change-Id: I748cb2be6c5d4161c4129f51809cf3cc358e0be0
Reviewed-by: hjk <hjk121@nokiamail.com>
This commit is contained in:
hjk
2013-04-05 13:33:52 +02:00
parent 1711dadb9c
commit e262596dc4

View File

@@ -112,28 +112,8 @@ try:
Command() Command()
def isGoodGdb():
#return gdb.VERSION.startswith("6.8.50.2009") \
# and gdb.VERSION != "6.8.50.20090630-cvs"
return 'parse_and_eval' in __builtin__.dir(gdb)
def parseAndEvaluate(exp): def parseAndEvaluate(exp):
if isGoodGdb():
return gdb.parse_and_eval(exp) return gdb.parse_and_eval(exp)
# Work around non-existing gdb.parse_and_eval as in released 7.0
# gdb.execute("set logging redirect on")
gdb.execute("set logging on")
try:
gdb.execute("print %s" % exp)
except:
gdb.execute("set logging off")
# gdb.execute("set logging redirect off")
return None
gdb.execute("set logging off")
# gdb.execute("set logging redirect off")
return gdb.history(0)
def extractFields(value): def extractFields(value):
return value.type.fields() return value.type.fields()
@@ -179,7 +159,7 @@ try:
items = [] items = []
#warn("HAS BLOCK: %s" % hasBlock) #warn("HAS BLOCK: %s" % hasBlock)
if hasBlock and isGoodGdb(): if hasBlock:
#warn("IS GOOD: %s " % varList) #warn("IS GOOD: %s " % varList)
try: try:
block = frame.block() block = frame.block()