diff options
author | Robert Loehning <robert.loehning@nokia.com> | 2010-07-12 16:03:20 +0200 |
---|---|---|
committer | Robert Loehning <robert.loehning@nokia.com> | 2010-07-12 16:06:21 +0200 |
commit | e33b00c9ea783abdc33f32dcf67253adf081444a (patch) | |
tree | a2bf558e5dc16f59af4db72870aabc3e6dd60613 /share | |
parent | d1ff5f9e6d52acfabedb119ea0178d37b754b71d (diff) | |
download | qt-creator-e33b00c9ea783abdc33f32dcf67253adf081444a.tar.gz |
Conditional compilation for functions which are unused on Windows
Diffstat (limited to 'share')
-rw-r--r-- | share/qtcreator/gdbmacros/gdbmacros.cpp | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/share/qtcreator/gdbmacros/gdbmacros.cpp b/share/qtcreator/gdbmacros/gdbmacros.cpp index de8aa35052..113f710aea 100644 --- a/share/qtcreator/gdbmacros/gdbmacros.cpp +++ b/share/qtcreator/gdbmacros/gdbmacros.cpp @@ -273,17 +273,6 @@ static bool startsWith(const char *s, const char *t) return true; } -static bool couldBePointer(const void *p) -{ - // we assume valid pointer to be 4-aligned at least. - // So use this check only when this is guaranteed. - // FIXME: this breaks e.g. in the QString dumper... - const quintptr d = quintptr(p); - //qDebug() << "CHECKING : " << p << ((d & 3) == 0 && (d > 1000 || d == 0)); - //return (d & 3) == 0 && (d > 1000 || d == 0); - return d > 1000 || d == 0; -} - // Check memory for read access and provoke segfault if nothing else helps. // On Windows, try to be less crash-prone by checking memory using WinAPI @@ -314,6 +303,17 @@ static bool couldBePointer(const void *p) qProvokeSegFaultHelper = *(char*)d; \ } while (0) +static bool couldBePointer(const void *p) +{ + // we assume valid pointer to be 4-aligned at least. + // So use this check only when this is guaranteed. + // FIXME: this breaks e.g. in the QString dumper... + const quintptr d = quintptr(p); + //qDebug() << "CHECKING : " << p << ((d & 3) == 0 && (d > 1000 || d == 0)); + //return (d & 3) == 0 && (d > 1000 || d == 0); + return d > 1000 || d == 0; +} + #endif #ifdef QT_NAMESPACE |