File: LLDBReply.h

package info (click to toggle)
codelite 14.0%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 112,816 kB
  • sloc: cpp: 483,662; ansic: 150,144; php: 9,569; lex: 4,186; python: 3,417; yacc: 2,820; sh: 1,147; makefile: 52; xml: 13
file content (96 lines) | stat: -rw-r--r-- 3,941 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
//////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////
//
// copyright            : (C) 2014 Eran Ifrah
// file name            : LLDBReply.h
//
// -------------------------------------------------------------------------
// A
//              _____           _      _     _ _
//             /  __ \         | |    | |   (_) |
//             | /  \/ ___   __| | ___| |    _| |_ ___
//             | |    / _ \ / _  |/ _ \ |   | | __/ _ )
//             | \__/\ (_) | (_| |  __/ |___| | ||  __/
//              \____/\___/ \__,_|\___\_____/_|\__\___|
//
//                                                  F i l e
//
//    This program is free software; you can redistribute it and/or modify
//    it under the terms of the GNU General Public License as published by
//    the Free Software Foundation; either version 2 of the License, or
//    (at your option) any later version.
//
//////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////

#ifndef LLDBREPLY_H
#define LLDBREPLY_H

#include "JSON.h"
#include "LLDBEnums.h"
#include "LLDBBreakpoint.h"
#include "LLDBBacktrace.h"
#include "LLDBVariable.h"
#include "LLDBThread.h"
#include "LLDBPivot.h"

class LLDBReply
{
protected:
    int m_replyType;
    int m_interruptResaon;
    int m_line;
    wxString m_filename;
    LLDBBreakpoint::Vec_t m_breakpoints;
    LLDBBacktrace m_backtrace;
    LLDBVariable::Vect_t m_variables;
    LLDBThread::Vect_t m_threads;
    int m_lldbId;
    wxString m_expression;
    int m_debugSessionType;
    wxString m_text; // free text

public:
    LLDBReply()
        : m_replyType(kReplyTypeInvalid)
        , m_interruptResaon(kInterruptReasonNone)
        , m_line(wxNOT_FOUND)
        , m_lldbId(wxNOT_FOUND)
        , m_debugSessionType(kDebugSessionTypeNormal)
    {
    }

    LLDBReply(const wxString& str);
    virtual ~LLDBReply();

    void SetText(const wxString& text) { this->m_text = text; }
    const wxString& GetText() const { return m_text; }
    void UpdatePaths(const LLDBPivot& pivot);
    void SetDebugSessionType(int debugSessionType) { this->m_debugSessionType = debugSessionType; }
    int GetDebugSessionType() const { return m_debugSessionType; }
    void SetExpression(const wxString& expression) { this->m_expression = expression; }
    const wxString& GetExpression() const { return m_expression; }
    void SetThreads(const LLDBThread::Vect_t& threads) { this->m_threads = threads; }
    const LLDBThread::Vect_t& GetThreads() const { return m_threads; }
    void SetLldbId(int lldbId) { this->m_lldbId = lldbId; }
    int GetLldbId() const { return m_lldbId; }
    void SetVariables(const LLDBVariable::Vect_t& locals) { this->m_variables = locals; }
    const LLDBVariable::Vect_t& GetVariables() const { return m_variables; }
    void SetBacktrace(const LLDBBacktrace& backtrace) { this->m_backtrace = backtrace; }
    const LLDBBacktrace& GetBacktrace() const { return m_backtrace; }
    void SetBreakpoints(const LLDBBreakpoint::Vec_t& breakpoints) { this->m_breakpoints = breakpoints; }
    void SetInterruptResaon(int interruptResaon) { this->m_interruptResaon = interruptResaon; }
    const LLDBBreakpoint::Vec_t& GetBreakpoints() const { return m_breakpoints; }
    void SetReplyType(int replyType) { this->m_replyType = replyType; }
    int GetReplyType() const { return m_replyType; }
    void SetFilename(const wxString& filename) { this->m_filename = filename; }
    void SetLine(int line) { this->m_line = line; }
    const wxString& GetFilename() const { return m_filename; }
    int GetLine() const { return m_line; }
    int GetInterruptResaon() const { return m_interruptResaon; }
    // Serialization API
    JSONItem ToJSON() const;
    void FromJSON(const JSONItem& json);
};

#endif // LLDBREPLY_H