Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Tobias Hunger
qt-creator
Commits
eb60cf1d
Commit
eb60cf1d
authored
Feb 08, 2010
by
hjk
Browse files
debugger: fix dumper loading on mac
parent
0bde89ee
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/plugins/debugger/gdb/classicgdbengine.cpp
View file @
eb60cf1d
...
...
@@ -41,6 +41,10 @@
#include
<QtCore/QFile>
#include
<QtCore/QFileInfo>
#if !defined(Q_OS_WIN)
#include
<dlfcn.h>
#endif
#define PRECONDITION QTC_ASSERT(!hasPython(),
/**/
)
#define CB(callback) &GdbEngine::callback, STRINGIFY(callback)
...
...
@@ -513,14 +517,17 @@ void GdbEngine::tryLoadDebuggingHelpersClassic()
dlopenLib
=
startParameters
().
remoteDumperLib
.
toLocal8Bit
();
else
dlopenLib
=
manager
()
->
qtDumperLibraryName
().
toLocal8Bit
();
#if defined(Q_OS_WIN)
// We are using Python on Windows.
// Do not use STRINGIFY as we really want to expand that to a number.
const
QByteArray
flag
=
QByteArray
::
number
(
RTLD_NOW
);
#if defined(Q_OS_WIN) || defined(Q_OS_SYMBIAN)
// We are using Python on Windows and Symbian.
QTC_ASSERT
(
false
,
/**/
);
#elif defined(Q_OS_MAC)
//postCommand("sharedlibrary libc"); // for malloc
//postCommand("sharedlibrary libdl"); // for dlopen
postCommand
(
"call (void)dlopen(
\"
"
+
GdbMi
::
escapeCString
(
dlopenLib
)
+
"
\"
, "
STRINGIFY
(
RTLD_NOW
)
")"
,
+
"
\"
, "
+
flag
+
")"
,
CB
(
handleDebuggingHelperSetup
));
//postCommand("sharedlibrary " + dotEscape(dlopenLib));
#else
...
...
@@ -528,11 +535,11 @@ void GdbEngine::tryLoadDebuggingHelpersClassic()
postCommand
(
"sharedlibrary libc"
);
// for malloc
postCommand
(
"sharedlibrary libdl"
);
// for dlopen
postCommand
(
"call (void*)dlopen(
\"
"
+
GdbMi
::
escapeCString
(
dlopenLib
)
+
"
\"
, "
STRINGIFY
(
RTLD_NOW
)
")"
,
+
"
\"
, "
+
flag
+
")"
,
CB
(
handleDebuggingHelperSetup
));
// some older systems like CentOS 4.6 prefer this:
postCommand
(
"call (void*)__dlopen(
\"
"
+
GdbMi
::
escapeCString
(
dlopenLib
)
+
"
\"
, "
STRINGIFY
(
RTLD_NOW
)
")"
,
+
"
\"
, "
+
flag
+
")"
,
CB
(
handleDebuggingHelperSetup
));
postCommand
(
"sharedlibrary "
+
dotEscape
(
dlopenLib
));
#endif
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment