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:
@@ -0,0 +1,62 @@
|
||||
/*
|
||||
* Copyright 2009, Ingo Weinhold, [email protected].
|
||||
* Distributed under the terms of the MIT License.
|
||||
*/
|
||||
#ifndef FILE_SOURCE_CODE_H
|
||||
#define FILE_SOURCE_CODE_H
|
||||
|
||||
|
||||
#include <Locker.h>
|
||||
|
||||
#include <Array.h>
|
||||
|
||||
#include "SourceCode.h"
|
||||
|
||||
|
||||
class LocatableFile;
|
||||
class SourceFile;
|
||||
|
||||
|
||||
class FileSourceCode : public SourceCode {
|
||||
public:
|
||||
FileSourceCode(LocatableFile* file,
|
||||
SourceFile* sourceFile,
|
||||
SourceLanguage* language);
|
||||
virtual ~FileSourceCode();
|
||||
|
||||
status_t Init();
|
||||
status_t AddSourceLocation(
|
||||
const SourceLocation& location);
|
||||
|
||||
virtual bool Lock();
|
||||
virtual void Unlock();
|
||||
|
||||
virtual SourceLanguage* GetSourceLanguage() const;
|
||||
|
||||
virtual bool GetStatementLocationRange(
|
||||
const SourceLocation& location,
|
||||
SourceLocation& _start,
|
||||
SourceLocation& _end) const;
|
||||
|
||||
virtual LocatableFile* GetSourceFile() const;
|
||||
|
||||
// LineDataSource
|
||||
virtual int32 CountLines() const;
|
||||
virtual const char* LineAt(int32 index) const;
|
||||
virtual int32 LineLengthAt(int32 index) const;
|
||||
|
||||
private:
|
||||
int32 _FindSourceLocationIndex(
|
||||
const SourceLocation& location,
|
||||
bool& _foundMatch) const;
|
||||
|
||||
private:
|
||||
BLocker fLock;
|
||||
LocatableFile* fFile;
|
||||
SourceFile* fSourceFile;
|
||||
SourceLanguage* fLanguage;
|
||||
Array<SourceLocation> fSourceLocations;
|
||||
};
|
||||
|
||||
|
||||
#endif // FILE_BASED_SOURCE_CODE_H
|
||||
Reference in New Issue
Block a user