Debugger: Split into core library and application.

- Add subfolder src/kits/debugger which contains the debugger's core
  functionality and lower layers. Correspondingly add headers/private/debugger
  for shared headers to be used by clients such as the Debugger application
  and eventual remote_debug_server. Adjust various files to account for
  differences as a result of the split and moves.
- Add libdebugger.so to minimal Jamfile.
This commit is contained in:
Rene Gollent
2016-06-04 13:18:39 -04:00
parent e6687e8f3d
commit fce4895d18
417 changed files with 492 additions and 390 deletions
@@ -0,0 +1,40 @@
/*
* Copyright 2009, Ingo Weinhold, [email protected].
* Copyright 2014, Rene Gollent, [email protected].
* Distributed under the terms of the MIT License.
*/
#ifndef SOURCE_LANGUAGE_H
#define SOURCE_LANGUAGE_H
#include <Referenceable.h>
class BString;
class ExpressionResult;
class SyntaxHighlighter;
class TeamTypeInformation;
class Type;
class ValueNode;
class ValueNodeManager;
class SourceLanguage : public BReferenceable {
public:
virtual ~SourceLanguage();
virtual const char* Name() const = 0;
virtual SyntaxHighlighter* GetSyntaxHighlighter() const;
// returns a reference,
// may return NULL, if not available
virtual status_t EvaluateExpression(const BString& expression,
ValueNodeManager* manager,
TeamTypeInformation* info,
ExpressionResult*& _output,
ValueNode*& _neededNode);
};
#endif // SOURCE_LANGUAGE_H
@@ -0,0 +1,58 @@
/*
* Copyright 2014, Rene Gollent, [email protected].
* Copyright 2009, Ingo Weinhold, [email protected].
* Distributed under the terms of the MIT License.
*/
#ifndef SYNTAX_HIGHLIGHTER_H
#define SYNTAX_HIGHLIGHTER_H
#include <String.h>
#include <Referenceable.h>
class LineDataSource;
class TeamTypeInformation;
enum syntax_highlight_type {
SYNTAX_HIGHLIGHT_NONE = 0,
SYNTAX_HIGHLIGHT_KEYWORD,
SYNTAX_HIGHLIGHT_PREPROCESSOR_KEYWORD,
SYNTAX_HIGHLIGHT_IDENTIFIER,
SYNTAX_HIGHLIGHT_OPERATOR,
SYNTAX_HIGHLIGHT_TYPE,
SYNTAX_HIGHLIGHT_NUMERIC_LITERAL,
SYNTAX_HIGHLIGHT_STRING_LITERAL,
SYNTAX_HIGHLIGHT_COMMENT
};
class SyntaxHighlightInfo {
public:
virtual ~SyntaxHighlightInfo();
virtual int32 GetLineHighlightRanges(int32 line,
int32* _columns,
syntax_highlight_type* _types,
int32 maxCount) = 0;
// Returns number of filled in
// (column, type) pairs.
// Default is (0, SYNTAX_HIGHLIGHT_NONE)
// and can be omitted.
};
class SyntaxHighlighter : public BReferenceable {
public:
virtual ~SyntaxHighlighter();
virtual status_t ParseText(LineDataSource* source,
TeamTypeInformation* typeInfo,
SyntaxHighlightInfo*& _info) = 0;
// caller owns the returned info
};
#endif // SYNTAX_HIGHLIGHTER_H
@@ -0,0 +1,28 @@
/*
* Copyright 2009, Ingo Weinhold, [email protected].
* Copyright 2014, Rene Gollent, [email protected].
* Distributed under the terms of the MIT License.
*/
#ifndef C_LANGUAGE_FAMILY_H
#define C_LANGUAGE_FAMILY_H
#include "SourceLanguage.h"
class CLanguageFamily : public SourceLanguage {
public:
CLanguageFamily();
virtual ~CLanguageFamily();
virtual SyntaxHighlighter* GetSyntaxHighlighter() const;
virtual status_t EvaluateExpression(const BString& expression,
ValueNodeManager* manager,
TeamTypeInformation* info,
ExpressionResult*& _output,
ValueNode*& _neededNode);
};
#endif // C_LANGUAGE_FAMILY_H
@@ -0,0 +1,21 @@
/*
* Copyright 2009, Ingo Weinhold, [email protected].
* Distributed under the terms of the MIT License.
*/
#ifndef CPP_LANGUAGE_H
#define CPP_LANGUAGE_H
#include "CLanguageFamily.h"
class CppLanguage : public CLanguageFamily {
public:
CppLanguage();
virtual ~CppLanguage();
virtual const char* Name() const;
};
#endif // CPP_LANGUAGE_H