gdbengine.h 19.8 KB
Newer Older
1
/**************************************************************************
con's avatar
con committed
2 3 4
**
** This file is part of Qt Creator
**
hjk's avatar
hjk committed
5
** Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
con's avatar
con committed
6
**
7
** Contact: Nokia Corporation (qt-info@nokia.com)
con's avatar
con committed
8
**
9
** Commercial Usage
10
**
11 12 13 14
** Licensees holding valid Qt Commercial licenses may use this file in
** accordance with the Qt Commercial License Agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
** a written agreement between you and Nokia.
15
**
16
** GNU Lesser General Public License Usage
17
**
18 19 20 21 22 23
** Alternatively, this file may be used under the terms of the GNU Lesser
** General Public License version 2.1 as published by the Free Software
** Foundation and appearing in the file LICENSE.LGPL included in the
** packaging of this file.  Please review the following information to
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
24
**
25
** If you are unsure which license is appropriate for your use, please
hjk's avatar
hjk committed
26
** contact the sales department at http://qt.nokia.com/contact.
con's avatar
con committed
27
**
28
**************************************************************************/
hjk's avatar
hjk committed
29

con's avatar
con committed
30 31 32
#ifndef DEBUGGER_GDBENGINE_H
#define DEBUGGER_GDBENGINE_H

33
#include "idebuggerengine.h"
hjk's avatar
hjk committed
34
#include "debuggermanager.h" // only for StartParameters
35
#include "gdbmi.h"
36
#include "watchutils.h"
37

con's avatar
con committed
38
#include <QtCore/QByteArray>
hjk's avatar
hjk committed
39
#include <QtCore/QFutureInterface>
con's avatar
con committed
40 41
#include <QtCore/QHash>
#include <QtCore/QMap>
42
#include <QtCore/QMultiMap>
con's avatar
con committed
43 44 45
#include <QtCore/QObject>
#include <QtCore/QProcess>
#include <QtCore/QPoint>
hjk's avatar
hjk committed
46
#include <QtCore/QSet>
47
#include <QtCore/QTextCodec>
48
#include <QtCore/QTime>
con's avatar
con committed
49
#include <QtCore/QVariant>
50
#include <QtCore/QSharedPointer>
con's avatar
con committed
51 52

QT_BEGIN_NAMESPACE
53 54
class QMainWindow;
class QMessageBox;
55
class QTimer;
con's avatar
con committed
56 57 58
QT_END_NAMESPACE

