debugger: make parsing of cli-style commands in python more robust

This commit is contained in:
hjk
2010-07-15 11:37:06 +02:00
parent d747efed52
commit 9f8b5af3b2
4 changed files with 43 additions and 29 deletions

View File

@@ -46,6 +46,10 @@ namespace Internal {
static_cast<GdbEngine::AdapterCallback>(&CoreGdbAdapter::callback), \
STRINGIFY(callback)
#ifdef Q_OS_LINUX
# define EXE_FROM_CORE
#endif
///////////////////////////////////////////////////////////////////////
//
// CoreGdbAdapter
@@ -53,7 +57,7 @@ namespace Internal {
///////////////////////////////////////////////////////////////////////
CoreGdbAdapter::CoreGdbAdapter(GdbEngine *engine, QObject *parent)
: AbstractGdbAdapter(engine, parent)
: AbstractGdbAdapter(engine, parent), m_round(1)
{
}
@@ -94,6 +98,7 @@ void CoreGdbAdapter::setupInferior()
void CoreGdbAdapter::loadExeAndSyms()
{
QTC_ASSERT(state() == InferiorSetupRequested, qDebug() << state());
// Do that first, otherwise no symbols are loaded.
QFileInfo fi(m_executable);
QByteArray path = fi.absoluteFilePath().toLocal8Bit();
@@ -116,6 +121,7 @@ void CoreGdbAdapter::handleFileExecAndSymbols(const GdbResponse &response)
void CoreGdbAdapter::loadCoreFile()
{
QTC_ASSERT(state() == InferiorSetupRequested, qDebug() << state());
// Quoting core name below fails in gdb 6.8-debian.
QFileInfo fi(startParameters().coreFile);
QByteArray coreName = fi.absoluteFilePath().toLocal8Bit();