18 #ifndef BERRYDEBUGUTIL_H_
19 #define BERRYDEBUGUTIL_H_
32 class DebugBreakpointManager;
33 struct IDebugObjectListener;
34 template <
class T>
class SmartPointer;
43 static void TraceObject(
const Object*);
44 static void TraceObject(
unsigned int traceId);
45 static void TraceClass(
const QString& className);
47 static void StopTracing(
unsigned int traceId);
48 static void StopTracing(
const Object* obj);
49 static void StopTracing(
const QString& className);
51 static bool IsTraced(
const Object*
object);
52 static bool IsTraced(
unsigned int traceId);
53 static bool IsTraced(
const QString& className);
55 static QSet<unsigned int> GetTracedObjects();
57 static const Object* GetObject(
unsigned int traceId);
59 static QList<unsigned int> GetSmartPointerIDs(
const Object* objectPointer,
const QList<unsigned int>& excludeList = QList<unsigned int>());
60 static QList<const Object*> GetRegisteredObjects();
62 static void PrintSmartPointerIDs(
const Object* objectPointer,
const QList<unsigned int>& excludeList = QList<unsigned int>());
64 static void ResetObjectSummary();
65 static bool PrintObjectSummary(
bool details =
false);
66 static bool PrintObjectSummary(
const QString& className,
bool details =
false);
71 static void SaveState(
const QDir& path);
72 static void RestoreState(
const QDir& path);
75 static unsigned int& GetSmartPointerCounter();
76 static void RegisterSmartPointer(
unsigned int smartPointerId,
const Object* objectPointer,
bool recordStack =
false);
77 static void UnregisterSmartPointer(
unsigned int smartPointerId,
const Object* objectPointer);
78 static void RegisterObject(
const Object* objectPointer);
79 static void UnregisterObject(
const Object* objectPointer);
84 static const QString DEBUG_UTIL_XML;
86 static const QString DEBUGUTIL_TAG;
87 static const QString TRACEOBJECT_TAG;
88 static const QString TRACECLASS_TAG;
90 static const QString ID_ATTR;
91 static const QString NAME_ATTR;
93 static bool GetPersistencePath(QDir& path);
95 static QHash<quint32, QList<unsigned int> > m_TraceIdToSmartPointerMap;
96 typedef QHash<quint32, const Object* > TraceIdToObjectType;
97 static TraceIdToObjectType m_TraceIdToObjectMap;
98 static QSet<unsigned int> m_TracedObjects;
99 static QSet<QString> m_TracedClasses;
Light weight base class for most BlueBerry classes.
#define org_blueberry_core_runtime_EXPORT