namespace Debugger {
59
class DebuggerManager;
con's avatar
con committed
60 61
namespace Internal {

hjk's avatar
hjk committed
62
class AbstractGdbAdapter;
hjk's avatar
hjk committed
63
class GdbResponse;
con's avatar
con committed
64 65 66
class GdbMi;

class BreakpointData;
67
class WatchData;
con's avatar
con committed
68

69 70
class AttachGdbAdapter;
class CoreGdbAdapter;
71 72
class PlainGdbAdapter;
class RemoteGdbAdapter;
73
class TrkGdbAdapter;
74

75
enum DebuggingHelperState
con's avatar
con committed
76
{
77 78 79 80
    DebuggingHelperUninitialized,
    DebuggingHelperLoadTried,
    DebuggingHelperAvailable,
    DebuggingHelperUnavailable,
con's avatar
con committed
81 82 83 84 85 86 87
};

class GdbEngine : public IDebuggerEngine
{
    Q_OBJECT

public:
88 89 90
    typedef QMultiMap<QString, int> GdbBinaryToolChainMap;
    typedef QSharedPointer<GdbBinaryToolChainMap> GdbBinaryToolChainMapPtr;

hjk's avatar
hjk committed
91
    explicit GdbEngine(DebuggerManager *manager);
con's avatar
con committed
92 93 94
    ~GdbEngine();

private:
95
    friend class AbstractGdbAdapter;
96 97
    friend class AttachGdbAdapter;
    friend class CoreGdbAdapter;
hjk's avatar
hjk committed
98
    friend class PlainGdbAdapter;
99
    friend class TermGdbAdapter;
100
    friend class RemoteGdbAdapter;
101
    friend class TrkGdbAdapter;
hjk's avatar
hjk committed
102

103
private: ////////// General Interface //////////
con's avatar
con committed
104

105
    virtual void addOptionPages(QList<Core::IOptionsPage*> *opts) const;
con's avatar
con committed
106

107 108
    virtual bool checkConfiguration(int toolChain, QString *errorMessage,
        QString *settingsPage = 0) const;
109
    virtual void startDebugger(const DebuggerStartParametersPtr &sp);
110
    virtual unsigned debuggerCapabilities() const;
111
    virtual void exitDebugger();
112
    virtual void abortDebugger();
113 114
    virtual void detachDebugger();
    virtual void shutdown();
con's avatar
con committed
115

116
    virtual void executeDebuggerCommand(const QString &command);
117
    virtual QString qtNamespace() const { return m_dumperHelper.qtNamespace(); }
con's avatar
con committed
118

119
private: ////////// General State //////////
con's avatar
con committed
120

121 122 123 124 125
    void initializeVariables();
    DebuggerStartMode startMode() const;
    const DebuggerStartParameters &startParameters() const
        { return *m_startParameters; }
    Q_SLOT void setAutoDerefPointers(const QVariant &on);
126

127
    DebuggerStartParametersPtr m_startParameters;
128
    bool m_registerNamesListed;
129

130
private: ////////// Gdb Process Management //////////
131

132 133
    AbstractGdbAdapter *createAdapter(const DebuggerStartParametersPtr &dp);
    void connectAdapter();
134 135 136
    bool startGdb(const QStringList &args = QStringList(),
                  const QString &gdb = QString(),
                  const QString &settingsIdHint = QString());
137
    void startInferiorPhase2();
138

Oswald Buddenhagen's avatar
Oswald Buddenhagen committed
139 140 141
    void handleInferiorShutdown(const GdbResponse &response);
    void handleGdbExit(const GdbResponse &response);

142 143 144 145
    void showDebuggerInput(int channel, const QString &msg)
        { m_manager->showDebuggerInput(channel, msg); }
    void showDebuggerOutput(int channel, const QString &msg)
        { m_manager->showDebuggerOutput(channel, msg); }
146

147
private slots:
Oswald Buddenhagen's avatar
Oswald Buddenhagen committed
148 149
    void handleGdbFinished(int, QProcess::ExitStatus status);
    void handleGdbError(QProcess::ProcessError error);
150 151 152
    void readGdbStandardOutput();
    void readGdbStandardError();
    void readDebugeeOutput(const QByteArray &data);
con's avatar
con committed
153

154
    void handleAdapterStarted();
155 156
    void handleAdapterStartFailed(const QString &msg,
        const QString &settingsIdHint = QString());
con's avatar
con committed
157

158 159
    void handleInferiorPrepared();

160 161 162
    void handleInferiorStartFailed(const QString &msg);

    void handleAdapterCrashed(const QString &msg);
con's avatar
con committed
163

164 165 166 167 168
private:
    QTextCodec *m_outputCodec;
    QTextCodec::ConverterState m_outputCodecState;

    QByteArray m_inbuffer;
169
    bool m_busy;
con's avatar
con committed
170

Oswald Buddenhagen's avatar
Oswald Buddenhagen committed
171
    QProcess m_gdbProc;
172 173 174 175
    AbstractGdbAdapter *m_gdbAdapter;

private: ////////// Gdb Command Management //////////

176
    public: // Otherwise the Qt flag macros are unhappy.
177 178
    enum GdbCommandFlag {
        NoFlags = 0,
179 180 181 182 183 184
        // The command needs a stopped inferior.
        NeedsStop = 1, 
        // No need to wait for the reply before continuing inferior.
        Discardable = 2,
        // Trigger watch model rebuild when no such commands are pending anymore.
        RebuildWatchModel = 4,
185
        WatchUpdate = Discardable | RebuildWatchModel,
186 187 188 189 190 191 192 193 194 195
        // We can live without recieving an answer.
        NonCriticalResponse = 8,
        // Callback expects GdbResultRunning instead of GdbResultDone.
        RunRequest = 16,
        // Callback expects GdbResultExit instead of GdbResultDone.
        ExitRequest = 32,
        // Auto-set inferior shutdown related states.
        LosesChild = 64,
        // Trigger breakpoint model rebuild when no such commands are pending anymore.
        RebuildBreakpointModel = 128,
196 197
        // This command needs to be send immediately.
        Immediate = 256,
198 199
    };
    Q_DECLARE_FLAGS(GdbCommandFlags, GdbCommandFlag)
200
    private:
201

hjk's avatar
hjk committed
202
    typedef void (GdbEngine::*GdbCommandCallback)
hjk's avatar
hjk committed
203
        (const GdbResponse &response);
hjk's avatar
hjk committed
204
    typedef void (AbstractGdbAdapter::*AdapterCallback)
hjk's avatar
hjk committed
205
        (const GdbResponse &response);
206 207 208

