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,72 @@
|
||||
/*
|
||||
* Copyright 2009, Ingo Weinhold, [email protected].
|
||||
* Distributed under the terms of the MIT License.
|
||||
*/
|
||||
#ifndef DISASSEMBLED_CODE_H
|
||||
#define DISASSEMBLED_CODE_H
|
||||
|
||||
|
||||
#include <ObjectList.h>
|
||||
|
||||
#include "SourceCode.h"
|
||||
|
||||
|
||||
class BString;
|
||||
class ContiguousStatement;
|
||||
|
||||
|
||||
class DisassembledCode : public SourceCode {
|
||||
public:
|
||||
DisassembledCode(SourceLanguage* language);
|
||||
~DisassembledCode();
|
||||
|
||||
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;
|
||||
|
||||
Statement* StatementAtAddress(target_addr_t address) const;
|
||||
Statement* StatementAtLocation(
|
||||
const SourceLocation& location) const;
|
||||
TargetAddressRange StatementAddressRange() const;
|
||||
|
||||
// LineDataSource
|
||||
virtual int32 CountLines() const;
|
||||
virtual const char* LineAt(int32 index) const;
|
||||
virtual int32 LineLengthAt(int32 index) const;
|
||||
|
||||
public:
|
||||
bool AddCommentLine(const BString& line);
|
||||
bool AddInstructionLine(const BString& line,
|
||||
target_addr_t address, target_size_t size);
|
||||
// instructions must be added in
|
||||
// ascending address order
|
||||
|
||||
private:
|
||||
struct Line;
|
||||
|
||||
typedef BObjectList<Line> LineList;
|
||||
typedef BObjectList<ContiguousStatement> StatementList;
|
||||
|
||||
private:
|
||||
bool _AddLine(const BString& line,
|
||||
ContiguousStatement* statement);
|
||||
static int _CompareAddressStatement(
|
||||
const target_addr_t* address,
|
||||
const ContiguousStatement* statement);
|
||||
|
||||
private:
|
||||
SourceLanguage* fLanguage;
|
||||
LineList fLines;
|
||||
StatementList fStatements;
|
||||
};
|
||||
|
||||
|
||||
#endif // DISASSEMBLED_CODE_H
|
||||
Reference in New Issue
Block a user