Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
Marco Bubke
flatpak-qt-creator
Commits
ffd48ebd
Commit
ffd48ebd
authored
Jan 20, 2010
by
hjk
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
debugger: remove injection loading.
Was used only on Windows, and we have ther python now.
parent
f64c5e34
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
66 deletions
+9
-66
src/plugins/debugger/gdb/classicgdbengine.cpp
src/plugins/debugger/gdb/classicgdbengine.cpp
+6
-51
src/plugins/debugger/gdb/gdbengine.cpp
src/plugins/debugger/gdb/gdbengine.cpp
+2
-14
src/plugins/debugger/gdb/gdbengine.h
src/plugins/debugger/gdb/gdbengine.h
+1
-1
No files found.
src/plugins/debugger/gdb/classicgdbengine.cpp
View file @
ffd48ebd
...
...
@@ -104,12 +104,6 @@ void GdbEngine::updateLocalsClassic(const QVariant &cookie)
m_toolTipExpression
.
clear
();
manager
()
->
watchHandler
()
->
beginCycle
();
// Asynchronous load of injected library, initialize in first stop
if
(
m_dumperInjectionLoad
&&
m_debuggingHelperState
==
DebuggingHelperLoadTried
&&
m_dumperHelper
.
typeCount
()
==
0
&&
inferiorPid
()
>
0
)
tryQueryDebuggingHelpersClassic
();
QByteArray
level
=
QByteArray
::
number
(
currentFrame
());
// '2' is 'list with type and value'
QByteArray
cmd
=
"-stack-list-arguments 2 "
+
level
+
' '
+
level
;
...
...
@@ -492,19 +486,6 @@ void GdbEngine::handleDebuggingHelperValue3Classic(const GdbResponse &response)
void
GdbEngine
::
tryLoadDebuggingHelpersClassic
()
{
PRECONDITION
;
if
(
isSynchroneous
())
return
;
switch
(
m_debuggingHelperState
)
{
case
DebuggingHelperUninitialized
:
break
;
case
DebuggingHelperLoadTried
:
tryQueryDebuggingHelpersClassic
();
return
;
case
DebuggingHelperAvailable
:
case
DebuggingHelperUnavailable
:
return
;
}
if
(
m_gdbAdapter
->
dumperHandling
()
==
AbstractGdbAdapter
::
DumperNotAvailable
)
{
// Load at least gdb macro based dumpers.
QFile
file
(
_
(
":/gdb/gdbmacros.txt"
));
...
...
@@ -514,8 +495,6 @@ void GdbEngine::tryLoadDebuggingHelpersClassic()
postCommand
(
contents
);
return
;
}
if
(
m_dumperInjectionLoad
&&
inferiorPid
()
<=
0
)
// Need PID to inject
return
;
PENDING_DEBUG
(
"TRY LOAD CUSTOM DUMPERS"
);
m_debuggingHelperState
=
DebuggingHelperUnavailable
;
...
...
@@ -529,32 +508,8 @@ void GdbEngine::tryLoadDebuggingHelpersClassic()
else
dlopenLib
=
manager
()
->
qtDumperLibraryName
().
toLocal8Bit
();
#if defined(Q_OS_WIN)
if
(
m_dumperInjectionLoad
)
{
/// Launch asynchronous remote thread to load.
SharedLibraryInjector
injector
(
inferiorPid
());
QString
errorMessage
;
const
QString
dlopenLibString
=
_
(
dlopenLib
);
if
(
injector
.
remoteInject
(
dlopenLibString
,
false
,
&
errorMessage
))
{
debugMessage
(
_
(
"Dumper injection loading triggered (%1)..."
).
arg
(
dlopenLibString
));
}
else
{
debugMessage
(
_
(
"Dumper loading (%1) failed: %2"
).
arg
(
dlopenLibString
,
errorMessage
));
debugMessage
(
errorMessage
);
manager
()
->
showQtDumperLibraryWarning
(
errorMessage
);
m_debuggingHelperState
=
DebuggingHelperUnavailable
;
return
;
}
}
else
{
debugMessage
(
_
(
"Loading dumpers via debugger call (%1)..."
).
arg
(
_
(
dlopenLib
)));
postCommand
(
"sharedlibrary .*"
);
// for LoadLibraryA
//postCommand("handle SIGSEGV pass stop print");
//postCommand("set unwindonsignal off");
postCommand
(
"call LoadLibraryA(
\"
"
+
GdbMi
::
escapeCString
(
dlopenLib
)
+
"
\"
)"
,
CB
(
handleDebuggingHelperSetup
));
postCommand
(
"sharedlibrary "
+
dotEscape
(
dlopenLib
));
}
// We are using Python on Windows.
QTC_ASSERT
(
false
,
/**/
);
#elif defined(Q_OS_MAC)
//postCommand("sharedlibrary libc"); // for malloc
//postCommand("sharedlibrary libdl"); // for dlopen
...
...
@@ -575,8 +530,7 @@ void GdbEngine::tryLoadDebuggingHelpersClassic()
CB
(
handleDebuggingHelperSetup
));
postCommand
(
"sharedlibrary "
+
dotEscape
(
dlopenLib
));
#endif
if
(
!
m_dumperInjectionLoad
)
tryQueryDebuggingHelpersClassic
();
tryQueryDebuggingHelpersClassic
();
}
void
GdbEngine
::
tryQueryDebuggingHelpersClassic
()
...
...
@@ -750,12 +704,13 @@ void GdbEngine::handleQueryDebuggingHelperClassic(const GdbResponse &response)
0
,
m_dumperHelper
.
typeCount
()).
arg
(
dumperVersion
);
showStatusMessage
(
successMsg
);
}
else
{
if
(
!
m_dumperInjectionLoad
)
// Retry if thread has not terminated yet.
m_debuggingHelperState
=
DebuggingHelperUnavailable
;
// Retry if thread has not terminated yet.
m_debuggingHelperState
=
DebuggingHelperUnavailable
;
showStatusMessage
(
tr
(
"Debugging helpers not found."
));
}
//qDebug() << m_dumperHelper.toString(true);
//qDebug() << m_availableSimpleDebuggingHelpers << "DATA DUMPERS AVAILABLE";
}
}
// namespace Internal
}
// namespace Debugger
src/plugins/debugger/gdb/gdbengine.cpp
View file @
ffd48ebd
...
...
@@ -80,9 +80,6 @@
#include <QtGui/QMessageBox>
#include <QtGui/QDialogButtonBox>
#include <QtGui/QPushButton>
#ifdef Q_OS_WIN
# include "shared/sharedlibraryinjector.h"
#endif
#ifdef Q_OS_UNIX
#include <unistd.h>
...
...
@@ -179,13 +176,7 @@ static QByteArray parsePlainConsoleStream(const GdbResponse &response)
//
///////////////////////////////////////////////////////////////////////
GdbEngine
::
GdbEngine
(
DebuggerManager
*
manager
)
:
IDebuggerEngine
(
manager
),
#ifdef Q_OS_WIN // Do injection loading with MinGW (call loading does not work with 64bit)
m_dumperInjectionLoad
(
true
)
#else
m_dumperInjectionLoad
(
false
)
#endif
GdbEngine
::
GdbEngine
(
DebuggerManager
*
manager
)
:
IDebuggerEngine
(
manager
)
{
m_trkOptions
=
QSharedPointer
<
TrkOptions
>
(
new
TrkOptions
);
m_trkOptions
->
fromSettings
(
Core
::
ICore
::
instance
()
->
settings
());
...
...
@@ -683,8 +674,6 @@ void GdbEngine::maybeHandleInferiorPidChanged(const QString &pid0)
debugMessage
(
_
(
"FOUND PID %1"
).
arg
(
pid
));
handleInferiorPidChanged
(
pid
);
if
(
m_dumperInjectionLoad
&&
!
hasPython
())
tryLoadDebuggingHelpersClassic
();
}
void
GdbEngine
::
postCommand
(
const
QByteArray
&
command
,
AdapterCallback
callback
,
...
...
@@ -1113,8 +1102,7 @@ void GdbEngine::handleAqcuiredInferior()
+ theDebuggerStringSetting(SelectedPluginBreakpointsPattern));
} else if (theDebuggerBoolSetting(NoPluginBreakpoints)) {
// should be like that already
if (!m_dumperInjectionLoad)
postCommand("set auto-solib-add off");
postCommand("set auto-solib-add off");
postCommand("set stop-on-solib-events 0");
}
#endif
...
...
src/plugins/debugger/gdb/gdbengine.h
View file @
ffd48ebd
...
...
@@ -264,6 +264,7 @@ private: ////////// Gdb Output, State & Capability Handling //////////
void
handleStop1
(
const
GdbMi
&
data
);
StackFrame
parseStackFrame
(
const
GdbMi
&
mi
,
int
level
);
bool
isSynchroneous
()
const
{
return
hasPython
();
}
virtual
bool
hasPython
()
const
;
bool
supportsThreads
()
const
;
...
...
@@ -481,7 +482,6 @@ private: ////////// Dumper Management //////////
Q_SLOT
void
setDebugDebuggingHelpersClassic
(
const
QVariant
&
on
);
Q_SLOT
void
setUseDebuggingHelpers
(
const
QVariant
&
on
);
const
bool
m_dumperInjectionLoad
;
DebuggingHelperState
m_debuggingHelperState
;
QtDumperHelper
m_dumperHelper
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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