    struct GdbCommand
    {
hjk's avatar
hjk committed
209 210 211
        GdbCommand()
            : flags(0), callback(0), adapterCallback(0), callbackName(0)
        {}
212 213 214

        int flags;
        GdbCommandCallback callback;
hjk's avatar
hjk committed
215
        AdapterCallback adapterCallback;
216
        const char *callbackName;
217
        QByteArray command;
218
        QVariant cookie;
219
        QTime postTime;
220 221
    };

222
    // Type and cookie are sender-internal data, opaque for the "event
con's avatar
con committed
223
    // queue". resultNeeded == true increments m_pendingResults on
hjk's avatar
hjk committed
224
    // send and decrements on receipt, effectively preventing
con's avatar
con committed
225
    // watch model updates before everything is finished.
hjk's avatar
hjk committed
226
    void flushCommand(const GdbCommand &cmd);
227
    void postCommand(const QByteArray &command,
228 229 230 231
                     GdbCommandFlags flags,
                     GdbCommandCallback callback = 0,
                     const char *callbackName = 0,
                     const QVariant &cookie = QVariant());
232
    void postCommand(const QByteArray &command,
233 234 235
                     GdbCommandCallback callback = 0,
                     const char *callbackName = 0,
                     const QVariant &cookie = QVariant());
236
    void postCommand(const QByteArray &command,
hjk's avatar
hjk committed
237 238 239
                     AdapterCallback callback,
                     const char *callbackName,
                     const QVariant &cookie = QVariant());
240
    void postCommand(const QByteArray &command,
241 242 243 244
                     GdbCommandFlags flags,
                     AdapterCallback callback,
                     const char *callbackName,
                     const QVariant &cookie = QVariant());
hjk's avatar
hjk committed
245
    void postCommandHelper(const GdbCommand &cmd);
246
    void flushQueuedCommands();
247
    Q_SLOT void commandTimeout();
con's avatar
con committed
248 249
    void setTokenBarrier();

250
    QHash<int, GdbCommand> m_cookieForToken;
251
    int commandTimeoutTime() const;
252
    QTimer *m_commandTimer;
con's avatar
con committed
253

254 255
    QByteArray m_pendingConsoleStreamOutput;
    QByteArray m_pendingLogStreamOutput;
256

257
    // This contains the first token number for the current round
258 259 260
    // of evaluation. Responses with older tokens are considers
    // out of date and discarded.
    int m_oldestAcceptableToken;
con's avatar
con committed
261

262
    int m_pendingWatchRequests; // Watch updating commands in flight
263
    int m_pendingBreakpointRequests; // Watch updating commands in flight
hjk's avatar
hjk committed
264

265
    typedef void (GdbEngine::*CommandsDoneCallback)();
266
    // This function is called after all previous responses have been received.
267
    CommandsDoneCallback m_commandsDoneCallback;
hjk's avatar
hjk committed
268

269
    QList<GdbCommand> m_commandsToRunOnTemporaryBreak;
hjk's avatar
hjk committed
270
    int gdbVersion() const { return m_gdbVersion; }
271 272

private: ////////// Gdb Output, State & Capability Handling //////////
hjk's avatar
hjk committed
273

274
    void handleResponse(const QByteArray &buff);
275
    void handleStopResponse(const GdbMi &data);
276
    void handleResultRecord(GdbResponse *response);
hjk's avatar
hjk committed
277
    void handleStop1(const GdbResponse &response);
278
    void handleStop1(const GdbMi &data);
279 280
    StackFrame parseStackFrame(const GdbMi &mi, int level);

hjk's avatar
hjk committed
281
    bool isSynchroneous() const { return hasPython(); }
282
    virtual bool hasPython() const;
283 284 285
    bool supportsThreads() const;

