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,105 @@
/*
* Copyright 2009, Ingo Weinhold, [email protected].
* Copyright 2013-2014, Rene Gollent, [email protected].
* Distributed under the terms of the MIT License.
*/
#ifndef SPECIFIC_IMAGE_DEBUG_INFO_H
#define SPECIFIC_IMAGE_DEBUG_INFO_H
#include <ObjectList.h>
#include <Referenceable.h>
#include "AddressSectionTypes.h"
#include "ReturnValueInfo.h"
#include "Types.h"
class Architecture;
class BString;
class CpuState;
class DataMember;
class DebuggerInterface;
class FileSourceCode;
class FunctionDebugInfo;
class FunctionInstance;
class GlobalTypeCache;
class Image;
class ImageInfo;
class LocatableFile;
class SourceLanguage;
class SourceLocation;
class StackFrame;
class Statement;
class SymbolInfo;
class Type;
class TypeLookupConstraints;
class ValueLocation;
class SpecificImageDebugInfo : public BReferenceable {
public:
virtual ~SpecificImageDebugInfo();
virtual status_t GetFunctions(
const BObjectList<SymbolInfo>& symbols,
BObjectList<FunctionDebugInfo>& functions)
= 0;
// returns references
virtual status_t GetType(GlobalTypeCache* cache,
const BString& name,
const TypeLookupConstraints& constraints,
Type*& _type) = 0;
// returns a reference
virtual bool HasType(const BString& name,
const TypeLookupConstraints& constraints)
const = 0;
virtual AddressSectionType GetAddressSectionType(target_addr_t address)
= 0;
virtual status_t CreateFrame(Image* image,
FunctionInstance* functionInstance,
CpuState* cpuState,
bool getFullFrameInfo,
ReturnValueInfoList* returnValueInfos,
StackFrame*& _Frame,
CpuState*& _previousCpuState) = 0;
// returns reference to previous frame
// and CPU state; returned CPU state
// can be NULL; can return B_UNSUPPORTED
// getFullFrameInfo: try to retrieve
// variables/parameters if true
// (and supported)
virtual status_t GetStatement(FunctionDebugInfo* function,
target_addr_t address,
Statement*& _statement) = 0;
// returns reference
virtual status_t GetStatementAtSourceLocation(
FunctionDebugInfo* function,
const SourceLocation& sourceLocation,
Statement*& _statement) = 0;
// returns reference
virtual status_t GetSourceLanguage(FunctionDebugInfo* function,
SourceLanguage*& _language) = 0;
virtual ssize_t ReadCode(target_addr_t address, void* buffer,
size_t size) = 0;
virtual status_t AddSourceCodeInfo(LocatableFile* file,
FileSourceCode* sourceCode) = 0;
protected:
static status_t GetFunctionsFromSymbols(
const BObjectList<SymbolInfo>& symbols,
BObjectList<FunctionDebugInfo>& functions,
DebuggerInterface* interface,
const ImageInfo& imageInfo,
SpecificImageDebugInfo* info);
};
#endif // SPECIFIC_IMAGE_DEBUG_INFO_H