Debugger: Use LD_PRELOAD to load debugging helper.

on UNIX. Either set the LD_PRELOAD environment variable
using a gdb command or have the TermGdbAdapter set the
variable for the debuggee. For the remote adapter,
switch on toolchain. dlopen() is a fallback for
platforms where it is not supported and attaching
to running processes. Fixes a crash with gdb 7.0
(and spurious gdb 6.8 crashes with dlopen()).
Reviewed-by: hjk <qtc-committer@nokia.com>
This commit is contained in:
Friedemann Kleint
2009-11-03 14:06:21 +01:00
parent e68753b48b
commit 10e07e01c7
12 changed files with 120 additions and 45 deletions

View File

@@ -46,9 +46,9 @@ class RemoteGdbAdapter : public AbstractGdbAdapter
Q_OBJECT
public:
RemoteGdbAdapter(GdbEngine *engine, QObject *parent = 0);
RemoteGdbAdapter(GdbEngine *engine, int toolChainType, QObject *parent = 0);
bool dumpersAvailable() const { return true; }
virtual DumperHandling dumperHandling() const;
void startAdapter();
void startInferior();
@@ -67,6 +67,8 @@ private:
void handleFileExecAndSymbols(const GdbResponse &response);
void handleTargetRemote(const GdbResponse &response);
const int m_toolChainType;
QProcess m_uploadProc;
};