    // Gdb initialization sequence
hjk's avatar
hjk committed
286
    void handleShowVersion(const GdbResponse &response);
287
    void handleHasPython(const GdbResponse &response);
con's avatar
con committed
288

289
    int m_gdbVersion; // 6.8.0 is 60800
290
    int m_gdbBuildVersion; // MAC only?
291
    bool m_isMacGdb;
292
    bool m_hasPython;
hjk's avatar
hjk committed
293

294
private: ////////// Inferior Management //////////
295

296
    // This should be always the last call in a function.
297
    Q_SLOT virtual void attemptBreakpointSynchronization();
298

hjk's avatar
hjk committed
299 300 301 302 303
    virtual void executeStep();
    virtual void executeStepOut();
    virtual void executeNext();
    virtual void executeStepI();
    virtual void executeNextI();
con's avatar
con committed
304

305 306 307 308
    void continueInferiorInternal();
    void autoContinueInferior();
    virtual void continueInferior();
    virtual void interruptInferior();
309
    void interruptInferiorTemporarily();
con's avatar
con committed
310

hjk's avatar
hjk committed
311 312
    virtual void executeRunToLine(const QString &fileName, int lineNumber);
    virtual void executeRunToFunction(const QString &functionName);
313
//    void handleExecRunToFunction(const GdbResponse &response);
hjk's avatar
hjk committed
314 315
    virtual void executeJumpToLine(const QString &fileName, int lineNumber);
    virtual void executeReturn();
con's avatar
con committed
316

hjk's avatar
hjk committed
317 318 319 320
    void handleExecuteContinue(const GdbResponse &response);
    void handleExecuteStep(const GdbResponse &response);
    void handleExecuteNext(const GdbResponse &response);
    void handleExecuteReturn(const GdbResponse &response);
con's avatar
con committed
321

322 323 324
    qint64 inferiorPid() const { return m_manager->inferiorPid(); }
    void handleInferiorPidChanged(qint64 pid) { manager()->notifyInferiorPidChanged(pid); }
    void maybeHandleInferiorPidChanged(const QString &pid);
con's avatar
con committed
325

326
#ifdef Q_OS_LINUX
327 328
    void handleInfoProc(const GdbResponse &response);

329 330
    QByteArray m_entryPoint;
#endif
hjk's avatar
hjk committed
331
    QFutureInterface<void> *m_progress;
332

333 334 335 336 337 338
private: ////////// View & Data Stuff //////////

    virtual void selectThread(int index);
    virtual void activateFrame(int index);

    void gotoLocation(const StackFrame &frame, bool setLocationMarker);
con's avatar
con committed
339 340 341 342

    //
    // Breakpoint specific stuff
    //
hjk's avatar
hjk committed
343
    void handleBreakList(const GdbResponse &response);
con's avatar
con committed
344
    void handleBreakList(const GdbMi &table);
hjk's avatar
hjk committed
345
    void handleBreakIgnore(const GdbResponse &response);
346
    void handleBreakDisable(const GdbResponse &response);
hjk's avatar
hjk committed
347
    void handleBreakInsert1(const GdbResponse &response);
348
    void handleBreakInsert2(const GdbResponse &response);
hjk's avatar
hjk committed
349 350
    void handleBreakCondition(const GdbResponse &response);
    void handleBreakInfo(const GdbResponse &response);
351
    void handleInfoLine(const GdbResponse &response);
con's avatar
con committed
352 353
    void extractDataFromInfoBreak(const QString &output, BreakpointData *data);
    void breakpointDataFromOutput(BreakpointData *data, const GdbMi &bkpt);
354
    QByteArray breakpointLocation(int index);
con's avatar
con committed
355
    void sendInsertBreakpoint(int index);
356
    QString breakLocation(const QString &file) const;
357
    void reloadBreakListInternal();
con's avatar
con committed
358 359 360 361

