Commit 20429a84 authored by Thiago Macieira's avatar Thiago Macieira Committed by hjk

Use __builtin__.dir instead of dir in Python

Somehow, some gdb define a string with the name 'gdb' and we can't
find where. But be on the safe side and use the builtin function
always.

Reviewed-By: hjk
parent 5d9e1753
......@@ -8,6 +8,7 @@ import traceback
import gdb
import base64
import os
import __builtin__
if os.name != "nt":
import curses.ascii
......@@ -32,7 +33,7 @@ def qmin(n, m):
def isGoodGdb():
#return gdb.VERSION.startswith("6.8.50.2009") \
# and gdb.VERSION != "6.8.50.20090630-cvs"
return 'parse_and_eval' in dir(gdb)
return 'parse_and_eval' in __builtin__.dir(gdb)
def cleanAddress(addr):
if addr is None:
......@@ -202,7 +203,7 @@ def listOfLocals(varList):
return []
# gdb-6.8-symbianelf fails here
hasBlock = 'block' in dir(frame)
hasBlock = 'block' in __builtin__.dir(frame)
items = []
if hasBlock and isGoodGdb():
......
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