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

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

Reviewed-By: hjk
parent 5d9e1753
......@@ -8,6 +8,7 @@ import traceback
import gdb
import base64
import os
import __builtin__
if != "nt":
import curses.ascii
......@@ -32,7 +33,7 @@ def qmin(n, m):
def isGoodGdb():
#return gdb.VERSION.startswith("") \
# and gdb.VERSION != ""
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():
Supports Markdown
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