    //
    // Modules specific stuff
    //
362 363 364
    virtual void loadSymbols(const QString &moduleName);
    virtual void loadAllSymbols();
    virtual QList<Symbol> moduleSymbols(const QString &moduleName);
365
    virtual void reloadModules();
366
    void reloadModulesInternal();
hjk's avatar
hjk committed
367
    void handleModulesList(const GdbResponse &response);
con's avatar
con committed
368

369
    bool m_modulesListOutdated;
con's avatar
con committed
370

371 372 373 374 375 376 377 378 379
    //
    // Snapshot specific stuff
    //
    virtual void makeSnapshot();
    void handleMakeSnapshot(const GdbResponse &response);
    void handleActivateSnapshot(const GdbResponse &response);
    void activateSnapshot(int index);
    void activateSnapshot2();

con's avatar
con committed
380 381
    //
    // Register specific stuff
hjk's avatar
hjk committed
382
    //
383 384
    Q_SLOT virtual void reloadRegisters();
    virtual void setRegisterValue(int nr, const QString &value);
hjk's avatar
hjk committed
385 386
    void handleRegisterListNames(const GdbResponse &response);
    void handleRegisterListValues(const GdbResponse &response);
con's avatar
con committed
387

388 389 390
    //
    // Disassembler specific stuff
    //
391
    virtual void fetchDisassembler(DisassemblerViewAgent *agent);
392 393
    void fetchDisassemblerByAddress(DisassemblerViewAgent *agent,
        bool useMixedMode);
394 395 396 397
    void fetchDisassemblerByCli(DisassemblerViewAgent *agent,
        bool useMixedMode);
    void fetchDisassemblerByAddressCli(DisassemblerViewAgent *agent);
    void handleFetchDisassemblerByCli(const GdbResponse &response);
398 399 400 401 402
    void handleFetchDisassemblerByLine(const GdbResponse &response);
    void handleFetchDisassemblerByAddress1(const GdbResponse &response);
    void handleFetchDisassemblerByAddress0(const GdbResponse &response);
    QString parseDisassembler(const GdbMi &lines);

403 404
    //
    // Source file specific stuff
hjk's avatar
hjk committed
405
    //
406
    virtual void reloadSourceFiles();
407
    void reloadSourceFilesInternal();
408 409 410
    void handleQuerySources(const GdbResponse &response);

    QString fullName(const QString &fileName);
411 412 413 414 415
#ifdef Q_OS_WIN
    QString cleanupFullName(const QString &fileName);
#else
    QString cleanupFullName(const QString &fileName) { return fileName; }
#endif
416 417 418 419

    // awful hack to keep track of used files
    QMap<QString, QString> m_shortToFullName;
    QMap<QString, QString> m_fullToShortName;
con's avatar
con committed
420

421
    void invalidateSourcesList();
422 423
    bool m_sourcesListOutdated;
    bool m_sourcesListUpdating;
424
    bool m_breakListOutdated;
425

con's avatar
con committed
426 427
    //
    // Stack specific stuff
hjk's avatar
hjk committed
428
    //
429
    void updateAll();
430 431
        void updateAllClassic();
        void updateAllPython();
hjk's avatar
hjk committed
432 433
    void handleStackListFrames(const GdbResponse &response);
    void handleStackSelectThread(const GdbResponse &response);
434
    void handleStackSelectFrame(const GdbResponse &response);
hjk's avatar
hjk committed
435
    void handleStackListThreads(const GdbResponse &response);
hjk's avatar
hjk committed
436
    Q_SLOT void reloadStack(bool forceGotoLocation);
437
    Q_SLOT virtual void reloadFullStack();
438
    int currentFrame() const;
con's avatar
con committed
439

440 441
    QList<GdbMi> m_currentFunctionArgs;
    QString m_currentFrame;
con's avatar
con committed
442 443

    //
444
    // Watch specific stuff
hjk's avatar
hjk committed
445
    //
hjk's avatar
hjk committed
446 447
    virtual void setToolTipExpression(const QPoint &mousePos,
        TextEditor::ITextEditor *editor, int cursorPos);
con's avatar
con committed
448

449 450
    virtual void assignValueInDebugger(const QString &expr, const QString &value);

451 452
    virtual void fetchMemory(MemoryViewAgent *agent, QObject *token,
        quint64 addr, quint64 length);
453 454 455 456
    void handleFetchMemory(const GdbResponse &response);

    virtual void watchPoint(const QPoint &);
    void handleWatchPoint(const GdbResponse &response);
con's avatar
con committed
457 458

    // FIXME: BaseClass. called to improve situation for a watch item
459
    void updateSubItemClassic(const WatchData &data);
460 461
    void handleChildren(const WatchData &parent, const GdbMi &child,
        QList<WatchData> *insertions);
con's avatar
con committed
462

463
    void virtual updateWatchData(const WatchData &data);
464
    Q_SLOT void updateWatchDataHelper(const WatchData &data);
465
    void rebuildWatchModel();
466
    bool showToolTip();
con's avatar
con committed
467 468 469

    void insertData(const WatchData &data);
    void sendWatchParameters(const QByteArray &params0);
470
    void createGdbVariableClassic(const WatchData &data);
con's avatar
con committed
471

472 473
    void runDebuggingHelperClassic(const WatchData &data, bool dumpChildren);
    void runDirectDebuggingHelperClassic(const WatchData &data, bool dumpChildren);
474
    bool hasDebuggingHelperForType(const QString &type) const;
con's avatar
con committed
475

476 477
    void handleVarListChildrenClassic(const GdbResponse &response);
    void handleVarListChildrenHelperClassic(const GdbMi &child,
478
        const WatchData &parent);
hjk's avatar
hjk committed
479 480
    void handleVarCreate(const GdbResponse &response);
    void handleVarAssign(const GdbResponse &response);
481
    void handleEvaluateExpressionClassic(const GdbResponse &response);
482 483 484
    void handleQueryDebuggingHelperClassic(const GdbResponse &response);
    void handleDebuggingHelperValue2Classic(const GdbResponse &response);
    void handleDebuggingHelperValue3Classic(const GdbResponse &response);
hjk's avatar
hjk committed
485 486
    void handleDebuggingHelperEditValue(const GdbResponse &response);
    void handleDebuggingHelperSetup(const GdbResponse &response);
487

488 489 490
    Q_SLOT void createFullBacktrace();
    void handleCreateFullBacktrace(const GdbResponse &response);

491
    void updateLocals(const QVariant &cookie = QVariant());
492 493 494
        void updateLocalsClassic(const QVariant &cookie);
        void updateLocalsPython(const QByteArray &varList);
            void handleStackFramePython(const GdbResponse &response);
495

496 497 498
    void handleStackListLocalsClassic(const GdbResponse &response);
    void handleStackListLocalsPython(const GdbResponse &response);

499 500 501 502
    WatchData localVariable(const GdbMi &item,
                            const QStringList &uninitializedVariables,
                            QMap<QByteArray, int> *seen);
    void setLocals(const QList<GdbMi> &locals);
503
    void handleStackListArgumentsClassic(const GdbResponse &response);
con's avatar
con committed
504
    void setWatchDataType(WatchData &data, const GdbMi &mi);
505
    void setWatchDataDisplayedType(WatchData &data, const GdbMi &mi);
con's avatar
con committed
506

507
    QSet<QByteArray> m_processedNames;
con's avatar
con committed
508 509
    QMap<QString, QString> m_varToType;

510
private: ////////// Dumper Management //////////
511 512
    QString qtDumperLibraryName() const;
    bool checkDebuggingHelpers();
513 514 515 516 517
        bool checkDebuggingHelpersClassic();
    void setDebuggingHelperStateClassic(DebuggingHelperState);
    void tryLoadDebuggingHelpersClassic();
    void tryQueryDebuggingHelpersClassic();
    Q_SLOT void recheckDebuggingHelperAvailabilityClassic();
518 519
    void connectDebuggingHelperActions();
    void disconnectDebuggingHelperActions();
520
    Q_SLOT void setDebugDebuggingHelpersClassic(const QVariant &on);
521
    Q_SLOT void setUseDebuggingHelpers(const QVariant &on);
522

523
    const GdbBinaryToolChainMapPtr m_gdbBinaryToolChainMap;
524 525
    DebuggingHelperState m_debuggingHelperState;
    QtDumperHelper m_dumperHelper;
526
    QString m_gdb;
527

528
private: ////////// Convenience Functions //////////
hjk's avatar
hjk committed
529

530
    QString errorMessage(QProcess::ProcessError error);
531 532
    QMessageBox *showMessageBox(int icon, const QString &title, const QString &text,
        int buttons = 0);
533
    void debugMessage(const QString &msg);
534
    QMainWindow *mainWindow() const;
535

536 537 538
    static QString m_toolTipExpression;
    static QPoint m_toolTipPos;
    static QByteArray tooltipINameForExpression(const QByteArray &exp);
539

540
    static void setWatchDataValue(WatchData &data, const GdbMi &item);
541 542 543 544 545 546 547
    static void setWatchDataValueToolTip(WatchData &data, const GdbMi &mi,
            int encoding = 0);
    static void setWatchDataChildCount(WatchData &data, const GdbMi &mi);
    static void setWatchDataValueEnabled(WatchData &data, const GdbMi &mi);
    static void setWatchDataValueEditable(WatchData &data, const GdbMi &mi);
    static void setWatchDataExpression(WatchData &data, const GdbMi &mi);
    static void setWatchDataAddress(WatchData &data, const GdbMi &mi);
548
    static void setWatchDataAddressHelper(WatchData &data, const QByteArray &addr);
con's avatar
con committed
549 550 551 552 553
};

} // namespace Internal
} // namespace Debugger

554 555
Q_DECLARE_OPERATORS_FOR_FLAGS(Debugger::Internal::GdbEngine::GdbCommandFlags)

con's avatar
con committed
556
#endif // DEBUGGER_GDBENGINE_H