Index: include/lldb/Bindings/LLDBBinding.h =================================================================== --- include/lldb/Bindings/LLDBBinding.h +++ include/lldb/Bindings/LLDBBinding.h @@ -0,0 +1,57 @@ +//===-- LLDBBinding.h -------------------------------------------*- C++ -*-===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +#ifndef LLDB_LLDBBinding_h_ +#define LLDB_LLDBBinding_h_ + +// C Includes +// C++ Includes +// Other libraries and framework includes +// Project includes +#include "lldb/Bindings/SBBindingDefines.h" +#include "lldb/Bindings/SBAddressBinding.h" +#include "lldb/Bindings/SBBlockBinding.h" +#include "lldb/Bindings/SBBreakpointBinding.h" +#include "lldb/Bindings/SBBreakpointLocationBinding.h" +#include "lldb/Bindings/SBBroadcasterBinding.h" +#include "lldb/Bindings/SBCommandInterpreterBinding.h" +#include "lldb/Bindings/SBCommandReturnObjectBinding.h" +#include "lldb/Bindings/SBCommunicationBinding.h" +#include "lldb/Bindings/SBCompileUnitBinding.h" +#include "lldb/Bindings/SBDataBinding.h" +#include "lldb/Bindings/SBDebuggerBinding.h" +#include "lldb/Bindings/SBDeclarationBinding.h" +#include "lldb/Bindings/SBErrorBinding.h" +#include "lldb/Bindings/SBEventBinding.h" +#include "lldb/Bindings/SBExecutionContextBinding.h" +#include "lldb/Bindings/SBFileSpecBinding.h" +#include "lldb/Bindings/SBFrameBinding.h" +#include "lldb/Bindings/SBFunctionBinding.h" +#include "lldb/Bindings/SBHostOSBinding.h" +#include "lldb/Bindings/SBInstructionBinding.h" +#include "lldb/Bindings/SBInstructionListBinding.h" +#include "lldb/Bindings/SBLineEntryBinding.h" +#include "lldb/Bindings/SBListenerBinding.h" +#include "lldb/Bindings/SBModuleBinding.h" +#include "lldb/Bindings/SBProcessBinding.h" +#include "lldb/Bindings/SBQueueBinding.h" +#include "lldb/Bindings/SBQueueItemBinding.h" +#include "lldb/Bindings/SBSourceManagerBinding.h" +#include "lldb/Bindings/SBStreamBinding.h" +#include "lldb/Bindings/SBStringListBinding.h" +#include "lldb/Bindings/SBSymbolBinding.h" +#include "lldb/Bindings/SBSymbolContextBinding.h" +#include "lldb/Bindings/SBTargetBinding.h" +#include "lldb/Bindings/SBThreadBinding.h" +#include "lldb/Bindings/SBTypeBinding.h" +#include "lldb/Bindings/SBValueBinding.h" +#include "lldb/Bindings/SBValueListBinding.h" +#include "lldb/Bindings/SBVariablesOptionsBinding.h" + +#endif // LLDB_LLDBBinding_h_ Index: include/lldb/Bindings/SBAddressBinding.h =================================================================== --- include/lldb/Bindings/SBAddressBinding.h +++ include/lldb/Bindings/SBAddressBinding.h @@ -0,0 +1,67 @@ +//===-- SBAddressBinding.h --------------------------------------*- C++ -*-===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +#ifndef LLDB_SBAddressBinding_h_ +#define LLDB_SBAddressBinding_h_ + +#include "lldb/Bindings/SBBindingDefines.h" + +#ifdef __cplusplus +extern "C" { +#endif + +LLDB_API LLDBSBAddressRef LLDBCreateSBAddress(); + +LLDB_API LLDBSBAddressRef LLDBCreateSBAddress2(LLDBSBSectionRef section, lldb::addr_t offset); + +LLDB_API LLDBSBAddressRef LLDBCreateSBAddress3(lldb::addr_t load_addr, LLDBSBTargetRef target); + +LLDB_API void LLDBDisposeSBAddress(LLDBSBAddressRef instance); + +LLDB_API bool LLDBSBAddressIsValid(LLDBSBAddressRef instance); + +LLDB_API void LLDBSBAddressClear(LLDBSBAddressRef instance); + +LLDB_API unsigned long long LLDBSBAddressGetFileAddress(LLDBSBAddressRef instance); + +LLDB_API unsigned long long LLDBSBAddressGetLoadAddress(LLDBSBAddressRef instance, LLDBSBTargetRef target); + +LLDB_API void LLDBSBAddressSetAddress(LLDBSBAddressRef instance, LLDBSBSectionRef section, lldb::addr_t offset); + +LLDB_API void LLDBSBAddressSetLoadAddress(LLDBSBAddressRef instance, lldb::addr_t load_addr, LLDBSBTargetRef target); + +LLDB_API bool LLDBSBAddressOffsetAddress(LLDBSBAddressRef instance, lldb::addr_t offset); + +LLDB_API bool LLDBSBAddressGetDescription(LLDBSBAddressRef instance, LLDBSBStreamRef description); + +LLDB_API LLDBSBSymbolContextRef LLDBSBAddressGetSymbolContext(LLDBSBAddressRef instance, uint32_t resolve_scope); + +LLDB_API LLDBSBSectionRef LLDBSBAddressGetSection(LLDBSBAddressRef instance); + +LLDB_API unsigned long long LLDBSBAddressGetOffset(LLDBSBAddressRef instance); + +LLDB_API LLDBSBModuleRef LLDBSBAddressGetModule(LLDBSBAddressRef instance); + +LLDB_API LLDBSBCompileUnitRef LLDBSBAddressGetCompileUnit(LLDBSBAddressRef instance); + +LLDB_API LLDBSBFunctionRef LLDBSBAddressGetFunction(LLDBSBAddressRef instance); + +LLDB_API LLDBSBBlockRef LLDBSBAddressGetBlock(LLDBSBAddressRef instance); + +LLDB_API LLDBSBSymbolRef LLDBSBAddressGetSymbol(LLDBSBAddressRef instance); + +LLDB_API LLDBSBLineEntryRef LLDBSBAddressGetLineEntry(LLDBSBAddressRef instance); + +LLDB_API LLDBAddressClass LLDBSBAddressGetAddressClass(LLDBSBAddressRef instance); + +#ifdef __cplusplus +} +#endif + +#endif // LLDB_SBAddressBinding_h_ Index: include/lldb/Bindings/SBAttachInfoBinding.h =================================================================== --- include/lldb/Bindings/SBAttachInfoBinding.h +++ include/lldb/Bindings/SBAttachInfoBinding.h @@ -0,0 +1,89 @@ +//===-- SBAttachInfoBinding.h -----------------------------------*- C++ -*-===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +#ifndef LLDB_SBAttachInfoBinding_h_ +#define LLDB_SBAttachInfoBinding_h_ + +#include "lldb/Bindings/SBBindingDefines.h" + +#ifdef __cplusplus +extern "C" { +#endif + +LLDB_API LLDBSBAttachInfoRef LLDBCreateSBAttachInfo(); + +LLDB_API LLDBSBAttachInfoRef LLDBCreateSBAttachInfo2(lldb::pid_t pid); + +LLDB_API LLDBSBAttachInfoRef LLDBCreateSBAttachInfo3(const char *path, bool wait_for); + +LLDB_API void LLDBDisposeSBAttachInfo(LLDBSBAttachInfoRef instance); + +LLDB_API unsigned long long LLDBSBAttachInfoGetProcessID(LLDBSBAttachInfoRef instance); + +LLDB_API void LLDBSBAttachInfoSetProcessID(LLDBSBAttachInfoRef instance, lldb::pid_t pid); + +LLDB_API void LLDBSBAttachInfoSetExecutable(LLDBSBAttachInfoRef instance, const char *path); + +LLDB_API void LLDBSBAttachInfoSetExecutable2(LLDBSBAttachInfoRef instance, LLDBSBFileSpecRef exe_file); + +LLDB_API bool LLDBSBAttachInfoGetWaitForLaunch(LLDBSBAttachInfoRef instance); + +LLDB_API void LLDBSBAttachInfoSetWaitForLaunch(LLDBSBAttachInfoRef instance, bool b); + +LLDB_API bool LLDBSBAttachInfoGetIgnoreExisting(LLDBSBAttachInfoRef instance); + +LLDB_API void LLDBSBAttachInfoSetIgnoreExisting(LLDBSBAttachInfoRef instance, bool b); + +LLDB_API unsigned int LLDBSBAttachInfoGetResumeCount(LLDBSBAttachInfoRef instance); + +LLDB_API void LLDBSBAttachInfoSetResumeCount(LLDBSBAttachInfoRef instance, uint32_t c); + +LLDB_API const char *LLDBSBAttachInfoGetProcessPluginName(LLDBSBAttachInfoRef instance); + +LLDB_API void LLDBSBAttachInfoSetProcessPluginName(LLDBSBAttachInfoRef instance, const char *plugin_name); + +LLDB_API unsigned int LLDBSBAttachInfoGetUserID(LLDBSBAttachInfoRef instance); + +LLDB_API unsigned int LLDBSBAttachInfoGetGroupID(LLDBSBAttachInfoRef instance); + +LLDB_API bool LLDBSBAttachInfoUserIDIsValid(LLDBSBAttachInfoRef instance); + +LLDB_API bool LLDBSBAttachInfoGroupIDIsValid(LLDBSBAttachInfoRef instance); + +LLDB_API void LLDBSBAttachInfoSetUserID(LLDBSBAttachInfoRef instance, uint32_t uid); + +LLDB_API void LLDBSBAttachInfoSetGroupID(LLDBSBAttachInfoRef instance, uint32_t gid); + +LLDB_API unsigned int LLDBSBAttachInfoGetEffectiveUserID(LLDBSBAttachInfoRef instance); + +LLDB_API unsigned int LLDBSBAttachInfoGetEffectiveGroupID(LLDBSBAttachInfoRef instance); + +LLDB_API bool LLDBSBAttachInfoEffectiveUserIDIsValid(LLDBSBAttachInfoRef instance); + +LLDB_API bool LLDBSBAttachInfoEffectiveGroupIDIsValid(LLDBSBAttachInfoRef instance); + +LLDB_API void LLDBSBAttachInfoSetEffectiveUserID(LLDBSBAttachInfoRef instance, uint32_t uid); + +LLDB_API void LLDBSBAttachInfoSetEffectiveGroupID(LLDBSBAttachInfoRef instance, uint32_t gid); + +LLDB_API unsigned long long LLDBSBAttachInfoGetParentProcessID(LLDBSBAttachInfoRef instance); + +LLDB_API void LLDBSBAttachInfoSetParentProcessID(LLDBSBAttachInfoRef instance, lldb::pid_t pid); + +LLDB_API bool LLDBSBAttachInfoParentProcessIDIsValid(LLDBSBAttachInfoRef instance); + +LLDB_API LLDBSBListenerRef LLDBSBAttachInfoGetListener(LLDBSBAttachInfoRef instance); + +LLDB_API void LLDBSBAttachInfoSetListener(LLDBSBAttachInfoRef instance, LLDBSBListenerRef listener); + +#ifdef __cplusplus +} +#endif + +#endif // LLDB_SBAttachInfoBinding_h_ Index: include/lldb/Bindings/SBBindingDefines.h =================================================================== --- include/lldb/Bindings/SBBindingDefines.h +++ include/lldb/Bindings/SBBindingDefines.h @@ -0,0 +1,131 @@ +//===-- SBBindingDefines.h --- ----------------------------------*- C++ -*-===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +#ifndef LLDB_SBBindingDefines_h_ +#define LLDB_SBBindingDefines_h_ + +// C Includes +// C++ Includes +// Other libraries and framework includes +// Project includes + +#include "lldb/lldb-enumerations.h" +#include "lldb/lldb-defines.h" +#include "lldb/lldb-forward.h" +#include "lldb/lldb-types.h" + +LLDB_API typedef struct LLDBSBAddressOpaque *LLDBSBAddressRef; +LLDB_API typedef struct LLDBSBAttachInfoOpaque *LLDBSBAttachInfoRef; +LLDB_API typedef struct LLDBSBBlockOpaque *LLDBSBBlockRef; +LLDB_API typedef struct LLDBSBBreakpointOpaque *LLDBSBBreakpointRef; +LLDB_API typedef struct LLDBSBBreakpointLocationOpaque *LLDBSBBreakpointLocationRef; +LLDB_API typedef struct LLDBSBBroadcasterOpaque *LLDBSBBroadcasterRef; +LLDB_API typedef struct LLDBSBCommandOpaque *LLDBSBCommandRef; +LLDB_API typedef struct LLDBSBCommandInterpreterOpaque *LLDBSBCommandInterpreterRef; +LLDB_API typedef struct LLDBSBCommandInterpreterRunOptionsOpaque *LLDBSBCommandInterpreterRunOptionsRef; +LLDB_API typedef struct LLDBSBCommandPluginInterfaceOpaque *LLDBSBCommandPluginInterfaceRef; +LLDB_API typedef struct LLDBSBCommandReturnObjectOpaque *LLDBSBCommandReturnObjectRef; +LLDB_API typedef struct LLDBSBCommunicationOpaque *LLDBSBCommunicationRef; +LLDB_API typedef struct LLDBSBCompileUnitOpaque *LLDBSBCompileUnitRef; +LLDB_API typedef struct LLDBSBDataOpaque *LLDBSBDataRef; +LLDB_API typedef struct LLDBSBDebuggerOpaque *LLDBSBDebuggerRef; +LLDB_API typedef struct LLDBSBDeclarationOpaque *LLDBSBDeclarationRef; +LLDB_API typedef struct LLDBSBErrorOpaque *LLDBSBErrorRef; +LLDB_API typedef struct LLDBSBEventOpaque *LLDBSBEventRef; +LLDB_API typedef struct LLDBSBEventListOpaque *LLDBSBEventListRef; +LLDB_API typedef struct LLDBSBExecutionContextOpaque *LLDBSBExecutionContextRef; +LLDB_API typedef struct LLDBSBExpressionOptionsOpaque *LLDBSBExpressionOptionsRef; +LLDB_API typedef struct LLDBSBFileSpecOpaque *LLDBSBFileSpecRef; +LLDB_API typedef struct LLDBSBFileSpecListOpaque *LLDBSBFileSpecListRef; +LLDB_API typedef struct LLDBSBFrameOpaque *LLDBSBFrameRef; +LLDB_API typedef struct LLDBSBFunctionOpaque *LLDBSBFunctionRef; +LLDB_API typedef struct LLDBSBHostOSOpaque *LLDBSBHostOSRef; +LLDB_API typedef struct LLDBSBInstructionOpaque *LLDBSBInstructionRef; +LLDB_API typedef struct LLDBSBInstructionListOpaque *LLDBSBInstructionListRef; +LLDB_API typedef struct LLDBSBLaunchInfoOpaque *LLDBSBLaunchInfoRef; +LLDB_API typedef struct LLDBSBLineEntryOpaque *LLDBSBLineEntryRef; +LLDB_API typedef struct LLDBSBListenerOpaque *LLDBSBListenerRef; +LLDB_API typedef struct LLDBSBModuleOpaque *LLDBSBModuleRef; +LLDB_API typedef struct LLDBSBModuleSpecOpaque *LLDBSBModuleSpecRef; +LLDB_API typedef struct LLDBSBModuleSpecListOpaque *LLDBSBModuleSpecListRef; +LLDB_API typedef struct LLDBSBPlatformOpaque *LLDBSBPlatformRef; +LLDB_API typedef struct LLDBSBProcessOpaque *LLDBSBProcessRef; +LLDB_API typedef struct LLDBSBQueueOpaque *LLDBSBQueueRef; +LLDB_API typedef struct LLDBSBQueueItemOpaque *LLDBSBQueueItemRef; +LLDB_API typedef struct LLDBSBSectionOpaque *LLDBSBSectionRef; +LLDB_API typedef struct LLDBSBSourceManagerOpaque *LLDBSBSourceManagerRef; +LLDB_API typedef struct LLDBSBStreamOpaque *LLDBSBStreamRef; +LLDB_API typedef struct LLDBSBStringListOpaque *LLDBSBStringListRef; +LLDB_API typedef struct LLDBSBSymbolOpaque *LLDBSBSymbolRef; +LLDB_API typedef struct LLDBSBSymbolContextOpaque *LLDBSBSymbolContextRef; +LLDB_API typedef struct LLDBSBSymbolContextListOpaque *LLDBSBSymbolContextListRef; +LLDB_API typedef struct LLDBSBTargetRefOpaque *LLDBSBTargetRef; +LLDB_API typedef struct LLDBSBThreadRefOpaque *LLDBSBThreadRef; +LLDB_API typedef struct LLDBSBThreadCollectionOpaque *LLDBSBThreadCollectionRef; +LLDB_API typedef struct LLDBSBThreadPlanOpaque *LLDBSBThreadPlanRef; +LLDB_API typedef struct LLDBSBTypeOpaque *LLDBSBTypeRef; +LLDB_API typedef struct LLDBSBTypeMemberOpaque *LLDBSBTypeMemberRef; +LLDB_API typedef struct LLDBSBTypeCategoryOpaque *LLDBSBTypeCategoryRef; +LLDB_API typedef struct LLDBSBTypeEnumMemberOpaque *LLDBSBTypeEnumMemberRef; +LLDB_API typedef struct LLDBSBTypeEnumMemberListOpaque *LLDBSBTypeEnumMemberListRef; +LLDB_API typedef struct LLDBSBTypeFilterOpaque *LLDBSBTypeFilterRef; +LLDB_API typedef struct LLDBSBTypeFormatOpaque *LLDBSBTypeFormatRef; +LLDB_API typedef struct LLDBSBTypeMemberFunctionOpaque *LLDBSBTypeMemberFunctionRef; +LLDB_API typedef struct LLDBSBTypeNameSpecifierOpaque *LLDBSBTypeNameSpecifierRef; +LLDB_API typedef struct LLDBSBTypeSummaryOpaque *LLDBSBTypeSummaryRef; +LLDB_API typedef struct LLDBSBTypeSummaryOptionsOpaque *LLDBSBTypeSummaryOptionsRef; +LLDB_API typedef struct LLDBSBInputReaderOpaque *LLDBSBInputReaderRef; +LLDB_API typedef struct LLDBSBPlatformConnectOptionsOpaque *LLDBSBPlatformConnectOptionsRef; +LLDB_API typedef struct LLDBSBPlatformShellCommandOpaque *LLDBSBPlatformShellCommandRef; + +#ifndef LLDB_DISABLE_PYTHON +LLDB_API typedef struct LLDBSBTypeSyntheticOpaque *LLDBSBTypeSyntheticRef; +#endif +LLDB_API typedef struct LLDBSBTypeListOpaque *LLDBSBTypeListRef; +LLDB_API typedef struct LLDBSBValueOpaque *LLDBSBValueRef; +LLDB_API typedef struct LLDBSBValueListOpaque *LLDBSBValueListRef; +LLDB_API typedef struct LLDBSBVariablesOptionsOpaque *LLDBSBVariablesOptionsRef; +LLDB_API typedef struct LLDBSBWatchpointOpaque *LLDBSBWatchpointRef; +LLDB_API typedef struct LLDBSBUnixSignalsOpaque *LLDBSBUnixSignalsRef; + +LLDB_API typedef enum lldb::AddressClass LLDBAddressClass; +LLDB_API typedef enum lldb::DynamicValueType LLDBDynamicValueType; +LLDB_API typedef enum lldb::BreakpointEventType LLDBBreakpointEventType; +LLDB_API typedef enum lldb::DescriptionLevel LLDBDescriptionLevel; +LLDB_API typedef enum lldb::CommandArgumentType LLDBCommandArgumentType; +LLDB_API typedef enum lldb::ReturnStatus LLDBReturnStatus; +LLDB_API typedef enum lldb::ConnectionStatus LLDBConnectionStatus; +LLDB_API typedef enum lldb::LanguageType LLDBLanguageType; +LLDB_API typedef enum lldb::ByteOrder LLDBByteOrder; +LLDB_API typedef enum lldb::WatchpointEventType LLDBWatchpointEventType; +LLDB_API typedef enum lldb::Format LLDBFormat; +LLDB_API typedef enum lldb::ValueType LLDBValueType; +LLDB_API typedef enum lldb::TypeSummaryCapping LLDBTypeSummaryCapping; +LLDB_API typedef enum lldb::MemberFunctionKind LLDBMemberFunctionKind; +LLDB_API typedef enum lldb::TemplateArgumentKind LLDBTemplateArgumentKind; +LLDB_API typedef enum lldb::TypeClass LLDBTypeClass; +LLDB_API typedef enum lldb::BasicType LLDBBasicType; +LLDB_API typedef enum lldb::StopReason LLDBStopReason; +LLDB_API typedef enum lldb::RunMode LLDBRunMode; +LLDB_API typedef enum lldb::MatchType LLDBMatchType; +LLDB_API typedef enum lldb::SymbolType LLDBSymbolType; +LLDB_API typedef enum lldb::SectionType LLDBSectionType; +LLDB_API typedef enum lldb::QueueItemKind LLDBQueueItemKind; +LLDB_API typedef enum lldb::StateType LLDBStateType; +LLDB_API typedef enum lldb::InstrumentationRuntimeType LLDBInstrumentationRuntimeType; +LLDB_API typedef enum lldb::PathType LLDBPathType; +LLDB_API typedef enum lldb::ExpressionEvaluationPhase LLDBExpressionEvaluationPhase; +LLDB_API typedef enum lldb::ErrorType LLDBErrorType; +LLDB_API typedef enum lldb::ScriptLanguage LLDBScriptLanguage; +LLDB_API typedef enum lldb::AddressClass LLDBAddressClass; +LLDB_API typedef enum lldb::QueueKind LLDBQueueKind; +LLDB_API typedef enum lldb::InputReaderGranularity LLDBInputReaderGranularity; +LLDB_API typedef enum lldb::InputReaderAction LLDBInputReaderAction; + +#endif // LLDB_SBBindingDefines_h_ Index: include/lldb/Bindings/SBBlockBinding.h =================================================================== --- include/lldb/Bindings/SBBlockBinding.h +++ include/lldb/Bindings/SBBlockBinding.h @@ -0,0 +1,63 @@ +//===-- SBBlockBinding.h ----------------------------------------*- C++ -*-===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +#ifndef LLDB_SBBlockBinding_h_ +#define LLDB_SBBlockBinding_h_ + +#include "lldb/Bindings/SBBindingDefines.h" + +#ifdef __cplusplus +extern "C" { +#endif + +LLDB_API LLDBSBBlockRef LLDBCreateSBBlock(); + +LLDB_API void LLDBDisposeSBBlock(LLDBSBBlockRef instance); + +LLDB_API bool LLDBSBBlockIsInlined(LLDBSBBlockRef instance); + +LLDB_API bool LLDBSBBlockIsValid(LLDBSBBlockRef instance); + +LLDB_API const char *LLDBSBBlockGetInlinedName(LLDBSBBlockRef instance); + +LLDB_API LLDBSBFileSpecRef LLDBSBBlockGetInlinedCallSiteFile(LLDBSBBlockRef instance); + +LLDB_API unsigned int LLDBSBBlockGetInlinedCallSiteLine(LLDBSBBlockRef instance); + +LLDB_API unsigned int LLDBSBBlockGetInlinedCallSiteColumn(LLDBSBBlockRef instance); + +LLDB_API LLDBSBBlockRef LLDBSBBlockGetParent(LLDBSBBlockRef instance); + +LLDB_API LLDBSBBlockRef LLDBSBBlockGetSibling(LLDBSBBlockRef instance); + +LLDB_API LLDBSBBlockRef LLDBSBBlockGetFirstChild(LLDBSBBlockRef instance); + +LLDB_API unsigned int LLDBSBBlockGetNumRanges(LLDBSBBlockRef instance); + +LLDB_API LLDBSBAddressRef LLDBSBBlockGetRangeStartAddress(LLDBSBBlockRef instance, uint32_t idx); + +LLDB_API LLDBSBAddressRef LLDBSBBlockGetRangeEndAddress(LLDBSBBlockRef instance, uint32_t idx); + +LLDB_API unsigned int LLDBSBBlockGetRangeIndexForBlockAddress(LLDBSBBlockRef instance, LLDBSBAddressRef block_addr); + +LLDB_API LLDBSBValueListRef LLDBSBBlockGetVariables(LLDBSBBlockRef instance, LLDBSBFrameRef frame, bool arguments, + bool locals, bool statics, LLDBDynamicValueType use_dynamic); + +LLDB_API LLDBSBValueListRef +LLDBSBBlockGetVariables2(LLDBSBBlockRef instance, LLDBSBTargetRef target, bool arguments, bool locals, bool statics); + +LLDB_API LLDBSBBlockRef LLDBSBBlockGetContainingInlinedBlock(LLDBSBBlockRef instance); + +LLDB_API bool LLDBSBBlockGetDescription(LLDBSBBlockRef instance, LLDBSBStreamRef description); + +#ifdef __cplusplus +} +#endif + +#endif // LLDB_SBBlockBinding_h_ Index: include/lldb/Bindings/SBBreakpointBinding.h =================================================================== --- include/lldb/Bindings/SBBreakpointBinding.h +++ include/lldb/Bindings/SBBreakpointBinding.h @@ -0,0 +1,114 @@ +//===-- SBBreakpointBinding.h -----------------------------------*- C++ -*-===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +#ifndef LLDB_SBBreakpointBinding_h_ +#define LLDB_SBBreakpointBinding_h_ + +#include "lldb/Bindings/SBBindingDefines.h" +#include + +#ifdef __cplusplus + +extern "C" { +#endif + +LLDB_API LLDBSBBreakpointRef LLDBCreateSBBreakpoint(); + +LLDB_API void LLDBDisposeSBBreakpoint(LLDBSBBreakpointRef instance); + +LLDB_API int LLDBSBBreakpointGetID(LLDBSBBreakpointRef instance); + +LLDB_API bool LLDBSBBreakpointIsValid(LLDBSBBreakpointRef instance); + +LLDB_API void LLDBSBBreakpointClearAllBreakpointSites(LLDBSBBreakpointRef instance); + +LLDB_API LLDBSBBreakpointLocationRef +LLDBSBBreakpointFindLocationByAddress(LLDBSBBreakpointRef instance, lldb::addr_t vm_addr); + +LLDB_API int LLDBSBBreakpointFindLocationIDByAddress(LLDBSBBreakpointRef instance, lldb::addr_t vm_addr); + +LLDB_API LLDBSBBreakpointLocationRef LLDBSBBreakpointFindLocationByID(LLDBSBBreakpointRef instance, int bp_loc_id); + +LLDB_API LLDBSBBreakpointLocationRef LLDBSBBreakpointGetLocationAtIndex(LLDBSBBreakpointRef instance, uint32_t index); + +LLDB_API void LLDBSBBreakpointSetEnabled(LLDBSBBreakpointRef instance, bool enable); + +LLDB_API bool LLDBSBBreakpointIsEnabled(LLDBSBBreakpointRef instance); + +LLDB_API void LLDBSBBreakpointSetOneShot(LLDBSBBreakpointRef instance, bool one_shot); + +LLDB_API bool LLDBSBBreakpointIsOneShot(LLDBSBBreakpointRef instance); + +LLDB_API bool LLDBSBBreakpointIsInternal(LLDBSBBreakpointRef instance); + +LLDB_API unsigned int LLDBSBBreakpointGetHitCount(LLDBSBBreakpointRef instance); + +LLDB_API void LLDBSBBreakpointSetIgnoreCount(LLDBSBBreakpointRef instance, uint32_t count); + +LLDB_API unsigned int LLDBSBBreakpointGetIgnoreCount(LLDBSBBreakpointRef instance); + +LLDB_API void LLDBSBBreakpointSetCondition(LLDBSBBreakpointRef instance, const char *condition); + +LLDB_API const char *LLDBSBBreakpointGetCondition(LLDBSBBreakpointRef instance); + +LLDB_API void LLDBSBBreakpointSetThreadID(LLDBSBBreakpointRef instance, lldb::tid_t sb_thread_id); + +LLDB_API unsigned long long LLDBSBBreakpointGetThreadID(LLDBSBBreakpointRef instance); + +LLDB_API void LLDBSBBreakpointSetThreadIndex(LLDBSBBreakpointRef instance, uint32_t index); + +LLDB_API unsigned int LLDBSBBreakpointGetThreadIndex(LLDBSBBreakpointRef instance); + +LLDB_API void LLDBSBBreakpointSetThreadName(LLDBSBBreakpointRef instance, const char *thread_name); + +LLDB_API const char *LLDBSBBreakpointGetThreadName(LLDBSBBreakpointRef instance); + +LLDB_API void LLDBSBBreakpointSetQueueName(LLDBSBBreakpointRef instance, const char *queue_name); + +LLDB_API const char *LLDBSBBreakpointGetQueueName(LLDBSBBreakpointRef instance); + +LLDB_API void LLDBSBBreakpointSetCallback(LLDBSBBreakpointRef instance, + lldb::SBBreakpoint::BreakpointHitCallback callback, void *baton); + +LLDB_API void LLDBSBBreakpointSetScriptCallbackFunction(LLDBSBBreakpointRef instance, + const char *callback_function_name); + +LLDB_API LLDBSBErrorRef +LLDBSBBreakpointSetScriptCallbackBody(LLDBSBBreakpointRef instance, const char *script_body_text); + +LLDB_API bool LLDBSBBreakpointAddName(LLDBSBBreakpointRef instance, const char *new_name); + +LLDB_API void LLDBSBBreakpointRemoveName(LLDBSBBreakpointRef instance, const char *name_to_remove); + +LLDB_API bool LLDBSBBreakpointMatchesName(LLDBSBBreakpointRef instance, const char *name); + +LLDB_API void LLDBSBBreakpointGetNames(LLDBSBBreakpointRef instance, LLDBSBStringListRef names); + +LLDB_API unsigned int LLDBSBBreakpointGetNumResolvedLocations(LLDBSBBreakpointRef instance); + +LLDB_API unsigned int LLDBSBBreakpointGetNumLocations(LLDBSBBreakpointRef instance); + +LLDB_API bool LLDBSBBreakpointGetDescription(LLDBSBBreakpointRef instance, LLDBSBStreamRef description); + +LLDB_API bool LLDBSBBreakpointEventIsBreakpointEvent(LLDBSBEventRef event); + +LLDB_API LLDBBreakpointEventType LLDBSBBreakpointGetBreakpointEventTypeFromEvent(LLDBSBEventRef event); + +LLDB_API LLDBSBBreakpointRef LLDBSBBreakpointGetBreakpointFromEvent(LLDBSBEventRef event); + +LLDB_API LLDBSBBreakpointLocationRef +LLDBSBBreakpointGetBreakpointLocationAtIndexFromEvent(LLDBSBEventRef event, uint32_t loc_idx); + +LLDB_API unsigned int LLDBSBBreakpointGetNumBreakpointLocationsFromEvent(LLDBSBEventRef event_sp); + +#ifdef __cplusplus +} +#endif + +#endif // LLDB_SBBreakpointBinding_h_ Index: include/lldb/Bindings/SBBreakpointLocationBinding.h =================================================================== --- include/lldb/Bindings/SBBreakpointLocationBinding.h +++ include/lldb/Bindings/SBBreakpointLocationBinding.h @@ -0,0 +1,76 @@ +//===-- SBBreakpointLocationBinding.h ---------------------------*- C++ -*-===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +#ifndef LLDB_SBBreakpointLocationBinding_h_ +#define LLDB_SBBreakpointLocationBinding_h_ + +#include "lldb/Bindings/SBBindingDefines.h" + +#ifdef __cplusplus +extern "C" { +#endif + +LLDB_API LLDBSBBreakpointLocationRef LLDBCreateSBBreakpointLocation(); + +LLDB_API void LLDBDisposeSBBreakpointLocation(LLDBSBBreakpointLocationRef instance); + +LLDB_API int LLDBSBBreakpointLocationGetID(LLDBSBBreakpointLocationRef instance); + +LLDB_API bool LLDBSBBreakpointLocationIsValid(LLDBSBBreakpointLocationRef instance); + +LLDB_API LLDBSBAddressRef LLDBSBBreakpointLocationGetAddress(LLDBSBBreakpointLocationRef instance); + +LLDB_API unsigned long long LLDBSBBreakpointLocationGetLoadAddress(LLDBSBBreakpointLocationRef instance); + +LLDB_API void LLDBSBBreakpointLocationSetEnabled(LLDBSBBreakpointLocationRef instance, bool enabled); + +LLDB_API bool LLDBSBBreakpointLocationIsEnabled(LLDBSBBreakpointLocationRef instance); + +LLDB_API unsigned int LLDBSBBreakpointLocationGetIgnoreCount(LLDBSBBreakpointLocationRef instance); + +LLDB_API void LLDBSBBreakpointLocationSetIgnoreCount(LLDBSBBreakpointLocationRef instance, uint32_t n); + +LLDB_API void LLDBSBBreakpointLocationSetCondition(LLDBSBBreakpointLocationRef instance, const char *condition); + +LLDB_API const char *LLDBSBBreakpointLocationGetCondition(LLDBSBBreakpointLocationRef instance); + +LLDB_API void LLDBSBBreakpointLocationSetScriptCallbackFunction(LLDBSBBreakpointLocationRef instance, + const char *callback_function_name); + +LLDB_API LLDBSBErrorRef +LLDBSBBreakpointLocationSetScriptCallbackBody(LLDBSBBreakpointLocationRef instance, const char *script_body_text); + +LLDB_API void LLDBSBBreakpointLocationSetThreadID(LLDBSBBreakpointLocationRef instance, lldb::tid_t sb_thread_id); + +LLDB_API unsigned long long LLDBSBBreakpointLocationGetThreadID(LLDBSBBreakpointLocationRef instance); + +LLDB_API void LLDBSBBreakpointLocationSetThreadIndex(LLDBSBBreakpointLocationRef instance, uint32_t index); + +LLDB_API unsigned int LLDBSBBreakpointLocationGetThreadIndex(LLDBSBBreakpointLocationRef instance); + +LLDB_API void LLDBSBBreakpointLocationSetThreadName(LLDBSBBreakpointLocationRef instance, const char *thread_name); + +LLDB_API const char *LLDBSBBreakpointLocationGetThreadName(LLDBSBBreakpointLocationRef instance); + +LLDB_API void LLDBSBBreakpointLocationSetQueueName(LLDBSBBreakpointLocationRef instance, const char *queue_name); + +LLDB_API const char *LLDBSBBreakpointLocationGetQueueName(LLDBSBBreakpointLocationRef instance); + +LLDB_API bool LLDBSBBreakpointLocationIsResolved(LLDBSBBreakpointLocationRef instance); + +LLDB_API bool LLDBSBBreakpointLocationGetDescription(LLDBSBBreakpointLocationRef instance, LLDBSBStreamRef description, + LLDBDescriptionLevel level); + +LLDB_API LLDBSBBreakpointRef LLDBSBBreakpointLocationGetBreakpoint(LLDBSBBreakpointLocationRef instance); + +#ifdef __cplusplus +} +#endif + +#endif // LLDB_SBBreakpointLocationBinding_h_ Index: include/lldb/Bindings/SBBroadcasterBinding.h =================================================================== --- include/lldb/Bindings/SBBroadcasterBinding.h +++ include/lldb/Bindings/SBBroadcasterBinding.h @@ -0,0 +1,50 @@ +//===-- SBBroadcasterBinding.h ----------------------------------*- C++ -*-===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +#ifndef LLDB_SBBroadcasterBinding_h_ +#define LLDB_SBBroadcasterBinding_h_ + +#include "lldb/Bindings/SBBindingDefines.h" + +#ifdef __cplusplus +extern "C" { +#endif + +LLDB_API LLDBSBBroadcasterRef LLDBCreateSBBroadcaster(); + +LLDB_API LLDBSBBroadcasterRef LLDBCreateSBBroadcaster2(const char *name); + +LLDB_API void LLDBDisposeSBBroadcaster(LLDBSBBroadcasterRef instance); + +LLDB_API bool LLDBSBBroadcasterIsValid(LLDBSBBroadcasterRef instance); + +LLDB_API void LLDBSBBroadcasterClear(LLDBSBBroadcasterRef instance); + +LLDB_API void LLDBSBBroadcasterBroadcastEventByType(LLDBSBBroadcasterRef instance, uint32_t event_type, bool unique); + +LLDB_API void LLDBSBBroadcasterBroadcastEvent(LLDBSBBroadcasterRef instance, LLDBSBEventRef event, bool unique); + +LLDB_API void LLDBSBBroadcasterAddInitialEventsToListener(LLDBSBBroadcasterRef instance, LLDBSBListenerRef listener, + uint32_t requested_events); + +LLDB_API unsigned int LLDBSBBroadcasterAddListener(LLDBSBBroadcasterRef instance, LLDBSBListenerRef listener, + uint32_t event_mask); + +LLDB_API const char *LLDBSBBroadcasterGetName(LLDBSBBroadcasterRef instance); + +LLDB_API bool LLDBSBBroadcasterEventTypeHasListeners(LLDBSBBroadcasterRef instance, uint32_t event_type); + +LLDB_API bool LLDBSBBroadcasterRemoveListener(LLDBSBBroadcasterRef instance, LLDBSBListenerRef listener, + uint32_t event_mask); + +#ifdef __cplusplus +} +#endif + +#endif // LLDB_SBBroadcasterBinding_h_ Index: include/lldb/Bindings/SBCommandInterpreterBinding.h =================================================================== --- include/lldb/Bindings/SBCommandInterpreterBinding.h +++ include/lldb/Bindings/SBCommandInterpreterBinding.h @@ -0,0 +1,156 @@ +//===-- SBCommandInterpreterBinding.h ---------------------------*- C++ -*-===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +#ifndef LLDB_SBCommandInterpreterBinding_h_ +#define LLDB_SBCommandInterpreterBinding_h_ + +#include "lldb/Bindings/SBBindingDefines.h" + +#ifdef __cplusplus +extern "C" { +#endif + +LLDB_API LLDBSBCommandInterpreterRunOptionsRef LLDBCreateSBCommandInterpreterRunOptions(); + +LLDB_API void LLDBDisposeSBCommandInterpreterRunOptions(LLDBSBCommandInterpreterRunOptionsRef instance); + +LLDB_API bool LLDBSBCommandInterpreterRunOptionsGetStopOnContinue(LLDBSBCommandInterpreterRunOptionsRef instance); + +LLDB_API void LLDBSBCommandInterpreterRunOptionsSetStopOnContinue(LLDBSBCommandInterpreterRunOptionsRef instance, bool); + +LLDB_API bool LLDBSBCommandInterpreterRunOptionsGetStopOnError(LLDBSBCommandInterpreterRunOptionsRef instance); + +LLDB_API void LLDBSBCommandInterpreterRunOptionsSetStopOnError(LLDBSBCommandInterpreterRunOptionsRef instance, bool); + +LLDB_API bool LLDBSBCommandInterpreterRunOptionsGetStopOnCrash(LLDBSBCommandInterpreterRunOptionsRef instance); + +LLDB_API void LLDBSBCommandInterpreterRunOptionsSetStopOnCrash(LLDBSBCommandInterpreterRunOptionsRef instance, bool); + +LLDB_API bool LLDBSBCommandInterpreterRunOptionsGetEchoCommands(LLDBSBCommandInterpreterRunOptionsRef instance); + +LLDB_API void LLDBSBCommandInterpreterRunOptionsSetEchoCommands(LLDBSBCommandInterpreterRunOptionsRef instance, bool); + +LLDB_API bool LLDBSBCommandInterpreterRunOptionsGetPrintResults(LLDBSBCommandInterpreterRunOptionsRef instance); + +LLDB_API void LLDBSBCommandInterpreterRunOptionsSetPrintResults(LLDBSBCommandInterpreterRunOptionsRef instance, bool); + +LLDB_API bool LLDBSBCommandInterpreterRunOptionsGetAddToHistory(LLDBSBCommandInterpreterRunOptionsRef instance); + +LLDB_API void LLDBSBCommandInterpreterRunOptionsSetAddToHistory(LLDBSBCommandInterpreterRunOptionsRef instance, bool); + +LLDB_API LLDBSBCommandInterpreterRunOptionsRef + LLDBCreateSBCommandInterpreterRunOptions2(LLDBSBCommandInterpreterRunOptionsRef); + +LLDB_API void LLDBDisposeSBCommandInterpreter(LLDBSBCommandInterpreterRef instance); + +LLDB_API const char *LLDBSBCommandInterpreterGetArgumentTypeAsCString(const LLDBCommandArgumentType arg_type); + +LLDB_API const char *LLDBSBCommandInterpreterGetArgumentDescriptionAsCString(const LLDBCommandArgumentType arg_type); + +LLDB_API bool LLDBSBCommandInterpreterEventIsCommandInterpreterEvent(LLDBSBEventRef event); + +LLDB_API bool LLDBSBCommandInterpreterIsValid(LLDBSBCommandInterpreterRef instance); + +LLDB_API bool LLDBSBCommandInterpreterCommandExists(LLDBSBCommandInterpreterRef instance, const char *cmd); + +LLDB_API bool LLDBSBCommandInterpreterAliasExists(LLDBSBCommandInterpreterRef instance, const char *cmd); + +LLDB_API LLDBSBBroadcasterRef LLDBSBCommandInterpreterGetBroadcaster(LLDBSBCommandInterpreterRef instance); + +LLDB_API const char *LLDBSBCommandInterpreterGetBroadcasterClass(); + +LLDB_API bool LLDBSBCommandInterpreterHasCommands(LLDBSBCommandInterpreterRef instance); + +LLDB_API bool LLDBSBCommandInterpreterHasAliases(LLDBSBCommandInterpreterRef instance); + +LLDB_API bool LLDBSBCommandInterpreterHasAliasOptions(LLDBSBCommandInterpreterRef instance); + +LLDB_API LLDBSBProcessRef LLDBSBCommandInterpreterGetProcess(LLDBSBCommandInterpreterRef instance); + +LLDB_API LLDBSBDebuggerRef LLDBSBCommandInterpreterGetDebugger(LLDBSBCommandInterpreterRef instance); + +LLDB_API LLDBSBCommandRef +LLDBSBCommandInterpreterAddMultiwordCommand(LLDBSBCommandInterpreterRef instance, const char *name, const char *help); + +LLDB_API LLDBSBCommandRef LLDBSBCommandInterpreterAddCommand(LLDBSBCommandInterpreterRef instance, const char *name, + LLDBSBCommandPluginInterfaceRef impl, const char *help); + +LLDB_API void LLDBSBCommandInterpreterSourceInitFileInHomeDirectory(LLDBSBCommandInterpreterRef instance, + LLDBSBCommandReturnObjectRef result); + +LLDB_API void LLDBSBCommandInterpreterSourceInitFileInCurrentWorkingDirectory(LLDBSBCommandInterpreterRef instance, + LLDBSBCommandReturnObjectRef result); + +LLDB_API LLDBReturnStatus +LLDBSBCommandInterpreterHandleCommand(LLDBSBCommandInterpreterRef instance, const char *command_line, + LLDBSBCommandReturnObjectRef result, bool add_to_history); + +LLDB_API LLDBReturnStatus +LLDBSBCommandInterpreterHandleCommand2(LLDBSBCommandInterpreterRef instance, const char *command_line, + LLDBSBExecutionContextRef exe_ctx, LLDBSBCommandReturnObjectRef result, + bool add_to_history); + +LLDB_API void LLDBSBCommandInterpreterHandleCommandsFromFile(LLDBSBCommandInterpreterRef instance, + LLDBSBFileSpecRef file, + LLDBSBExecutionContextRef override_context, + LLDBSBCommandInterpreterRunOptionsRef options, + LLDBSBCommandReturnObjectRef result); + +LLDB_API int LLDBSBCommandInterpreterHandleCompletion(LLDBSBCommandInterpreterRef instance, const char *current_line, + const char *cursor, const char *last_char, int match_start_point, + int max_return_elements, LLDBSBStringListRef matches); + +LLDB_API int LLDBSBCommandInterpreterHandleCompletion2(LLDBSBCommandInterpreterRef instance, const char *current_line, + uint32_t cursor_pos, int match_start_point, + int max_return_elements, LLDBSBStringListRef matches); + +LLDB_API bool LLDBSBCommandInterpreterSetCommandOverrideCallback(LLDBSBCommandInterpreterRef instance, + const char *command_name, + lldb::CommandOverrideCallback callback, void *baton); + +LLDB_API bool LLDBSBCommandInterpreterIsActive(LLDBSBCommandInterpreterRef instance); + +LLDB_API const char *LLDBSBCommandInterpreterGetIOHandlerControlSequence(LLDBSBCommandInterpreterRef instance, char ch); + +LLDB_API bool LLDBSBCommandInterpreterGetPromptOnQuit(LLDBSBCommandInterpreterRef instance); + +LLDB_API void LLDBSBCommandInterpreterSetPromptOnQuit(LLDBSBCommandInterpreterRef instance, bool b); + +LLDB_API bool LLDBSBCommandPluginInterfaceDoExecute(LLDBSBCommandPluginInterfaceRef instance, LLDBSBDebuggerRef, + char **, LLDBSBCommandReturnObjectRef); + +LLDB_API void LLDBDisposeSBCommandPluginInterface(LLDBSBCommandPluginInterfaceRef instance); + +LLDB_API LLDBSBCommandRef LLDBCreateSBCommand(); + +LLDB_API bool LLDBSBCommandIsValid(LLDBSBCommandRef instance); + +LLDB_API const char *LLDBSBCommandGetName(LLDBSBCommandRef instance); + +LLDB_API const char *LLDBSBCommandGetHelp(LLDBSBCommandRef instance); + +LLDB_API const char *LLDBSBCommandGetHelpLong(LLDBSBCommandRef instance); + +LLDB_API void LLDBSBCommandSetHelp(LLDBSBCommandRef instance, const char *); + +LLDB_API void LLDBSBCommandSetHelpLong(LLDBSBCommandRef instance, const char *); + +LLDB_API LLDBSBCommandRef +LLDBSBCommandAddMultiwordCommand(LLDBSBCommandRef instance, const char *name, const char *help); + +LLDB_API LLDBSBCommandRef LLDBSBCommandAddCommand(LLDBSBCommandRef instance, const char *name, + LLDBSBCommandPluginInterfaceRef impl, const char *help); + +LLDB_API void LLDBDisposeSBCommand(LLDBSBCommandRef instance); + +#ifdef __cplusplus +} +#endif + +#endif // LLDB_SBCommandInterpreterBinding_h_ Index: include/lldb/Bindings/SBCommandReturnObjectBinding.h =================================================================== --- include/lldb/Bindings/SBCommandReturnObjectBinding.h +++ include/lldb/Bindings/SBCommandReturnObjectBinding.h @@ -0,0 +1,79 @@ +//===-- SBCommandReturnObjectBinding.h --------------------------*- C++ -*-===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +#ifndef LLDB_SBCommandReturnObjectBinding_h_ +#define LLDB_SBCommandReturnObjectBinding_h_ + +#include "lldb/Bindings/SBBindingDefines.h" + +#ifdef __cplusplus +extern "C" { +#endif + +LLDB_API LLDBSBCommandReturnObjectRef LLDBCreateSBCommandReturnObject(); + +LLDB_API void *LLDBSBCommandReturnObjectRelease(LLDBSBCommandReturnObjectRef instance); + +LLDB_API void LLDBDisposeSBCommandReturnObject(LLDBSBCommandReturnObjectRef instance); + +LLDB_API bool LLDBSBCommandReturnObjectIsValid(LLDBSBCommandReturnObjectRef instance); + +LLDB_API const char *LLDBSBCommandReturnObjectGetOutput(LLDBSBCommandReturnObjectRef instance); + +LLDB_API const char *LLDBSBCommandReturnObjectGetError(LLDBSBCommandReturnObjectRef instance); + +LLDB_API unsigned int LLDBSBCommandReturnObjectPutOutput(LLDBSBCommandReturnObjectRef instance, FILE *fh); + +LLDB_API unsigned int LLDBSBCommandReturnObjectGetOutputSize(LLDBSBCommandReturnObjectRef instance); + +LLDB_API unsigned int LLDBSBCommandReturnObjectGetErrorSize(LLDBSBCommandReturnObjectRef instance); + +LLDB_API unsigned int LLDBSBCommandReturnObjectPutError(LLDBSBCommandReturnObjectRef instance, FILE *fh); + +LLDB_API void LLDBSBCommandReturnObjectClear(LLDBSBCommandReturnObjectRef instance); + +LLDB_API LLDBReturnStatus LLDBSBCommandReturnObjectGetStatus(LLDBSBCommandReturnObjectRef instance); + +LLDB_API void LLDBSBCommandReturnObjectSetStatus(LLDBSBCommandReturnObjectRef instance, LLDBReturnStatus status); + +LLDB_API bool LLDBSBCommandReturnObjectSucceeded(LLDBSBCommandReturnObjectRef instance); + +LLDB_API bool LLDBSBCommandReturnObjectHasResult(LLDBSBCommandReturnObjectRef instance); + +LLDB_API void LLDBSBCommandReturnObjectAppendMessage(LLDBSBCommandReturnObjectRef instance, const char *message); + +LLDB_API void LLDBSBCommandReturnObjectAppendWarning(LLDBSBCommandReturnObjectRef instance, const char *message); + +LLDB_API bool LLDBSBCommandReturnObjectGetDescription(LLDBSBCommandReturnObjectRef instance, + LLDBSBStreamRef description); + +LLDB_API void LLDBSBCommandReturnObjectSetImmediateOutputFile(LLDBSBCommandReturnObjectRef instance, FILE *fh); + +LLDB_API void LLDBSBCommandReturnObjectSetImmediateErrorFile(LLDBSBCommandReturnObjectRef instance, FILE *fh); + +LLDB_API void LLDBSBCommandReturnObjectPutCString(LLDBSBCommandReturnObjectRef instance, const char *string, int len); + +LLDB_API unsigned int LLDBSBCommandReturnObjectPrintf(LLDBSBCommandReturnObjectRef instance, const char *format, ...); + +LLDB_API const char *LLDBSBCommandReturnObjectGetOutput2(LLDBSBCommandReturnObjectRef instance, + bool only_if_no_immediate); + +LLDB_API const char *LLDBSBCommandReturnObjectGetError2(LLDBSBCommandReturnObjectRef instance, + bool only_if_no_immediate); + +LLDB_API void LLDBSBCommandReturnObjectSetError(LLDBSBCommandReturnObjectRef instance, LLDBSBErrorRef error, + const char *fallback_error_cstr); + +LLDB_API void LLDBSBCommandReturnObjectSetError2(LLDBSBCommandReturnObjectRef instance, const char *error_cstr); + +#ifdef __cplusplus +} +#endif + +#endif // LLDB_SBCommandReturnObjectBinding_h_ Index: include/lldb/Bindings/SBCommunicationBinding.h =================================================================== --- include/lldb/Bindings/SBCommunicationBinding.h +++ include/lldb/Bindings/SBCommunicationBinding.h @@ -0,0 +1,66 @@ +//===-- SBCommunicationBinding.h --------------------------------*- C++ -*-===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +#ifndef LLDB_SBCommunicationBinding_h_ +#define LLDB_SBCommunicationBinding_h_ + +#include "lldb/Bindings/SBBindingDefines.h" + +typedef void (*ReadThreadBytesReceived)(void *baton, const void *src, size_t src_len); + +#ifdef __cplusplus +extern "C" { +#endif + +LLDB_API LLDBSBCommunicationRef LLDBCreateSBCommunication(); + +LLDB_API LLDBSBCommunicationRef LLDBCreateSBCommunication2(const char *broadcaster_name); + +LLDB_API void LLDBDisposeSBCommunication(LLDBSBCommunicationRef instance); + +LLDB_API bool LLDBSBCommunicationIsValid(LLDBSBCommunicationRef instance); + +LLDB_API LLDBSBBroadcasterRef LLDBSBCommunicationGetBroadcaster(LLDBSBCommunicationRef instance); + +LLDB_API const char *LLDBSBCommunicationGetBroadcasterClass(); + +LLDB_API LLDBConnectionStatus +LLDBSBCommunicationAdoptFileDesriptor(LLDBSBCommunicationRef instance, int fd, bool owns_fd); + +LLDB_API LLDBConnectionStatus LLDBSBCommunicationConnect(LLDBSBCommunicationRef instance, const char *url); + +LLDB_API LLDBConnectionStatus LLDBSBCommunicationDisconnect(LLDBSBCommunicationRef instance); + +LLDB_API bool LLDBSBCommunicationIsConnected(LLDBSBCommunicationRef instance); + +LLDB_API bool LLDBSBCommunicationGetCloseOnEOF(LLDBSBCommunicationRef instance); + +LLDB_API void LLDBSBCommunicationSetCloseOnEOF(LLDBSBCommunicationRef instance, bool b); + +LLDB_API unsigned int LLDBSBCommunicationRead(LLDBSBCommunicationRef instance, void *dst, size_t dst_len, + uint32_t timeout_usec, LLDBConnectionStatus status); + +LLDB_API unsigned int LLDBSBCommunicationWrite(LLDBSBCommunicationRef instance, void *src, size_t src_len, + LLDBConnectionStatus status); + +LLDB_API bool LLDBSBCommunicationReadThreadStart(LLDBSBCommunicationRef instance); + +LLDB_API bool LLDBSBCommunicationReadThreadStop(LLDBSBCommunicationRef instance); + +LLDB_API bool LLDBSBCommunicationReadThreadIsRunning(LLDBSBCommunicationRef instance); + +LLDB_API bool LLDBSBCommunicationSetReadThreadBytesReceivedCallback(LLDBSBCommunicationRef instance, + ReadThreadBytesReceived callback, + void *callback_baton); + +#ifdef __cplusplus +} +#endif + +#endif // LLDB_SBCommunicationBinding_h_ Index: include/lldb/Bindings/SBCompileUnitBinding.h =================================================================== --- include/lldb/Bindings/SBCompileUnitBinding.h +++ include/lldb/Bindings/SBCompileUnitBinding.h @@ -0,0 +1,55 @@ +//===-- SBCompileUnitBinding.h ----------------------------------*- C++ -*-===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +#ifndef LLDB_SBCompileUnitBinding_h_ +#define LLDB_SBCompileUnitBinding_h_ + +#include "lldb/Bindings/SBBindingDefines.h" + +#ifdef __cplusplus +extern "C" { +#endif + +LLDB_API LLDBSBCompileUnitRef LLDBCreateSBCompileUnit(); + +LLDB_API void LLDBDisposeSBCompileUnit(LLDBSBCompileUnitRef instance); + +LLDB_API bool LLDBSBCompileUnitIsValid(LLDBSBCompileUnitRef instance); + +LLDB_API LLDBSBFileSpecRef LLDBSBCompileUnitGetFileSpec(LLDBSBCompileUnitRef instance); + +LLDB_API unsigned int LLDBSBCompileUnitGetNumLineEntries(LLDBSBCompileUnitRef instance); + +LLDB_API LLDBSBLineEntryRef LLDBSBCompileUnitGetLineEntryAtIndex(LLDBSBCompileUnitRef instance, uint32_t idx); + +LLDB_API unsigned int LLDBSBCompileUnitFindLineEntryIndex(LLDBSBCompileUnitRef instance, uint32_t start_idx, + uint32_t line, LLDBSBFileSpecRef inline_file_spec); + +LLDB_API unsigned int LLDBSBCompileUnitFindLineEntryIndex2(LLDBSBCompileUnitRef instance, uint32_t start_idx, + uint32_t line, LLDBSBFileSpecRef inline_file_spec, + bool exact); + +LLDB_API LLDBSBFileSpecRef LLDBSBCompileUnitGetSupportFileAtIndex(LLDBSBCompileUnitRef instance, uint32_t idx); + +LLDB_API unsigned int LLDBSBCompileUnitGetNumSupportFiles(LLDBSBCompileUnitRef instance); + +LLDB_API unsigned int LLDBSBCompileUnitFindSupportFileIndex(LLDBSBCompileUnitRef instance, uint32_t start_idx, + LLDBSBFileSpecRef sb_file, bool full); + +LLDB_API LLDBSBTypeListRef LLDBSBCompileUnitGetTypes(LLDBSBCompileUnitRef instance, uint32_t type_mask); + +LLDB_API LLDBLanguageType LLDBSBCompileUnitGetLanguage(LLDBSBCompileUnitRef instance); + +LLDB_API bool LLDBSBCompileUnitGetDescription(LLDBSBCompileUnitRef instance, LLDBSBStreamRef description); + +#ifdef __cplusplus +} +#endif + +#endif // LLDB_SBCompileUnitBinding_h_ Index: include/lldb/Bindings/SBDataBinding.h =================================================================== --- include/lldb/Bindings/SBDataBinding.h +++ include/lldb/Bindings/SBDataBinding.h @@ -0,0 +1,107 @@ +//===-- SBDataBinding.h -----------------------------------------*- C++ -*-===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +#ifndef LLDB_SBDataBinding_h_ +#define LLDB_SBDataBinding_h_ + +#include "lldb/Bindings/SBBindingDefines.h" + +#ifdef __cplusplus +extern "C" { +#endif + +LLDB_API LLDBSBDataRef LLDBCreateSBData(); + +LLDB_API void LLDBDisposeSBData(LLDBSBDataRef instance); + +LLDB_API unsigned char LLDBSBDataGetAddressByteSize(LLDBSBDataRef instance); + +LLDB_API void LLDBSBDataSetAddressByteSize(LLDBSBDataRef instance, uint8_t addr_byte_size); + +LLDB_API void LLDBSBDataClear(LLDBSBDataRef instance); + +LLDB_API bool LLDBSBDataIsValid(LLDBSBDataRef instance); + +LLDB_API unsigned int LLDBSBDataGetByteSize(LLDBSBDataRef instance); + +LLDB_API LLDBByteOrder LLDBSBDataGetByteOrder(LLDBSBDataRef instance); + +LLDB_API void LLDBSBDataSetByteOrder(LLDBSBDataRef instance, LLDBByteOrder endian); + +LLDB_API float LLDBSBDataGetFloat(LLDBSBDataRef instance, LLDBSBErrorRef error, lldb::offset_t offset); + +LLDB_API double LLDBSBDataGetDouble(LLDBSBDataRef instance, LLDBSBErrorRef error, lldb::offset_t offset); + +LLDB_API long double LLDBSBDataGetLongDouble(LLDBSBDataRef instance, LLDBSBErrorRef error, lldb::offset_t offset); + +LLDB_API unsigned long long LLDBSBDataGetAddress(LLDBSBDataRef instance, LLDBSBErrorRef error, lldb::offset_t offset); + +LLDB_API unsigned char LLDBSBDataGetUnsignedInt8(LLDBSBDataRef instance, LLDBSBErrorRef error, lldb::offset_t offset); + +LLDB_API unsigned short LLDBSBDataGetUnsignedInt16(LLDBSBDataRef instance, LLDBSBErrorRef error, lldb::offset_t offset); + +LLDB_API unsigned int LLDBSBDataGetUnsignedInt32(LLDBSBDataRef instance, LLDBSBErrorRef error, lldb::offset_t offset); + +LLDB_API unsigned long long LLDBSBDataGetUnsignedInt64(LLDBSBDataRef instance, LLDBSBErrorRef error, + lldb::offset_t offset); + +LLDB_API signed char LLDBSBDataGetSignedInt8(LLDBSBDataRef instance, LLDBSBErrorRef error, lldb::offset_t offset); + +LLDB_API short LLDBSBDataGetSignedInt16(LLDBSBDataRef instance, LLDBSBErrorRef error, lldb::offset_t offset); + +LLDB_API int LLDBSBDataGetSignedInt32(LLDBSBDataRef instance, LLDBSBErrorRef error, lldb::offset_t offset); + +LLDB_API long long LLDBSBDataGetSignedInt64(LLDBSBDataRef instance, LLDBSBErrorRef error, lldb::offset_t offset); + +LLDB_API const char *LLDBSBDataGetString(LLDBSBDataRef instance, LLDBSBErrorRef error, lldb::offset_t offset); + +LLDB_API unsigned int LLDBSBDataReadRawData(LLDBSBDataRef instance, LLDBSBErrorRef error, lldb::offset_t offset, + void *buf, size_t size); + +LLDB_API bool LLDBSBDataGetDescription(LLDBSBDataRef instance, LLDBSBStreamRef description, lldb::addr_t base_addr); + +LLDB_API void LLDBSBDataSetData(LLDBSBDataRef instance, LLDBSBErrorRef error, void *buf, size_t size, + LLDBByteOrder endian, uint8_t addr_size); + +LLDB_API bool LLDBSBDataAppend(LLDBSBDataRef instance, LLDBSBDataRef rhs); + +LLDB_API LLDBSBDataRef LLDBSBDataCreateDataFromCString(LLDBByteOrder endian, uint32_t addr_byte_size, const char *data); + +LLDB_API LLDBSBDataRef +LLDBSBDataCreateDataFromUInt64Array(LLDBByteOrder endian, uint32_t addr_byte_size, uint64_t *array, size_t array_len); + +LLDB_API LLDBSBDataRef +LLDBSBDataCreateDataFromUInt32Array(LLDBByteOrder endian, uint32_t addr_byte_size, uint32_t *array, size_t array_len); + +LLDB_API LLDBSBDataRef +LLDBSBDataCreateDataFromSInt64Array(LLDBByteOrder endian, uint32_t addr_byte_size, int64_t *array, size_t array_len); + +LLDB_API LLDBSBDataRef +LLDBSBDataCreateDataFromSInt32Array(LLDBByteOrder endian, uint32_t addr_byte_size, int32_t *array, size_t array_len); + +LLDB_API LLDBSBDataRef +LLDBSBDataCreateDataFromDoubleArray(LLDBByteOrder endian, uint32_t addr_byte_size, double *array, size_t array_len); + +LLDB_API bool LLDBSBDataSetDataFromCString(LLDBSBDataRef instance, const char *data); + +LLDB_API bool LLDBSBDataSetDataFromUInt64Array(LLDBSBDataRef instance, uint64_t *array, size_t array_len); + +LLDB_API bool LLDBSBDataSetDataFromUInt32Array(LLDBSBDataRef instance, uint32_t *array, size_t array_len); + +LLDB_API bool LLDBSBDataSetDataFromSInt64Array(LLDBSBDataRef instance, int64_t *array, size_t array_len); + +LLDB_API bool LLDBSBDataSetDataFromSInt32Array(LLDBSBDataRef instance, int32_t *array, size_t array_len); + +LLDB_API bool LLDBSBDataSetDataFromDoubleArray(LLDBSBDataRef instance, double *array, size_t array_len); + +#ifdef __cplusplus +} +#endif + +#endif // LLDB_SBDataBinding_h_ Index: include/lldb/Bindings/SBDebuggerBinding.h =================================================================== --- include/lldb/Bindings/SBDebuggerBinding.h +++ include/lldb/Bindings/SBDebuggerBinding.h @@ -0,0 +1,230 @@ +//===-- SBDebuggerBinding.h -------------------------------------*- C++ -*-===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +#ifndef LLDB_SBDebuggerBinding_h_ +#define LLDB_SBDebuggerBinding_h_ + +#include "lldb/Bindings/SBBindingDefines.h" +#include + +typedef unsigned long (*Callback)(void *baton, lldb::SBInputReader *reader, lldb::InputReaderAction notification, + const char *bytes, unsigned long bytes_len); + +#ifdef __cplusplus +extern "C" { +#endif + +LLDB_API LLDBSBInputReaderRef LLDBCreateSBInputReader(); + +LLDB_API void LLDBDisposeSBInputReader(LLDBSBInputReaderRef instance); + +LLDB_API LLDBSBErrorRef LLDBSBInputReaderInitialize(LLDBSBInputReaderRef instance, LLDBSBDebuggerRef, Callback callback, + void *callback_baton, LLDBInputReaderGranularity, const char *, + const char *, bool); + +LLDB_API void LLDBSBInputReaderSetIsDone(LLDBSBInputReaderRef instance, bool); + +LLDB_API bool LLDBSBInputReaderIsActive(LLDBSBInputReaderRef instance); + +LLDB_API void LLDBSBDebuggerInitialize(); + +LLDB_API void LLDBSBDebuggerTerminate(); + +LLDB_API LLDBSBDebuggerRef LLDBSBDebuggerCreate(); + +LLDB_API LLDBSBDebuggerRef LLDBSBDebuggerCreate2(bool source_init_files); + +LLDB_API LLDBSBDebuggerRef LLDBSBDebuggerCreate3(bool source_init_files, lldb::LogOutputCallback callback, void *baton); + +LLDB_API void LLDBSBDebuggerDestroy(LLDBSBDebuggerRef debugger); + +LLDB_API void LLDBSBDebuggerMemoryPressureDetected(); + +LLDB_API LLDBSBDebuggerRef LLDBCreateSBDebugger(); + +LLDB_API void LLDBDisposeSBDebugger(LLDBSBDebuggerRef instance); + +LLDB_API bool LLDBSBDebuggerIsValid(LLDBSBDebuggerRef instance); + +LLDB_API void LLDBSBDebuggerClear(LLDBSBDebuggerRef instance); + +LLDB_API void LLDBSBDebuggerSetAsync(LLDBSBDebuggerRef instance, bool b); + +LLDB_API bool LLDBSBDebuggerGetAsync(LLDBSBDebuggerRef instance); + +LLDB_API void LLDBSBDebuggerSkipLLDBInitFiles(LLDBSBDebuggerRef instance, bool b); + +LLDB_API void LLDBSBDebuggerSkipAppInitFiles(LLDBSBDebuggerRef instance, bool b); + +LLDB_API void LLDBSBDebuggerSetInputFileHandle(LLDBSBDebuggerRef instance, FILE *f, bool transfer_ownership); + +LLDB_API void LLDBSBDebuggerSetOutputFileHandle(LLDBSBDebuggerRef instance, FILE *f, bool transfer_ownership); + +LLDB_API void LLDBSBDebuggerSetErrorFileHandle(LLDBSBDebuggerRef instance, FILE *f, bool transfer_ownership); + +LLDB_API FILE *LLDBSBDebuggerGetInputFileHandle(LLDBSBDebuggerRef instance); + +LLDB_API FILE *LLDBSBDebuggerGetOutputFileHandle(LLDBSBDebuggerRef instance); + +LLDB_API FILE *LLDBSBDebuggerGetErrorFileHandle(LLDBSBDebuggerRef instance); + +LLDB_API void LLDBSBDebuggerSaveInputTerminalState(LLDBSBDebuggerRef instance); + +LLDB_API void LLDBSBDebuggerRestoreInputTerminalState(LLDBSBDebuggerRef instance); + +LLDB_API LLDBSBCommandInterpreterRef LLDBSBDebuggerGetCommandInterpreter(LLDBSBDebuggerRef instance); + +LLDB_API void LLDBSBDebuggerHandleCommand(LLDBSBDebuggerRef instance, const char *command); + +LLDB_API LLDBSBListenerRef LLDBSBDebuggerGetListener(LLDBSBDebuggerRef instance); + +LLDB_API void LLDBSBDebuggerHandleProcessEvent(LLDBSBDebuggerRef instance, LLDBSBProcessRef process, + LLDBSBEventRef event, FILE *out, FILE *err); + +LLDB_API LLDBSBTargetRef LLDBSBDebuggerCreateTarget(LLDBSBDebuggerRef instance, const char *filename, + const char *target_triple, const char *platform_name, + bool add_dependent_modules, LLDBSBErrorRef error); + +LLDB_API LLDBSBTargetRef LLDBSBDebuggerCreateTargetWithFileAndTargetTriple(LLDBSBDebuggerRef instance, + const char *filename, + const char *target_triple); + +LLDB_API LLDBSBTargetRef +LLDBSBDebuggerCreateTargetWithFileAndArch(LLDBSBDebuggerRef instance, const char *filename, const char *archname); + +LLDB_API LLDBSBTargetRef LLDBSBDebuggerCreateTarget2(LLDBSBDebuggerRef instance, const char *filename); + +LLDB_API bool LLDBSBDebuggerDeleteTarget(LLDBSBDebuggerRef instance, LLDBSBTargetRef target); + +LLDB_API LLDBSBTargetRef LLDBSBDebuggerGetTargetAtIndex(LLDBSBDebuggerRef instance, uint32_t idx); + +LLDB_API unsigned int LLDBSBDebuggerGetIndexOfTarget(LLDBSBDebuggerRef instance, LLDBSBTargetRef target); + +LLDB_API LLDBSBTargetRef LLDBSBDebuggerFindTargetWithProcessID(LLDBSBDebuggerRef instance, lldb::pid_t pid); + +LLDB_API LLDBSBTargetRef +LLDBSBDebuggerFindTargetWithFileAndArch(LLDBSBDebuggerRef instance, const char *filename, const char *arch); + +LLDB_API unsigned int LLDBSBDebuggerGetNumTargets(LLDBSBDebuggerRef instance); + +LLDB_API LLDBSBTargetRef LLDBSBDebuggerGetSelectedTarget(LLDBSBDebuggerRef instance); + +LLDB_API void LLDBSBDebuggerSetSelectedTarget(LLDBSBDebuggerRef instance, LLDBSBTargetRef target); + +LLDB_API LLDBSBPlatformRef LLDBSBDebuggerGetSelectedPlatform(LLDBSBDebuggerRef instance); + +LLDB_API void LLDBSBDebuggerSetSelectedPlatform(LLDBSBDebuggerRef instance, LLDBSBPlatformRef platform); + +LLDB_API LLDBSBSourceManagerRef LLDBSBDebuggerGetSourceManager(LLDBSBDebuggerRef instance); + +LLDB_API LLDBSBErrorRef LLDBSBDebuggerSetCurrentPlatform(LLDBSBDebuggerRef instance, const char *platform_name); + +LLDB_API bool LLDBSBDebuggerSetCurrentPlatformSDKRoot(LLDBSBDebuggerRef instance, const char *sysroot); + +LLDB_API bool LLDBSBDebuggerSetUseExternalEditor(LLDBSBDebuggerRef instance, bool input); + +LLDB_API bool LLDBSBDebuggerGetUseExternalEditor(LLDBSBDebuggerRef instance); + +LLDB_API bool LLDBSBDebuggerSetUseColor(LLDBSBDebuggerRef instance, bool use_color); + +LLDB_API bool LLDBSBDebuggerGetUseColor(LLDBSBDebuggerRef instance); + +LLDB_API bool LLDBSBDebuggerGetDefaultArchitecture(char *arch_name, size_t arch_name_len); + +LLDB_API bool LLDBSBDebuggerSetDefaultArchitecture(const char *arch_name); + +LLDB_API LLDBScriptLanguage +LLDBSBDebuggerGetScriptingLanguage(LLDBSBDebuggerRef instance, const char *script_language_name); + +LLDB_API const char *LLDBSBDebuggerGetVersionString(); + +LLDB_API const char *LLDBSBDebuggerStateAsCString(LLDBStateType state); + +LLDB_API bool LLDBSBDebuggerStateIsRunningState(LLDBStateType state); + +LLDB_API bool LLDBSBDebuggerStateIsStoppedState(LLDBStateType state); + +LLDB_API bool LLDBSBDebuggerEnableLog(LLDBSBDebuggerRef instance, const char *channel, const char **categories); + +LLDB_API void LLDBSBDebuggerSetLoggingCallback(LLDBSBDebuggerRef instance, lldb::LogOutputCallback log_callback, + void *baton); + +LLDB_API void LLDBSBDebuggerDispatchInput(LLDBSBDebuggerRef instance, void *baton, const void *data, size_t data_len); + +LLDB_API void LLDBSBDebuggerDispatchInput2(LLDBSBDebuggerRef instance, const void *data, size_t data_len); + +LLDB_API void LLDBSBDebuggerDispatchInputInterrupt(LLDBSBDebuggerRef instance); + +LLDB_API void LLDBSBDebuggerDispatchInputEndOfFile(LLDBSBDebuggerRef instance); + +LLDB_API void LLDBSBDebuggerPushInputReader(LLDBSBDebuggerRef instance, LLDBSBInputReaderRef reader); + +LLDB_API const char *LLDBSBDebuggerGetInstanceName(LLDBSBDebuggerRef instance); + +LLDB_API LLDBSBDebuggerRef LLDBSBDebuggerFindDebuggerWithID(int id); + +LLDB_API LLDBSBErrorRef +LLDBSBDebuggerSetInternalVariable(const char *var_name, const char *value, const char *debugger_instance_name); + +LLDB_API LLDBSBStringListRef +LLDBSBDebuggerGetInternalVariableValue(const char *var_name, const char *debugger_instance_name); + +LLDB_API bool LLDBSBDebuggerGetDescription(LLDBSBDebuggerRef instance, LLDBSBStreamRef description); + +LLDB_API unsigned int LLDBSBDebuggerGetTerminalWidth(LLDBSBDebuggerRef instance); + +LLDB_API void LLDBSBDebuggerSetTerminalWidth(LLDBSBDebuggerRef instance, uint32_t term_width); + +LLDB_API unsigned long long LLDBSBDebuggerGetID(LLDBSBDebuggerRef instance); + +LLDB_API const char *LLDBSBDebuggerGetPrompt(LLDBSBDebuggerRef instance); + +LLDB_API void LLDBSBDebuggerSetPrompt(LLDBSBDebuggerRef instance, const char *prompt); + +LLDB_API LLDBScriptLanguage LLDBSBDebuggerGetScriptLanguage(LLDBSBDebuggerRef instance); + +LLDB_API void LLDBSBDebuggerSetScriptLanguage(LLDBSBDebuggerRef instance, LLDBScriptLanguage script_lang); + +LLDB_API bool LLDBSBDebuggerGetCloseInputOnEOF(LLDBSBDebuggerRef instance); + +LLDB_API void LLDBSBDebuggerSetCloseInputOnEOF(LLDBSBDebuggerRef instance, bool b); + +LLDB_API LLDBSBTypeCategoryRef LLDBSBDebuggerGetCategory(LLDBSBDebuggerRef instance, const char *category_name); + +LLDB_API LLDBSBTypeCategoryRef LLDBSBDebuggerCreateCategory(LLDBSBDebuggerRef instance, const char *category_name); + +LLDB_API bool LLDBSBDebuggerDeleteCategory(LLDBSBDebuggerRef instance, const char *category_name); + +LLDB_API unsigned int LLDBSBDebuggerGetNumCategories(LLDBSBDebuggerRef instance); + +LLDB_API LLDBSBTypeCategoryRef LLDBSBDebuggerGetCategoryAtIndex(LLDBSBDebuggerRef instance, uint32_t); + +LLDB_API LLDBSBTypeCategoryRef LLDBSBDebuggerGetDefaultCategory(LLDBSBDebuggerRef instance); + +LLDB_API LLDBSBTypeFormatRef LLDBSBDebuggerGetFormatForType(LLDBSBDebuggerRef instance, LLDBSBTypeNameSpecifierRef); + +LLDB_API LLDBSBTypeSummaryRef LLDBSBDebuggerGetSummaryForType(LLDBSBDebuggerRef instance, LLDBSBTypeNameSpecifierRef); + +LLDB_API LLDBSBTypeFilterRef LLDBSBDebuggerGetFilterForType(LLDBSBDebuggerRef instance, LLDBSBTypeNameSpecifierRef); + +LLDB_API LLDBSBTypeSyntheticRef +LLDBSBDebuggerGetSyntheticForType(LLDBSBDebuggerRef instance, LLDBSBTypeNameSpecifierRef); + +LLDB_API void LLDBSBDebuggerRunCommandInterpreter(LLDBSBDebuggerRef instance, bool auto_handle_events, + bool spawn_thread); + +LLDB_API void LLDBSBDebuggerRunCommandInterpreter2(LLDBSBDebuggerRef instance, bool auto_handle_events, + bool spawn_thread, LLDBSBCommandInterpreterRunOptionsRef options, + int num_errors, bool quit_requested, bool stopped_for_crash); + +#ifdef __cplusplus +} +#endif + +#endif // LLDB_SBDebuggerBinding_h_ Index: include/lldb/Bindings/SBDeclarationBinding.h =================================================================== --- include/lldb/Bindings/SBDeclarationBinding.h +++ include/lldb/Bindings/SBDeclarationBinding.h @@ -0,0 +1,43 @@ +//===-- SBDeclarationBinding.h ----------------------------------*- C++ -*-===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +#ifndef LLDB_SBDeclarationBinding_h_ +#define LLDB_SBDeclarationBinding_h_ + +#include "lldb/Bindings/SBBindingDefines.h" + +#ifdef __cplusplus +extern "C" { +#endif + +LLDB_API LLDBSBDeclarationRef LLDBCreateSBDeclaration(); + +LLDB_API void LLDBDisposeSBDeclaration(LLDBSBDeclarationRef instance); + +LLDB_API bool LLDBSBDeclarationIsValid(LLDBSBDeclarationRef instance); + +LLDB_API LLDBSBFileSpecRef LLDBSBDeclarationGetFileSpec(LLDBSBDeclarationRef instance); + +LLDB_API unsigned int LLDBSBDeclarationGetLine(LLDBSBDeclarationRef instance); + +LLDB_API unsigned int LLDBSBDeclarationGetColumn(LLDBSBDeclarationRef instance); + +LLDB_API void LLDBSBDeclarationSetFileSpec(LLDBSBDeclarationRef instance, LLDBSBFileSpecRef filespec); + +LLDB_API void LLDBSBDeclarationSetLine(LLDBSBDeclarationRef instance, uint32_t line); + +LLDB_API void LLDBSBDeclarationSetColumn(LLDBSBDeclarationRef instance, uint32_t column); + +LLDB_API bool LLDBSBDeclarationGetDescription(LLDBSBDeclarationRef instance, LLDBSBStreamRef description); + +#ifdef __cplusplus +} +#endif + +#endif // LLDB_SBDeclarationBinding_h_ Index: include/lldb/Bindings/SBErrorBinding.h =================================================================== --- include/lldb/Bindings/SBErrorBinding.h +++ include/lldb/Bindings/SBErrorBinding.h @@ -0,0 +1,53 @@ +//===-- SBErrorBinding.h ----------------------------------------*- C++ -*-===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +#ifndef LLDB_SBErrorBinding_h_ +#define LLDB_SBErrorBinding_h_ + +#include "lldb/Bindings/SBBindingDefines.h" + +#ifdef __cplusplus +extern "C" { +#endif + +LLDB_API LLDBSBErrorRef LLDBCreateSBError(); + +LLDB_API void LLDBDisposeSBError(LLDBSBErrorRef instance); + +LLDB_API const char *LLDBSBErrorGetCString(LLDBSBErrorRef instance); + +LLDB_API void LLDBSBErrorClear(LLDBSBErrorRef instance); + +LLDB_API bool LLDBSBErrorFail(LLDBSBErrorRef instance); + +LLDB_API bool LLDBSBErrorSuccess(LLDBSBErrorRef instance); + +LLDB_API unsigned int LLDBSBErrorGetError(LLDBSBErrorRef instance); + +LLDB_API LLDBErrorType LLDBSBErrorGetType(LLDBSBErrorRef instance); + +LLDB_API void LLDBSBErrorSetError(LLDBSBErrorRef instance, uint32_t err, LLDBErrorType type); + +LLDB_API void LLDBSBErrorSetErrorToErrno(LLDBSBErrorRef instance); + +LLDB_API void LLDBSBErrorSetErrorToGenericError(LLDBSBErrorRef instance); + +LLDB_API void LLDBSBErrorSetErrorString(LLDBSBErrorRef instance, const char *err_str); + +LLDB_API int LLDBSBErrorSetErrorStringWithFormat(LLDBSBErrorRef instance, const char *format, ...); + +LLDB_API bool LLDBSBErrorIsValid(LLDBSBErrorRef instance); + +LLDB_API bool LLDBSBErrorGetDescription(LLDBSBErrorRef instance, LLDBSBStreamRef description); + +#ifdef __cplusplus +} +#endif + +#endif // LLDB_SBErrorBinding_h_ Index: include/lldb/Bindings/SBEventBinding.h =================================================================== --- include/lldb/Bindings/SBEventBinding.h +++ include/lldb/Bindings/SBEventBinding.h @@ -0,0 +1,51 @@ +//===-- SBEventBinding.h ----------------------------------------*- C++ -*-===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +#ifndef LLDB_SBEventBinding_h_ +#define LLDB_SBEventBinding_h_ + +#include "lldb/Bindings/SBBindingDefines.h" + +#ifdef __cplusplus +extern "C" { +#endif + +LLDB_API LLDBSBEventRef LLDBCreateSBEvent(); + +LLDB_API LLDBSBEventRef LLDBCreateSBEvent2(uint32_t event, const char *cstr, uint32_t cstr_len); + +LLDB_API void LLDBDisposeSBEvent(LLDBSBEventRef instance); + +LLDB_API bool LLDBSBEventIsValid(LLDBSBEventRef instance); + +LLDB_API const char *LLDBSBEventGetDataFlavor(LLDBSBEventRef instance); + +LLDB_API unsigned int LLDBSBEventGetType(LLDBSBEventRef instance); + +LLDB_API LLDBSBBroadcasterRef LLDBSBEventGetBroadcaster(LLDBSBEventRef instance); + +LLDB_API const char *LLDBSBEventGetBroadcasterClass(LLDBSBEventRef instance); + +LLDB_API bool LLDBSBEventBroadcasterMatchesPtr(LLDBSBEventRef instance, LLDBSBBroadcasterRef broadcaster); + +LLDB_API bool LLDBSBEventBroadcasterMatchesRef(LLDBSBEventRef instance, LLDBSBBroadcasterRef broadcaster); + +LLDB_API void LLDBSBEventClear(LLDBSBEventRef instance); + +LLDB_API const char *LLDBSBEventGetCStringFromEvent(LLDBSBEventRef event); + +LLDB_API bool LLDBSBEventGetDescription(LLDBSBEventRef instance, LLDBSBStreamRef description); + +LLDB_API bool LLDBSBEventGetDescription(LLDBSBEventRef instance, LLDBSBStreamRef description); + +#ifdef __cplusplus +} +#endif + +#endif // LLDB_SBEventBinding_h_ Index: include/lldb/Bindings/SBExecutionContextBinding.h =================================================================== --- include/lldb/Bindings/SBExecutionContextBinding.h +++ include/lldb/Bindings/SBExecutionContextBinding.h @@ -0,0 +1,43 @@ +//===-- SBExecutionContextBinding.h -----------------------------*- C++ -*-===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +#ifndef LLDB_SBExecutionContextBinding_h_ +#define LLDB_SBExecutionContextBinding_h_ + +#include "lldb/Bindings/SBBindingDefines.h" + +#ifdef __cplusplus +extern "C" { +#endif + +LLDB_API LLDBSBExecutionContextRef LLDBCreateSBExecutionContext(); + +LLDB_API LLDBSBExecutionContextRef LLDBCreateSBExecutionContext2(LLDBSBTargetRef target); + +LLDB_API LLDBSBExecutionContextRef LLDBCreateSBExecutionContext3(LLDBSBProcessRef process); + +LLDB_API LLDBSBExecutionContextRef LLDBCreateSBExecutionContext4(LLDBSBThreadRef thread); + +LLDB_API LLDBSBExecutionContextRef LLDBCreateSBExecutionContext5(LLDBSBFrameRef frame); + +LLDB_API void LLDBDisposeSBExecutionContext(LLDBSBExecutionContextRef instance); + +LLDB_API LLDBSBTargetRef LLDBSBExecutionContextGetTarget(LLDBSBExecutionContextRef instance); + +LLDB_API LLDBSBProcessRef LLDBSBExecutionContextGetProcess(LLDBSBExecutionContextRef instance); + +LLDB_API LLDBSBThreadRef LLDBSBExecutionContextGetThread(LLDBSBExecutionContextRef instance); + +LLDB_API LLDBSBFrameRef LLDBSBExecutionContextGetFrame(LLDBSBExecutionContextRef instance); + +#ifdef __cplusplus +} +#endif + +#endif // LLDB_SBExecutionContextBinding_h_ Index: include/lldb/Bindings/SBExpressionOptionsBinding.h =================================================================== --- include/lldb/Bindings/SBExpressionOptionsBinding.h +++ include/lldb/Bindings/SBExpressionOptionsBinding.h @@ -0,0 +1,79 @@ +//===-- SBExpressionOptionsBinding.h ----------------------------*- C++ -*-===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +#ifndef LLDB_SBExpressionOptionsBinding_h_ +#define LLDB_SBExpressionOptionsBinding_h_ + +#include "lldb/Bindings/SBBindingDefines.h" + +#ifdef __cplusplus + +extern "C" { +#endif + +LLDB_API LLDBSBExpressionOptionsRef LLDBCreateSBExpressionOptions(); + +LLDB_API void LLDBDisposeSBExpressionOptions(LLDBSBExpressionOptionsRef instance); + +LLDB_API bool LLDBSBExpressionOptionsGetCoerceResultToId(LLDBSBExpressionOptionsRef instance); + +LLDB_API void LLDBSBExpressionOptionsSetCoerceResultToId(LLDBSBExpressionOptionsRef instance, bool coerce); + +LLDB_API bool LLDBSBExpressionOptionsGetUnwindOnError(LLDBSBExpressionOptionsRef instance); + +LLDB_API void LLDBSBExpressionOptionsSetUnwindOnError(LLDBSBExpressionOptionsRef instance, bool unwind); + +LLDB_API bool LLDBSBExpressionOptionsGetIgnoreBreakpoints(LLDBSBExpressionOptionsRef instance); + +LLDB_API void LLDBSBExpressionOptionsSetIgnoreBreakpoints(LLDBSBExpressionOptionsRef instance, bool ignore); + +LLDB_API LLDBDynamicValueType LLDBSBExpressionOptionsGetFetchDynamicValue(LLDBSBExpressionOptionsRef instance); + +LLDB_API void LLDBSBExpressionOptionsSetFetchDynamicValue(LLDBSBExpressionOptionsRef instance, + LLDBDynamicValueType dynamic); + +LLDB_API unsigned int LLDBSBExpressionOptionsGetTimeoutInMicroSeconds(LLDBSBExpressionOptionsRef instance); + +LLDB_API void LLDBSBExpressionOptionsSetTimeoutInMicroSeconds(LLDBSBExpressionOptionsRef instance, uint32_t timeout); + +LLDB_API unsigned int LLDBSBExpressionOptionsGetOneThreadTimeoutInMicroSeconds(LLDBSBExpressionOptionsRef instance); + +LLDB_API void LLDBSBExpressionOptionsSetOneThreadTimeoutInMicroSeconds(LLDBSBExpressionOptionsRef instance, + uint32_t timeout); + +LLDB_API bool LLDBSBExpressionOptionsGetTryAllThreads(LLDBSBExpressionOptionsRef instance); + +LLDB_API void LLDBSBExpressionOptionsSetTryAllThreads(LLDBSBExpressionOptionsRef instance, bool run_others); + +LLDB_API bool LLDBSBExpressionOptionsGetStopOthers(LLDBSBExpressionOptionsRef instance); + +LLDB_API void LLDBSBExpressionOptionsSetStopOthers(LLDBSBExpressionOptionsRef instance, bool stop_others); + +LLDB_API bool LLDBSBExpressionOptionsGetTrapExceptions(LLDBSBExpressionOptionsRef instance); + +LLDB_API void LLDBSBExpressionOptionsSetTrapExceptions(LLDBSBExpressionOptionsRef instance, bool trap_exceptions); + +LLDB_API void LLDBSBExpressionOptionsSetLanguage(LLDBSBExpressionOptionsRef instance, LLDBLanguageType language); + +LLDB_API void LLDBSBExpressionOptionsSetCancelCallback(LLDBSBExpressionOptionsRef instance, + lldb::ExpressionCancelCallback callback, void *baton); + +LLDB_API bool LLDBSBExpressionOptionsGetGenerateDebugInfo(LLDBSBExpressionOptionsRef instance); + +LLDB_API void LLDBSBExpressionOptionsSetGenerateDebugInfo(LLDBSBExpressionOptionsRef instance, bool b); + +LLDB_API bool LLDBSBExpressionOptionsGetSuppressPersistentResult(LLDBSBExpressionOptionsRef instance); + +LLDB_API void LLDBSBExpressionOptionsSetSuppressPersistentResult(LLDBSBExpressionOptionsRef instance, bool b); + +#ifdef __cplusplus +} +#endif + +#endif // LLDB_SBExpressionOptionsBinding_h_ Index: include/lldb/Bindings/SBFileSpecBinding.h =================================================================== --- include/lldb/Bindings/SBFileSpecBinding.h +++ include/lldb/Bindings/SBFileSpecBinding.h @@ -0,0 +1,51 @@ +//===-- SBFileSpecBinding.h -------------------------------------*- C++ -*-===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +#ifndef LLDB_SBFileSpecBinding_h_ +#define LLDB_SBFileSpecBinding_h_ + +#include "lldb/Bindings/SBBindingDefines.h" + +#ifdef __cplusplus +extern "C" { +#endif + +LLDB_API LLDBSBFileSpecRef LLDBCreateSBFileSpec(); + +LLDB_API LLDBSBFileSpecRef LLDBCreateSBFileSpec2(const char *path); + +LLDB_API LLDBSBFileSpecRef LLDBCreateSBFileSpec3(const char *path, bool resolve); + +LLDB_API void LLDBDisposeSBFileSpec(LLDBSBFileSpecRef instance); + +LLDB_API bool LLDBSBFileSpecIsValid(LLDBSBFileSpecRef instance); + +LLDB_API bool LLDBSBFileSpecExists(LLDBSBFileSpecRef instance); + +LLDB_API bool LLDBSBFileSpecResolveExecutableLocation(LLDBSBFileSpecRef instance); + +LLDB_API const char *LLDBSBFileSpecGetFilename(LLDBSBFileSpecRef instance); + +LLDB_API const char *LLDBSBFileSpecGetDirectory(LLDBSBFileSpecRef instance); + +LLDB_API void LLDBSBFileSpecSetFilename(LLDBSBFileSpecRef instance, const char *filename); + +LLDB_API void LLDBSBFileSpecSetDirectory(LLDBSBFileSpecRef instance, const char *directory); + +LLDB_API unsigned int LLDBSBFileSpecGetPath(LLDBSBFileSpecRef instance, char *dst_path, size_t dst_len); + +LLDB_API int LLDBSBFileSpecResolvePath(const char *src_path, char *dst_path, size_t dst_len); + +LLDB_API bool LLDBSBFileSpecGetDescription(LLDBSBFileSpecRef instance, LLDBSBStreamRef description); + +#ifdef __cplusplus +} +#endif + +#endif // LLDB_SBFileSpecBinding_h_ Index: include/lldb/Bindings/SBFileSpecListBinding.h =================================================================== --- include/lldb/Bindings/SBFileSpecListBinding.h +++ include/lldb/Bindings/SBFileSpecListBinding.h @@ -0,0 +1,42 @@ +//===-- SBFileSpecListBinding.h ---------------------------------*- C++ -*-===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +#ifndef LLDB_SBFileSpecListBinding_h_ +#define LLDB_SBFileSpecListBinding_h_ + +#include "lldb/Bindings/SBBindingDefines.h" + +#ifdef __cplusplus +extern "C" { +#endif + +LLDB_API LLDBSBFileSpecListRef LLDBCreateSBFileSpecList(); + +LLDB_API void LLDBDisposeSBFileSpecList(LLDBSBFileSpecListRef instance); + +LLDB_API unsigned int LLDBSBFileSpecListGetSize(LLDBSBFileSpecListRef instance); + +LLDB_API bool LLDBSBFileSpecListGetDescription(LLDBSBFileSpecListRef instance, LLDBSBStreamRef description); + +LLDB_API void LLDBSBFileSpecListAppend(LLDBSBFileSpecListRef instance, LLDBSBFileSpecRef sb_file); + +LLDB_API bool LLDBSBFileSpecListAppendIfUnique(LLDBSBFileSpecListRef instance, LLDBSBFileSpecRef sb_file); + +LLDB_API void LLDBSBFileSpecListClear(LLDBSBFileSpecListRef instance); + +LLDB_API unsigned int LLDBSBFileSpecListFindFileIndex(LLDBSBFileSpecListRef instance, uint32_t idx, + LLDBSBFileSpecRef sb_file, bool full); + +LLDB_API LLDBSBFileSpecRef LLDBSBFileSpecListGetFileSpecAtIndex(LLDBSBFileSpecListRef instance, uint32_t idx); + +#ifdef __cplusplus +} +#endif + +#endif // LLDB_SBFileSpecListBinding_h_ Index: include/lldb/Bindings/SBFrameBinding.h =================================================================== --- include/lldb/Bindings/SBFrameBinding.h +++ include/lldb/Bindings/SBFrameBinding.h @@ -0,0 +1,109 @@ +//===-- SBFrameBinding.h ----------------------------------------*- C++ -*-===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +#ifndef LLDB_SBFrameBinding_h_ +#define LLDB_SBFrameBinding_h_ + +#include "lldb/Bindings/SBBindingDefines.h" + +#ifdef __cplusplus +extern "C" { +#endif + +LLDB_API LLDBSBFrameRef LLDBCreateSBFrame(); + +LLDB_API void LLDBDisposeSBFrame(LLDBSBFrameRef instance); + +LLDB_API bool LLDBSBFrameIsEqual(LLDBSBFrameRef instance, LLDBSBFrameRef that); + +LLDB_API bool LLDBSBFrameIsValid(LLDBSBFrameRef instance); + +LLDB_API unsigned int LLDBSBFrameGetFrameID(LLDBSBFrameRef instance); + +LLDB_API unsigned long long LLDBSBFrameGetPC(LLDBSBFrameRef instance); + +LLDB_API bool LLDBSBFrameSetPC(LLDBSBFrameRef instance, lldb::addr_t new_pc); + +LLDB_API unsigned long long LLDBSBFrameGetSP(LLDBSBFrameRef instance); + +LLDB_API unsigned long long LLDBSBFrameGetFP(LLDBSBFrameRef instance); + +LLDB_API LLDBSBAddressRef LLDBSBFrameGetPCAddress(LLDBSBFrameRef instance); + +LLDB_API LLDBSBSymbolContextRef LLDBSBFrameGetSymbolContext(LLDBSBFrameRef instance, uint32_t resolve_scope); + +LLDB_API LLDBSBModuleRef LLDBSBFrameGetModule(LLDBSBFrameRef instance); + +LLDB_API LLDBSBCompileUnitRef LLDBSBFrameGetCompileUnit(LLDBSBFrameRef instance); + +LLDB_API LLDBSBFunctionRef LLDBSBFrameGetFunction(LLDBSBFrameRef instance); + +LLDB_API LLDBSBSymbolRef LLDBSBFrameGetSymbol(LLDBSBFrameRef instance); + +LLDB_API LLDBSBBlockRef LLDBSBFrameGetBlock(LLDBSBFrameRef instance); + +LLDB_API const char *LLDBSBFrameGetFunctionName(LLDBSBFrameRef instance); + +LLDB_API bool LLDBSBFrameIsInlined(LLDBSBFrameRef instance); + +LLDB_API LLDBSBValueRef LLDBSBFrameEvaluateExpression(LLDBSBFrameRef instance, const char *expr); + +LLDB_API LLDBSBValueRef +LLDBSBFrameEvaluateExpression2(LLDBSBFrameRef instance, const char *expr, LLDBDynamicValueType use_dynamic); + +LLDB_API LLDBSBValueRef LLDBSBFrameEvaluateExpression3(LLDBSBFrameRef instance, const char *expr, + LLDBDynamicValueType use_dynamic, bool unwind_on_error); + +LLDB_API LLDBSBValueRef +LLDBSBFrameEvaluateExpression4(LLDBSBFrameRef instance, const char *expr, LLDBSBExpressionOptionsRef options); + +LLDB_API LLDBSBBlockRef LLDBSBFrameGetFrameBlock(LLDBSBFrameRef instance); + +LLDB_API LLDBSBLineEntryRef LLDBSBFrameGetLineEntry(LLDBSBFrameRef instance); + +LLDB_API LLDBSBThreadRef LLDBSBFrameGetThread(LLDBSBFrameRef instance); + +LLDB_API const char *LLDBSBFrameDisassemble(LLDBSBFrameRef instance); + +LLDB_API void LLDBSBFrameClear(LLDBSBFrameRef instance); + +LLDB_API LLDBSBValueListRef +LLDBSBFrameGetVariables(LLDBSBFrameRef instance, bool arguments, bool locals, bool statics, bool in_scope_only); + +LLDB_API LLDBSBValueListRef LLDBSBFrameGetVariables2(LLDBSBFrameRef instance, bool arguments, bool locals, bool statics, + bool in_scope_only, LLDBDynamicValueType use_dynamic); + +LLDB_API LLDBSBValueListRef LLDBSBFrameGetVariables3(LLDBSBFrameRef instance, LLDBSBVariablesOptionsRef options); + +LLDB_API LLDBSBValueListRef LLDBSBFrameGetRegisters(LLDBSBFrameRef instance); + +LLDB_API LLDBSBValueRef LLDBSBFrameFindRegister(LLDBSBFrameRef instance, const char *name); + +LLDB_API LLDBSBValueRef LLDBSBFrameFindVariable(LLDBSBFrameRef instance, const char *var_name); + +LLDB_API LLDBSBValueRef +LLDBSBFrameFindVariable2(LLDBSBFrameRef instance, const char *var_name, LLDBDynamicValueType use_dynamic); + +LLDB_API LLDBSBValueRef LLDBSBFrameGetValueForVariablePath(LLDBSBFrameRef instance, const char *var_expr_cstr, + LLDBDynamicValueType use_dynamic); + +LLDB_API LLDBSBValueRef LLDBSBFrameGetValueForVariablePath2(LLDBSBFrameRef instance, const char *var_path); + +LLDB_API LLDBSBValueRef LLDBSBFrameFindValue(LLDBSBFrameRef instance, const char *name, LLDBValueType value_type); + +LLDB_API LLDBSBValueRef LLDBSBFrameFindValue2(LLDBSBFrameRef instance, const char *name, LLDBValueType value_type, + LLDBDynamicValueType use_dynamic); + +LLDB_API bool LLDBSBFrameGetDescription(LLDBSBFrameRef instance, LLDBSBStreamRef description); + +#ifdef __cplusplus +} +#endif + +#endif // LLDB_SBFrameBinding_h_ Index: include/lldb/Bindings/SBFunctionBinding.h =================================================================== --- include/lldb/Bindings/SBFunctionBinding.h +++ include/lldb/Bindings/SBFunctionBinding.h @@ -0,0 +1,52 @@ +//===-- SBFunctionBinding.h -------------------------------------*- C++ -*-===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +#ifndef LLDB_SBFunctionBinding_h_ +#define LLDB_SBFunctionBinding_h_ + +#include "lldb/Bindings/SBBindingDefines.h" + +#ifdef __cplusplus +extern "C" { +#endif + +LLDB_API LLDBSBFunctionRef LLDBCreateSBFunction(); + +LLDB_API void LLDBDisposeSBFunction(LLDBSBFunctionRef instance); + +LLDB_API bool LLDBSBFunctionIsValid(LLDBSBFunctionRef instance); + +LLDB_API const char *LLDBSBFunctionGetName(LLDBSBFunctionRef instance); + +LLDB_API const char *LLDBSBFunctionGetMangledName(LLDBSBFunctionRef instance); + +LLDB_API LLDBSBInstructionListRef LLDBSBFunctionGetInstructions(LLDBSBFunctionRef instance, LLDBSBTargetRef target); + +LLDB_API LLDBSBInstructionListRef +LLDBSBFunctionGetInstructions2(LLDBSBFunctionRef instance, LLDBSBTargetRef target, const char *flavor); + +LLDB_API LLDBSBAddressRef LLDBSBFunctionGetStartAddress(LLDBSBFunctionRef instance); + +LLDB_API LLDBSBAddressRef LLDBSBFunctionGetEndAddress(LLDBSBFunctionRef instance); + +LLDB_API unsigned int LLDBSBFunctionGetPrologueByteSize(LLDBSBFunctionRef instance); + +LLDB_API LLDBSBTypeRef LLDBSBFunctionGetType(LLDBSBFunctionRef instance); + +LLDB_API LLDBSBBlockRef LLDBSBFunctionGetBlock(LLDBSBFunctionRef instance); + +LLDB_API LLDBLanguageType LLDBSBFunctionGetLanguage(LLDBSBFunctionRef instance); + +LLDB_API bool LLDBSBFunctionGetDescription(LLDBSBFunctionRef instance, LLDBSBStreamRef description); + +#ifdef __cplusplus +} +#endif + +#endif // LLDB_SBFunctionBinding_h_ Index: include/lldb/Bindings/SBHostOSBinding.h =================================================================== --- include/lldb/Bindings/SBHostOSBinding.h +++ include/lldb/Bindings/SBHostOSBinding.h @@ -0,0 +1,40 @@ +//===-- SBHostOSBinding.h ---------------------------------------*- C++ -*-===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +#ifndef LLDB_SBHostOSBinding_h_ +#define LLDB_SBHostOSBinding_h_ + +#include "lldb/Bindings/SBBindingDefines.h" + +#ifdef __cplusplus +extern "C" { +#endif + +LLDB_API LLDBSBFileSpecRef LLDBSBHostOSGetProgramFileSpec(); + +LLDB_API LLDBSBFileSpecRef LLDBSBHostOSGetLLDBPythonPath(); + +LLDB_API LLDBSBFileSpecRef LLDBSBHostOSGetLLDBPath(LLDBPathType path_type); + +LLDB_API void LLDBSBHostOSThreadCreated(const char *name); + +LLDB_API lldb::thread_t LLDBSBHostOSThreadCreate(const char *name, lldb::thread_func_t, void *thread_arg, + LLDBSBErrorRef err); + +LLDB_API bool LLDBSBHostOSThreadCancel(lldb::thread_t thread, LLDBSBErrorRef err); + +LLDB_API bool LLDBSBHostOSThreadDetach(lldb::thread_t thread, LLDBSBErrorRef err); + +LLDB_API bool LLDBSBHostOSThreadJoin(lldb::thread_t thread, lldb::thread_result_t *result, LLDBSBErrorRef err); + +#ifdef __cplusplus +} +#endif + +#endif // LLDB_SBHostOSBinding_h_ Index: include/lldb/Bindings/SBInstructionBinding.h =================================================================== --- include/lldb/Bindings/SBInstructionBinding.h +++ include/lldb/Bindings/SBInstructionBinding.h @@ -0,0 +1,57 @@ +//===-- SBInstructionBinding.h ----------------------------------*- C++ -*-===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +#ifndef LLDB_SBInstructionBinding_h_ +#define LLDB_SBInstructionBinding_h_ + +#include "lldb/Bindings/SBBindingDefines.h" + +#ifdef __cplusplus +extern "C" { +#endif + +LLDB_API LLDBSBInstructionRef LLDBCreateSBInstruction(); + +LLDB_API void LLDBDisposeSBInstruction(LLDBSBInstructionRef instance); + +LLDB_API bool LLDBSBInstructionIsValid(LLDBSBInstructionRef instance); + +LLDB_API LLDBSBAddressRef LLDBSBInstructionGetAddress(LLDBSBInstructionRef instance); + +LLDB_API LLDBAddressClass LLDBSBInstructionGetAddressClass(LLDBSBInstructionRef instance); + +LLDB_API const char *LLDBSBInstructionGetMnemonic(LLDBSBInstructionRef instance, LLDBSBTargetRef target); + +LLDB_API const char *LLDBSBInstructionGetOperands(LLDBSBInstructionRef instance, LLDBSBTargetRef target); + +LLDB_API const char *LLDBSBInstructionGetComment(LLDBSBInstructionRef instance, LLDBSBTargetRef target); + +LLDB_API LLDBSBDataRef LLDBSBInstructionGetData(LLDBSBInstructionRef instance, LLDBSBTargetRef target); + +LLDB_API unsigned int LLDBSBInstructionGetByteSize(LLDBSBInstructionRef instance); + +LLDB_API bool LLDBSBInstructionDoesBranch(LLDBSBInstructionRef instance); + +LLDB_API void LLDBSBInstructionPrint(LLDBSBInstructionRef instance, FILE *out); + +LLDB_API bool LLDBSBInstructionGetDescription(LLDBSBInstructionRef instance, LLDBSBStreamRef description); + +LLDB_API bool LLDBSBInstructionEmulateWithFrame(LLDBSBInstructionRef instance, LLDBSBFrameRef frame, + uint32_t evaluate_options); + +LLDB_API bool LLDBSBInstructionDumpEmulation(LLDBSBInstructionRef instance, const char *triple); + +LLDB_API bool LLDBSBInstructionTestEmulation(LLDBSBInstructionRef instance, LLDBSBStreamRef output_stream, + const char *test_file); + +#ifdef __cplusplus +} +#endif + +#endif // LLDB_SBInstructionBinding_h_ Index: include/lldb/Bindings/SBInstructionListBinding.h =================================================================== --- include/lldb/Bindings/SBInstructionListBinding.h +++ include/lldb/Bindings/SBInstructionListBinding.h @@ -0,0 +1,45 @@ +//===-- SBInstructionListBinding.h ------------------------------*- C++ -*-===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +#ifndef LLDB_SBInstructionListBinding_h_ +#define LLDB_SBInstructionListBinding_h_ + +#include "lldb/Bindings/SBBindingDefines.h" + +#ifdef __cplusplus +extern "C" { +#endif + +LLDB_API LLDBSBInstructionListRef LLDBCreateSBInstructionList(); + +LLDB_API void LLDBDisposeSBInstructionList(LLDBSBInstructionListRef instance); + +LLDB_API bool LLDBSBInstructionListIsValid(LLDBSBInstructionListRef instance); + +LLDB_API unsigned int LLDBSBInstructionListGetSize(LLDBSBInstructionListRef instance); + +LLDB_API LLDBSBInstructionRef +LLDBSBInstructionListGetInstructionAtIndex(LLDBSBInstructionListRef instance, uint32_t idx); + +LLDB_API void LLDBSBInstructionListClear(LLDBSBInstructionListRef instance); + +LLDB_API void LLDBSBInstructionListAppendInstruction(LLDBSBInstructionListRef instance, LLDBSBInstructionRef inst); + +LLDB_API void LLDBSBInstructionListPrint(LLDBSBInstructionListRef instance, FILE *out); + +LLDB_API bool LLDBSBInstructionListGetDescription(LLDBSBInstructionListRef instance, LLDBSBStreamRef description); + +LLDB_API bool LLDBSBInstructionListDumpEmulationForAllInstructions(LLDBSBInstructionListRef instance, + const char *triple); + +#ifdef __cplusplus +} +#endif + +#endif // LLDB_SBInstructionListBinding_h_ Index: include/lldb/Bindings/SBLaunchInfoBinding.h =================================================================== --- include/lldb/Bindings/SBLaunchInfoBinding.h +++ include/lldb/Bindings/SBLaunchInfoBinding.h @@ -0,0 +1,105 @@ +//===-- SBLaunchInfoBinding.h -----------------------------------*- C++ -*-===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +#ifndef LLDB_SBLaunchInfoBinding_h_ +#define LLDB_SBLaunchInfoBinding_h_ + +#include "lldb/Bindings/SBBindingDefines.h" + +#ifdef __cplusplus +extern "C" { +#endif + +LLDB_API LLDBSBLaunchInfoRef LLDBCreateSBLaunchInfo(const char **argv); + +LLDB_API void LLDBDisposeSBLaunchInfo(LLDBSBLaunchInfoRef instance); + +LLDB_API unsigned long long LLDBSBLaunchInfoGetProcessID(LLDBSBLaunchInfoRef instance); + +LLDB_API unsigned int LLDBSBLaunchInfoGetUserID(LLDBSBLaunchInfoRef instance); + +LLDB_API unsigned int LLDBSBLaunchInfoGetGroupID(LLDBSBLaunchInfoRef instance); + +LLDB_API bool LLDBSBLaunchInfoUserIDIsValid(LLDBSBLaunchInfoRef instance); + +LLDB_API bool LLDBSBLaunchInfoGroupIDIsValid(LLDBSBLaunchInfoRef instance); + +LLDB_API void LLDBSBLaunchInfoSetUserID(LLDBSBLaunchInfoRef instance, uint32_t uid); + +LLDB_API void LLDBSBLaunchInfoSetGroupID(LLDBSBLaunchInfoRef instance, uint32_t gid); + +LLDB_API LLDBSBFileSpecRef LLDBSBLaunchInfoGetExecutableFile(LLDBSBLaunchInfoRef instance); + +LLDB_API void LLDBSBLaunchInfoSetExecutableFile(LLDBSBLaunchInfoRef instance, LLDBSBFileSpecRef exe_file, + bool add_as_first_arg); + +LLDB_API LLDBSBListenerRef LLDBSBLaunchInfoGetListener(LLDBSBLaunchInfoRef instance); + +LLDB_API void LLDBSBLaunchInfoSetListener(LLDBSBLaunchInfoRef instance, LLDBSBListenerRef listener); + +LLDB_API unsigned int LLDBSBLaunchInfoGetNumArguments(LLDBSBLaunchInfoRef instance); + +LLDB_API const char *LLDBSBLaunchInfoGetArgumentAtIndex(LLDBSBLaunchInfoRef instance, uint32_t idx); + +LLDB_API void LLDBSBLaunchInfoSetArguments(LLDBSBLaunchInfoRef instance, const char **argv, bool append); + +LLDB_API unsigned int LLDBSBLaunchInfoGetNumEnvironmentEntries(LLDBSBLaunchInfoRef instance); + +LLDB_API const char *LLDBSBLaunchInfoGetEnvironmentEntryAtIndex(LLDBSBLaunchInfoRef instance, uint32_t idx); + +LLDB_API void LLDBSBLaunchInfoSetEnvironmentEntries(LLDBSBLaunchInfoRef instance, const char **envp, bool append); + +LLDB_API void LLDBSBLaunchInfoClear(LLDBSBLaunchInfoRef instance); + +LLDB_API const char *LLDBSBLaunchInfoGetWorkingDirectory(LLDBSBLaunchInfoRef instance); + +LLDB_API void LLDBSBLaunchInfoSetWorkingDirectory(LLDBSBLaunchInfoRef instance, const char *working_dir); + +LLDB_API unsigned int LLDBSBLaunchInfoGetLaunchFlags(LLDBSBLaunchInfoRef instance); + +LLDB_API void LLDBSBLaunchInfoSetLaunchFlags(LLDBSBLaunchInfoRef instance, uint32_t flags); + +LLDB_API const char *LLDBSBLaunchInfoGetProcessPluginName(LLDBSBLaunchInfoRef instance); + +LLDB_API void LLDBSBLaunchInfoSetProcessPluginName(LLDBSBLaunchInfoRef instance, const char *plugin_name); + +LLDB_API const char *LLDBSBLaunchInfoGetShell(LLDBSBLaunchInfoRef instance); + +LLDB_API void LLDBSBLaunchInfoSetShell(LLDBSBLaunchInfoRef instance, const char *path); + +LLDB_API bool LLDBSBLaunchInfoGetShellExpandArguments(LLDBSBLaunchInfoRef instance); + +LLDB_API void LLDBSBLaunchInfoSetShellExpandArguments(LLDBSBLaunchInfoRef instance, bool glob); + +LLDB_API unsigned int LLDBSBLaunchInfoGetResumeCount(LLDBSBLaunchInfoRef instance); + +LLDB_API void LLDBSBLaunchInfoSetResumeCount(LLDBSBLaunchInfoRef instance, uint32_t c); + +LLDB_API bool LLDBSBLaunchInfoAddCloseFileAction(LLDBSBLaunchInfoRef instance, int fd); + +LLDB_API bool LLDBSBLaunchInfoAddDuplicateFileAction(LLDBSBLaunchInfoRef instance, int fd, int dup_fd); + +LLDB_API bool LLDBSBLaunchInfoAddOpenFileAction(LLDBSBLaunchInfoRef instance, int fd, const char *path, bool read, + bool write); + +LLDB_API bool LLDBSBLaunchInfoAddSuppressFileAction(LLDBSBLaunchInfoRef instance, int fd, bool read, bool write); + +LLDB_API void LLDBSBLaunchInfoSetLaunchEventData(LLDBSBLaunchInfoRef instance, const char *data); + +LLDB_API const char *LLDBSBLaunchInfoGetLaunchEventData(LLDBSBLaunchInfoRef instance); + +LLDB_API bool LLDBSBLaunchInfoGetDetachOnError(LLDBSBLaunchInfoRef instance); + +LLDB_API void LLDBSBLaunchInfoSetDetachOnError(LLDBSBLaunchInfoRef instance, bool enable); + +#ifdef __cplusplus +} +#endif + +#endif // LLDB_SBLaunchInfoBinding_h_ Index: include/lldb/Bindings/SBLineEntryBinding.h =================================================================== --- include/lldb/Bindings/SBLineEntryBinding.h +++ include/lldb/Bindings/SBLineEntryBinding.h @@ -0,0 +1,47 @@ +//===-- SBLineEntryBinding.h ------------------------------------*- C++ -*-===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +#ifndef LLDB_SBLineEntryBinding_h_ +#define LLDB_SBLineEntryBinding_h_ + +#include "lldb/Bindings/SBBindingDefines.h" + +#ifdef __cplusplus +extern "C" { +#endif + +LLDB_API LLDBSBLineEntryRef LLDBCreateSBLineEntry(); + +LLDB_API void LLDBDisposeSBLineEntry(LLDBSBLineEntryRef instance); + +LLDB_API LLDBSBAddressRef LLDBSBLineEntryGetStartAddress(LLDBSBLineEntryRef instance); + +LLDB_API LLDBSBAddressRef LLDBSBLineEntryGetEndAddress(LLDBSBLineEntryRef instance); + +LLDB_API bool LLDBSBLineEntryIsValid(LLDBSBLineEntryRef instance); + +LLDB_API LLDBSBFileSpecRef LLDBSBLineEntryGetFileSpec(LLDBSBLineEntryRef instance); + +LLDB_API unsigned int LLDBSBLineEntryGetLine(LLDBSBLineEntryRef instance); + +LLDB_API unsigned int LLDBSBLineEntryGetColumn(LLDBSBLineEntryRef instance); + +LLDB_API void LLDBSBLineEntrySetFileSpec(LLDBSBLineEntryRef instance, LLDBSBFileSpecRef filespec); + +LLDB_API void LLDBSBLineEntrySetLine(LLDBSBLineEntryRef instance, uint32_t line); + +LLDB_API void LLDBSBLineEntrySetColumn(LLDBSBLineEntryRef instance, uint32_t column); + +LLDB_API bool LLDBSBLineEntryGetDescription(LLDBSBLineEntryRef instance, LLDBSBStreamRef description); + +#ifdef __cplusplus +} +#endif + +#endif // LLDB_SBLineEntryBinding_h_ Index: include/lldb/Bindings/SBListenerBinding.h =================================================================== --- include/lldb/Bindings/SBListenerBinding.h +++ include/lldb/Bindings/SBListenerBinding.h @@ -0,0 +1,76 @@ +//===-- SBListenerBinding.h -------------------------------------*- C++ -*-===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +#ifndef LLDB_SBListenerBinding_h_ +#define LLDB_SBListenerBinding_h_ + +#include "lldb/Bindings/SBBindingDefines.h" + +#ifdef __cplusplus +extern "C" { +#endif + +LLDB_API LLDBSBListenerRef LLDBCreateSBListener(); + +LLDB_API LLDBSBListenerRef LLDBCreateSBListener2(const char *name); + +LLDB_API void LLDBDisposeSBListener(LLDBSBListenerRef instance); + +LLDB_API void LLDBSBListenerAddEvent(LLDBSBListenerRef instance, LLDBSBEventRef event); + +LLDB_API void LLDBSBListenerClear(LLDBSBListenerRef instance); + +LLDB_API bool LLDBSBListenerIsValid(LLDBSBListenerRef instance); + +LLDB_API unsigned int LLDBSBListenerStartListeningForEventClass(LLDBSBListenerRef instance, LLDBSBDebuggerRef debugger, + const char *broadcaster_class, uint32_t event_mask); + +LLDB_API bool LLDBSBListenerStopListeningForEventClass(LLDBSBListenerRef instance, LLDBSBDebuggerRef debugger, + const char *broadcaster_class, uint32_t event_mask); + +LLDB_API unsigned int LLDBSBListenerStartListeningForEvents(LLDBSBListenerRef instance, + LLDBSBBroadcasterRef broadcaster, uint32_t event_mask); + +LLDB_API bool LLDBSBListenerStopListeningForEvents(LLDBSBListenerRef instance, LLDBSBBroadcasterRef broadcaster, + uint32_t event_mask); + +LLDB_API bool LLDBSBListenerWaitForEvent(LLDBSBListenerRef instance, uint32_t num_seconds, LLDBSBEventRef event); + +LLDB_API bool LLDBSBListenerWaitForEventForBroadcaster(LLDBSBListenerRef instance, uint32_t num_seconds, + LLDBSBBroadcasterRef broadcaster, LLDBSBEventRef sb_event); + +LLDB_API bool LLDBSBListenerWaitForEventForBroadcasterWithType(LLDBSBListenerRef instance, uint32_t num_seconds, + LLDBSBBroadcasterRef broadcaster, + uint32_t event_type_mask, LLDBSBEventRef sb_event); + +LLDB_API bool LLDBSBListenerPeekAtNextEvent(LLDBSBListenerRef instance, LLDBSBEventRef sb_event); + +LLDB_API bool LLDBSBListenerPeekAtNextEventForBroadcaster(LLDBSBListenerRef instance, LLDBSBBroadcasterRef broadcaster, + LLDBSBEventRef sb_event); + +LLDB_API bool LLDBSBListenerPeekAtNextEventForBroadcasterWithType(LLDBSBListenerRef instance, + LLDBSBBroadcasterRef broadcaster, + uint32_t event_type_mask, LLDBSBEventRef sb_event); + +LLDB_API bool LLDBSBListenerGetNextEvent(LLDBSBListenerRef instance, LLDBSBEventRef sb_event); + +LLDB_API bool LLDBSBListenerGetNextEventForBroadcaster(LLDBSBListenerRef instance, LLDBSBBroadcasterRef broadcaster, + LLDBSBEventRef sb_event); + +LLDB_API bool LLDBSBListenerGetNextEventForBroadcasterWithType(LLDBSBListenerRef instance, + LLDBSBBroadcasterRef broadcaster, + uint32_t event_type_mask, LLDBSBEventRef sb_event); + +LLDB_API bool LLDBSBListenerHandleBroadcastEvent(LLDBSBListenerRef instance, LLDBSBEventRef event); + +#ifdef __cplusplus +} +#endif + +#endif // LLDB_SBListenerBinding_h_ Index: include/lldb/Bindings/SBModuleBinding.h =================================================================== --- include/lldb/Bindings/SBModuleBinding.h +++ include/lldb/Bindings/SBModuleBinding.h @@ -0,0 +1,106 @@ +//===-- SBModuleBinding.h ---------------------------------------*- C++ -*-===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +#ifndef LLDB_SBModuleBinding_h_ +#define LLDB_SBModuleBinding_h_ + +#include "lldb/Bindings/SBBindingDefines.h" + +#ifdef __cplusplus +extern "C" { +#endif + +LLDB_API LLDBSBModuleRef LLDBCreateSBModule(); + +LLDB_API LLDBSBModuleRef LLDBCreateSBModule2(LLDBSBModuleSpecRef module_spec); + +LLDB_API LLDBSBModuleRef LLDBCreateSBModule3(LLDBSBProcessRef process, lldb::addr_t header_addr); + +LLDB_API void LLDBDisposeSBModule(LLDBSBModuleRef instance); + +LLDB_API bool LLDBSBModuleIsValid(LLDBSBModuleRef instance); + +LLDB_API void LLDBSBModuleClear(LLDBSBModuleRef instance); + +LLDB_API LLDBSBFileSpecRef LLDBSBModuleGetFileSpec(LLDBSBModuleRef instance); + +LLDB_API LLDBSBFileSpecRef LLDBSBModuleGetPlatformFileSpec(LLDBSBModuleRef instance); + +LLDB_API bool LLDBSBModuleSetPlatformFileSpec(LLDBSBModuleRef instance, LLDBSBFileSpecRef platform_file); + +LLDB_API LLDBSBFileSpecRef LLDBSBModuleGetRemoteInstallFileSpec(LLDBSBModuleRef instance); + +LLDB_API bool LLDBSBModuleSetRemoteInstallFileSpec(LLDBSBModuleRef instance, LLDBSBFileSpecRef file); + +LLDB_API LLDBByteOrder LLDBSBModuleGetByteOrder(LLDBSBModuleRef instance); + +LLDB_API unsigned int LLDBSBModuleGetAddressByteSize(LLDBSBModuleRef instance); + +LLDB_API const char *LLDBSBModuleGetTriple(LLDBSBModuleRef instance); + +LLDB_API const uint8_t *LLDBSBModuleGetUUIDBytes(LLDBSBModuleRef instance); + +LLDB_API const char *LLDBSBModuleGetUUIDString(LLDBSBModuleRef instance); + +LLDB_API LLDBSBSectionRef LLDBSBModuleFindSection(LLDBSBModuleRef instance, const char *sect_name); + +LLDB_API LLDBSBAddressRef LLDBSBModuleResolveFileAddress(LLDBSBModuleRef instance, lldb::addr_t vm_addr); + +LLDB_API LLDBSBSymbolContextRef +LLDBSBModuleResolveSymbolContextForAddress(LLDBSBModuleRef instance, LLDBSBAddressRef addr, uint32_t resolve_scope); + +LLDB_API bool LLDBSBModuleGetDescription(LLDBSBModuleRef instance, LLDBSBStreamRef description); + +LLDB_API unsigned int LLDBSBModuleGetNumCompileUnits(LLDBSBModuleRef instance); + +LLDB_API LLDBSBCompileUnitRef LLDBSBModuleGetCompileUnitAtIndex(LLDBSBModuleRef instance, uint32_t); + +LLDB_API unsigned int LLDBSBModuleGetNumSymbols(LLDBSBModuleRef instance); + +LLDB_API LLDBSBSymbolRef LLDBSBModuleGetSymbolAtIndex(LLDBSBModuleRef instance, size_t idx); + +LLDB_API LLDBSBSymbolRef LLDBSBModuleFindSymbol(LLDBSBModuleRef instance, const char *name, LLDBSymbolType type); + +LLDB_API LLDBSBSymbolContextListRef +LLDBSBModuleFindSymbols(LLDBSBModuleRef instance, const char *name, LLDBSymbolType type); + +LLDB_API unsigned int LLDBSBModuleGetNumSections(LLDBSBModuleRef instance); + +LLDB_API LLDBSBSectionRef LLDBSBModuleGetSectionAtIndex(LLDBSBModuleRef instance, size_t idx); + +LLDB_API LLDBSBSymbolContextListRef +LLDBSBModuleFindFunctions(LLDBSBModuleRef instance, const char *name, uint32_t name_type_mask); + +LLDB_API LLDBSBValueListRef LLDBSBModuleFindGlobalVariables(LLDBSBModuleRef instance, LLDBSBTargetRef target, + const char *name, uint32_t max_matches); + +LLDB_API LLDBSBValueRef +LLDBSBModuleFindFirstGlobalVariable(LLDBSBModuleRef instance, LLDBSBTargetRef target, const char *name); + +LLDB_API LLDBSBTypeRef LLDBSBModuleFindFirstType(LLDBSBModuleRef instance, const char *name); + +LLDB_API LLDBSBTypeListRef LLDBSBModuleFindTypes(LLDBSBModuleRef instance, const char *type); + +LLDB_API LLDBSBTypeRef LLDBSBModuleGetTypeByID(LLDBSBModuleRef instance, lldb::user_id_t uid); + +LLDB_API LLDBSBTypeRef LLDBSBModuleGetBasicType(LLDBSBModuleRef instance, LLDBBasicType type); + +LLDB_API LLDBSBTypeListRef LLDBSBModuleGetTypes(LLDBSBModuleRef instance, uint32_t type_mask); + +LLDB_API unsigned int LLDBSBModuleGetVersion(LLDBSBModuleRef instance, uint32_t *versions, uint32_t num_versions); + +LLDB_API LLDBSBFileSpecRef LLDBSBModuleGetSymbolFileSpec(LLDBSBModuleRef instance); + +LLDB_API LLDBSBAddressRef LLDBSBModuleGetObjectFileHeaderAddress(LLDBSBModuleRef instance); + +#ifdef __cplusplus +} +#endif + +#endif // LLDB_SBModuleBinding_h_ Index: include/lldb/Bindings/SBModuleSpecBinding.h =================================================================== --- include/lldb/Bindings/SBModuleSpecBinding.h +++ include/lldb/Bindings/SBModuleSpecBinding.h @@ -0,0 +1,83 @@ +//===-- SBModuleSpecBinding.h -----------------------------------*- C++ -*-===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +#ifndef LLDB_SBModuleSpecBinding_h_ +#define LLDB_SBModuleSpecBinding_h_ + +#include "lldb/Bindings/SBBindingDefines.h" + +#ifdef __cplusplus +extern "C" { +#endif + +LLDB_API LLDBSBModuleSpecRef LLDBCreateSBModuleSpec(); + +LLDB_API void LLDBDisposeSBModuleSpec(LLDBSBModuleSpecRef instance); + +LLDB_API bool LLDBSBModuleSpecIsValid(LLDBSBModuleSpecRef instance); + +LLDB_API void LLDBSBModuleSpecClear(LLDBSBModuleSpecRef instance); + +LLDB_API LLDBSBFileSpecRef LLDBSBModuleSpecGetFileSpec(LLDBSBModuleSpecRef instance); + +LLDB_API void LLDBSBModuleSpecSetFileSpec(LLDBSBModuleSpecRef instance, LLDBSBFileSpecRef fspec); + +LLDB_API LLDBSBFileSpecRef LLDBSBModuleSpecGetPlatformFileSpec(LLDBSBModuleSpecRef instance); + +LLDB_API void LLDBSBModuleSpecSetPlatformFileSpec(LLDBSBModuleSpecRef instance, LLDBSBFileSpecRef fspec); + +LLDB_API LLDBSBFileSpecRef LLDBSBModuleSpecGetSymbolFileSpec(LLDBSBModuleSpecRef instance); + +LLDB_API void LLDBSBModuleSpecSetSymbolFileSpec(LLDBSBModuleSpecRef instance, LLDBSBFileSpecRef fspec); + +LLDB_API const char *LLDBSBModuleSpecGetObjectName(LLDBSBModuleSpecRef instance); + +LLDB_API void LLDBSBModuleSpecSetObjectName(LLDBSBModuleSpecRef instance, const char *name); + +LLDB_API const char *LLDBSBModuleSpecGetTriple(LLDBSBModuleSpecRef instance); + +LLDB_API void LLDBSBModuleSpecSetTriple(LLDBSBModuleSpecRef instance, const char *triple); + +LLDB_API const uint8_t *LLDBSBModuleSpecGetUUIDBytes(LLDBSBModuleSpecRef instance); + +LLDB_API unsigned int LLDBSBModuleSpecGetUUIDLength(LLDBSBModuleSpecRef instance); + +LLDB_API bool LLDBSBModuleSpecSetUUIDBytes(LLDBSBModuleSpecRef instance, const uint8_t *uuid, size_t uuid_len); + +LLDB_API bool LLDBSBModuleSpecGetDescription(LLDBSBModuleSpecRef instance, LLDBSBStreamRef description); + +LLDB_API LLDBSBModuleSpecListRef LLDBCreateSBModuleSpecList(); + +LLDB_API LLDBSBModuleSpecListRef LLDBCreateSBModuleSpecList(LLDBSBModuleSpecListRef rhs); + +LLDB_API void LLDBDisposeSBModuleSpecList(LLDBSBModuleSpecListRef instance); + +LLDB_API LLDBSBModuleSpecListRef LLDBSBModuleSpecListGetModuleSpecifications(const char *path); + +LLDB_API void LLDBSBModuleSpecListAppend(LLDBSBModuleSpecListRef instance, LLDBSBModuleSpecRef spec); + +LLDB_API void LLDBSBModuleSpecListAppend2(LLDBSBModuleSpecListRef instance, LLDBSBModuleSpecListRef spec_list); + +LLDB_API LLDBSBModuleSpecRef +LLDBSBModuleSpecListFindFirstMatchingSpec(LLDBSBModuleSpecListRef instance, LLDBSBModuleSpecRef match_spec); + +LLDB_API LLDBSBModuleSpecListRef +LLDBSBModuleSpecListFindMatchingSpecs(LLDBSBModuleSpecListRef instance, LLDBSBModuleSpecRef match_spec); + +LLDB_API unsigned int LLDBSBModuleSpecListGetSize(LLDBSBModuleSpecListRef instance); + +LLDB_API LLDBSBModuleSpecRef LLDBSBModuleSpecListGetSpecAtIndex(LLDBSBModuleSpecListRef instance, size_t i); + +LLDB_API bool LLDBSBModuleSpecListGetDescription(LLDBSBModuleSpecListRef instance, LLDBSBStreamRef description); + +#ifdef __cplusplus +} +#endif + +#endif // LLDB_SBModuleSpecBinding_h_ Index: include/lldb/Bindings/SBPlatformBinding.h =================================================================== --- include/lldb/Bindings/SBPlatformBinding.h +++ include/lldb/Bindings/SBPlatformBinding.h @@ -0,0 +1,126 @@ +//===-- SBPlatformBinding.h -------------------------------------*- C++ -*-===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +#ifndef LLDB_SBPlatformBinding_h_ +#define LLDB_SBPlatformBinding_h_ + +#include "lldb/Bindings/SBBindingDefines.h" + +#ifdef __cplusplus +extern "C" { +#endif + +LLDB_API LLDBSBPlatformConnectOptionsRef LLDBCreateSBPlatformConnectOptions(const char *url); + +LLDB_API LLDBSBPlatformConnectOptionsRef LLDBCreateSBPlatformConnectOptions(LLDBSBPlatformConnectOptionsRef rhs); + +LLDB_API void LLDBDisposeSBPlatformConnectOptions(LLDBSBPlatformConnectOptionsRef instance); + +LLDB_API const char *LLDBSBPlatformConnectOptionsGetURL(LLDBSBPlatformConnectOptionsRef instance); + +LLDB_API void LLDBSBPlatformConnectOptionsSetURL(LLDBSBPlatformConnectOptionsRef instance, const char *url); + +LLDB_API bool LLDBSBPlatformConnectOptionsGetRsyncEnabled(LLDBSBPlatformConnectOptionsRef instance); + +LLDB_API void LLDBSBPlatformConnectOptionsEnableRsync(LLDBSBPlatformConnectOptionsRef instance, const char *options, + const char *remote_path_prefix, bool omit_remote_hostname); + +LLDB_API void LLDBSBPlatformConnectOptionsDisableRsync(LLDBSBPlatformConnectOptionsRef instance); + +LLDB_API const char *LLDBSBPlatformConnectOptionsGetLocalCacheDirectory(LLDBSBPlatformConnectOptionsRef instance); + +LLDB_API void LLDBSBPlatformConnectOptionsSetLocalCacheDirectory(LLDBSBPlatformConnectOptionsRef instance, + const char *path); + +LLDB_API LLDBSBPlatformShellCommandRef LLDBCreateSBPlatformShellCommand(const char *shell_command); + +LLDB_API void LLDBDisposeSBPlatformShellCommand(LLDBSBPlatformShellCommandRef instance); + +LLDB_API void LLDBSBPlatformShellCommandClear(LLDBSBPlatformShellCommandRef instance); + +LLDB_API const char *LLDBSBPlatformShellCommandGetCommand(LLDBSBPlatformShellCommandRef instance); + +LLDB_API void LLDBSBPlatformShellCommandSetCommand(LLDBSBPlatformShellCommandRef instance, const char *shell_command); + +LLDB_API const char *LLDBSBPlatformShellCommandGetWorkingDirectory(LLDBSBPlatformShellCommandRef instance); + +LLDB_API void LLDBSBPlatformShellCommandSetWorkingDirectory(LLDBSBPlatformShellCommandRef instance, const char *path); + +LLDB_API unsigned int LLDBSBPlatformShellCommandGetTimeoutSeconds(LLDBSBPlatformShellCommandRef instance); + +LLDB_API void LLDBSBPlatformShellCommandSetTimeoutSeconds(LLDBSBPlatformShellCommandRef instance, uint32_t sec); + +LLDB_API int LLDBSBPlatformShellCommandGetSignal(LLDBSBPlatformShellCommandRef instance); + +LLDB_API int LLDBSBPlatformShellCommandGetStatus(LLDBSBPlatformShellCommandRef instance); + +LLDB_API const char *LLDBSBPlatformShellCommandGetOutput(LLDBSBPlatformShellCommandRef instance); + +LLDB_API LLDBSBPlatformRef LLDBCreateSBPlatform(); + +LLDB_API LLDBSBPlatformRef LLDBCreateSBPlatform(const char *platform_name); + +LLDB_API void LLDBDisposeSBPlatform(LLDBSBPlatformRef instance); + +LLDB_API bool LLDBSBPlatformIsValid(LLDBSBPlatformRef instance); + +LLDB_API void LLDBSBPlatformClear(LLDBSBPlatformRef instance); + +LLDB_API const char *LLDBSBPlatformGetWorkingDirectory(LLDBSBPlatformRef instance); + +LLDB_API bool LLDBSBPlatformSetWorkingDirectory(LLDBSBPlatformRef instance, const char *path); + +LLDB_API const char *LLDBSBPlatformGetName(LLDBSBPlatformRef instance); + +LLDB_API LLDBSBErrorRef +LLDBSBPlatformConnectRemote(LLDBSBPlatformRef instance, LLDBSBPlatformConnectOptionsRef connect_options); + +LLDB_API void LLDBSBPlatformDisconnectRemote(LLDBSBPlatformRef instance); + +LLDB_API bool LLDBSBPlatformIsConnected(LLDBSBPlatformRef instance); + +LLDB_API const char *LLDBSBPlatformGetTriple(LLDBSBPlatformRef instance); + +LLDB_API const char *LLDBSBPlatformGetHostname(LLDBSBPlatformRef instance); + +LLDB_API const char *LLDBSBPlatformGetOSBuild(LLDBSBPlatformRef instance); + +LLDB_API const char *LLDBSBPlatformGetOSDescription(LLDBSBPlatformRef instance); + +LLDB_API unsigned int LLDBSBPlatformGetOSMajorVersion(LLDBSBPlatformRef instance); + +LLDB_API unsigned int LLDBSBPlatformGetOSMinorVersion(LLDBSBPlatformRef instance); + +LLDB_API unsigned int LLDBSBPlatformGetOSUpdateVersion(LLDBSBPlatformRef instance); + +LLDB_API LLDBSBErrorRef LLDBSBPlatformPut(LLDBSBPlatformRef instance, LLDBSBFileSpecRef src, LLDBSBFileSpecRef dst); + +LLDB_API LLDBSBErrorRef LLDBSBPlatformGet(LLDBSBPlatformRef instance, LLDBSBFileSpecRef src, LLDBSBFileSpecRef dst); + +LLDB_API LLDBSBErrorRef LLDBSBPlatformInstall(LLDBSBPlatformRef instance, LLDBSBFileSpecRef src, LLDBSBFileSpecRef dst); + +LLDB_API LLDBSBErrorRef LLDBSBPlatformRun(LLDBSBPlatformRef instance, LLDBSBPlatformShellCommandRef shell_command); + +LLDB_API LLDBSBErrorRef LLDBSBPlatformLaunch(LLDBSBPlatformRef instance, LLDBSBLaunchInfoRef launch_info); + +LLDB_API LLDBSBErrorRef LLDBSBPlatformKill(LLDBSBPlatformRef instance, const lldb::pid_t pid); + +LLDB_API LLDBSBErrorRef +LLDBSBPlatformMakeDirectory(LLDBSBPlatformRef instance, const char *path, uint32_t file_permissions); + +LLDB_API unsigned int LLDBSBPlatformGetFilePermissions(LLDBSBPlatformRef instance, const char *path); + +LLDB_API LLDBSBErrorRef +LLDBSBPlatformSetFilePermissions(LLDBSBPlatformRef instance, const char *path, uint32_t file_permissions); + +#ifdef __cplusplus +} +#endif + +#endif // LLDB_SBPlatformBinding_h_ Index: include/lldb/Bindings/SBProcessBinding.h =================================================================== --- include/lldb/Bindings/SBProcessBinding.h +++ include/lldb/Bindings/SBProcessBinding.h @@ -0,0 +1,168 @@ +//===-- SBProcessBinding.h --------------------------------------*- C++ -*-===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +#ifndef LLDB_SBProcessBinding_h_ +#define LLDB_SBProcessBinding_h_ + +#include "lldb/Bindings/SBBindingDefines.h" + +#ifdef __cplusplus +extern "C" { +#endif + +LLDB_API LLDBSBProcessRef LLDBCreateSBProcess(); + +LLDB_API void LLDBDisposeSBProcess(LLDBSBProcessRef instance); + +LLDB_API const char *LLDBSBProcessGetBroadcasterClassName(); + +LLDB_API const char *LLDBSBProcessGetPluginName(LLDBSBProcessRef instance); + +LLDB_API const char *LLDBSBProcessGetShortPluginName(LLDBSBProcessRef instance); + +LLDB_API void LLDBSBProcessClear(LLDBSBProcessRef instance); + +LLDB_API bool LLDBSBProcessIsValid(LLDBSBProcessRef instance); + +LLDB_API LLDBSBTargetRef LLDBSBProcessGetTarget(LLDBSBProcessRef instance); + +LLDB_API LLDBByteOrder LLDBSBProcessGetByteOrder(LLDBSBProcessRef instance); + +LLDB_API unsigned int LLDBSBProcessPutSTDIN(LLDBSBProcessRef instance, const char *src, size_t src_len); + +LLDB_API unsigned int LLDBSBProcessGetSTDOUT(LLDBSBProcessRef instance, char *dst, size_t dst_len); + +LLDB_API unsigned int LLDBSBProcessGetSTDERR(LLDBSBProcessRef instance, char *dst, size_t dst_len); + +LLDB_API unsigned int LLDBSBProcessGetAsyncProfileData(LLDBSBProcessRef instance, char *dst, size_t dst_len); + +LLDB_API void LLDBSBProcessReportEventState(LLDBSBProcessRef instance, LLDBSBEventRef event, FILE *out); + +LLDB_API void LLDBSBProcessAppendEventStateReport(LLDBSBProcessRef instance, LLDBSBEventRef event, + LLDBSBCommandReturnObjectRef result); + +LLDB_API bool LLDBSBProcessRemoteAttachToProcessWithID(LLDBSBProcessRef instance, lldb::pid_t pid, + LLDBSBErrorRef error); + +LLDB_API bool LLDBSBProcessRemoteLaunch(LLDBSBProcessRef instance, const char **argv, const char **envp, + const char *stdin_path, const char *stdout_path, const char *stderr_path, + const char *working_directory, uint32_t launch_flags, bool stop_at_entry, + LLDBSBErrorRef error); + +LLDB_API unsigned int LLDBSBProcessGetNumThreads(LLDBSBProcessRef instance); + +LLDB_API LLDBSBThreadRef LLDBSBProcessGetThreadAtIndex(LLDBSBProcessRef instance, size_t index); + +LLDB_API LLDBSBThreadRef LLDBSBProcessGetThreadByID(LLDBSBProcessRef instance, lldb::tid_t sb_thread_id); + +LLDB_API LLDBSBThreadRef LLDBSBProcessGetThreadByIndexID(LLDBSBProcessRef instance, uint32_t index_id); + +LLDB_API LLDBSBThreadRef LLDBSBProcessGetSelectedThread(LLDBSBProcessRef instance); + +LLDB_API LLDBSBThreadRef +LLDBSBProcessCreateOSPluginThread(LLDBSBProcessRef instance, lldb::tid_t tid, lldb::addr_t context); + +LLDB_API bool LLDBSBProcessSetSelectedThread(LLDBSBProcessRef instance, LLDBSBThreadRef thread); + +LLDB_API bool LLDBSBProcessSetSelectedThreadByID(LLDBSBProcessRef instance, lldb::tid_t tid); + +LLDB_API bool LLDBSBProcessSetSelectedThreadByIndexID(LLDBSBProcessRef instance, uint32_t index_id); + +LLDB_API unsigned int LLDBSBProcessGetNumQueues(LLDBSBProcessRef instance); + +LLDB_API LLDBSBQueueRef LLDBSBProcessGetQueueAtIndex(LLDBSBProcessRef instance, size_t index); + +LLDB_API LLDBStateType LLDBSBProcessGetState(LLDBSBProcessRef instance); + +LLDB_API int LLDBSBProcessGetExitStatus(LLDBSBProcessRef instance); + +LLDB_API const char *LLDBSBProcessGetExitDescription(LLDBSBProcessRef instance); + +LLDB_API unsigned long long LLDBSBProcessGetProcessID(LLDBSBProcessRef instance); + +LLDB_API unsigned int LLDBSBProcessGetUniqueID(LLDBSBProcessRef instance); + +LLDB_API unsigned int LLDBSBProcessGetAddressByteSize(LLDBSBProcessRef instance); + +LLDB_API LLDBSBErrorRef LLDBSBProcessDestroy(LLDBSBProcessRef instance); + +LLDB_API LLDBSBErrorRef LLDBSBProcessContinue(LLDBSBProcessRef instance); + +LLDB_API LLDBSBErrorRef LLDBSBProcessStop(LLDBSBProcessRef instance); + +LLDB_API LLDBSBErrorRef LLDBSBProcessKill(LLDBSBProcessRef instance); + +LLDB_API LLDBSBErrorRef LLDBSBProcessDetach(LLDBSBProcessRef instance); + +LLDB_API LLDBSBErrorRef LLDBSBProcessDetach2(LLDBSBProcessRef instance, bool keep_stopped); + +LLDB_API LLDBSBErrorRef LLDBSBProcessSignal(LLDBSBProcessRef instance, int signal); + +LLDB_API LLDBSBUnixSignalsRef LLDBSBProcessGetUnixSignals(LLDBSBProcessRef instance); + +LLDB_API void LLDBSBProcessSendAsyncInterrupt(LLDBSBProcessRef instance); + +LLDB_API unsigned int LLDBSBProcessGetStopID(LLDBSBProcessRef instance, bool include_expression_stops); + +LLDB_API unsigned int LLDBSBProcessReadMemory(LLDBSBProcessRef instance, lldb::addr_t addr, void *buf, size_t size, + LLDBSBErrorRef error); + +LLDB_API unsigned int LLDBSBProcessWriteMemory(LLDBSBProcessRef instance, lldb::addr_t addr, void *buf, size_t size, + LLDBSBErrorRef error); + +LLDB_API unsigned int LLDBSBProcessReadCStringFromMemory(LLDBSBProcessRef instance, lldb::addr_t addr, void *buf, + size_t size, LLDBSBErrorRef error); + +LLDB_API unsigned long long LLDBSBProcessReadUnsignedFromMemory(LLDBSBProcessRef instance, lldb::addr_t addr, + uint32_t byte_size, LLDBSBErrorRef error); + +LLDB_API unsigned long long LLDBSBProcessReadPointerFromMemory(LLDBSBProcessRef instance, lldb::addr_t addr, + LLDBSBErrorRef error); + +LLDB_API LLDBStateType LLDBSBProcessGetStateFromEvent(LLDBSBEventRef event); + +LLDB_API bool LLDBSBProcessGetRestartedFromEvent(LLDBSBEventRef event); + +LLDB_API unsigned int LLDBSBProcessGetNumRestartedReasonsFromEvent(LLDBSBEventRef event); + +LLDB_API const char *LLDBSBProcessGetRestartedReasonAtIndexFromEvent(LLDBSBEventRef event, size_t idx); + +LLDB_API LLDBSBProcessRef LLDBSBProcessGetProcessFromEvent(LLDBSBEventRef event); + +LLDB_API bool LLDBSBProcessEventIsProcessEvent(LLDBSBEventRef event); + +LLDB_API LLDBSBBroadcasterRef LLDBSBProcessGetBroadcaster(LLDBSBProcessRef instance); + +LLDB_API const char *LLDBSBProcessGetBroadcasterClass(); + +LLDB_API bool LLDBSBProcessGetDescription(LLDBSBProcessRef instance, LLDBSBStreamRef description); + +LLDB_API unsigned int LLDBSBProcessGetNumSupportedHardwareWatchpoints(LLDBSBProcessRef instance, LLDBSBErrorRef error); + +LLDB_API unsigned int LLDBSBProcessLoadImage(LLDBSBProcessRef instance, LLDBSBFileSpecRef image_spec, + LLDBSBErrorRef error); + +LLDB_API LLDBSBErrorRef LLDBSBProcessUnloadImage(LLDBSBProcessRef instance, uint32_t image_token); + +LLDB_API LLDBSBErrorRef LLDBSBProcessSendEventData(LLDBSBProcessRef instance, const char *data); + +LLDB_API unsigned int LLDBSBProcessGetNumExtendedBacktraceTypes(LLDBSBProcessRef instance); + +LLDB_API const char *LLDBSBProcessGetExtendedBacktraceTypeAtIndex(LLDBSBProcessRef instance, uint32_t idx); + +LLDB_API LLDBSBThreadCollectionRef LLDBSBProcessGetHistoryThreads(LLDBSBProcessRef instance, lldb::addr_t addr); + +LLDB_API bool LLDBSBProcessIsInstrumentationRuntimePresent(LLDBSBProcessRef instance, + LLDBInstrumentationRuntimeType type); + +#ifdef __cplusplus +} +#endif + +#endif // LLDB_SBProcessBinding_h_ Index: include/lldb/Bindings/SBQueueBinding.h =================================================================== --- include/lldb/Bindings/SBQueueBinding.h +++ include/lldb/Bindings/SBQueueBinding.h @@ -0,0 +1,51 @@ +//===-- SBQueueBinding.h ----------------------------------------*- C++ -*-===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +#ifndef LLDB_SBQueueBinding_h_ +#define LLDB_SBQueueBinding_h_ + +#include "lldb/Bindings/SBBindingDefines.h" + +#ifdef __cplusplus +extern "C" { +#endif + +LLDB_API LLDBSBQueueRef LLDBCreateSBQueue(); + +LLDB_API void LLDBDisposeSBQueue(LLDBSBQueueRef instance); + +LLDB_API bool LLDBSBQueueIsValid(LLDBSBQueueRef instance); + +LLDB_API void LLDBSBQueueClear(LLDBSBQueueRef instance); + +LLDB_API LLDBSBProcessRef LLDBSBQueueGetProcess(LLDBSBQueueRef instance); + +LLDB_API unsigned long long LLDBSBQueueGetQueueID(LLDBSBQueueRef instance); + +LLDB_API const char *LLDBSBQueueGetName(LLDBSBQueueRef instance); + +LLDB_API unsigned int LLDBSBQueueGetIndexID(LLDBSBQueueRef instance); + +LLDB_API unsigned int LLDBSBQueueGetNumThreads(LLDBSBQueueRef instance); + +LLDB_API LLDBSBThreadRef LLDBSBQueueGetThreadAtIndex(LLDBSBQueueRef instance, uint32_t); + +LLDB_API unsigned int LLDBSBQueueGetNumPendingItems(LLDBSBQueueRef instance); + +LLDB_API LLDBSBQueueItemRef LLDBSBQueueGetPendingItemAtIndex(LLDBSBQueueRef instance, uint32_t); + +LLDB_API unsigned int LLDBSBQueueGetNumRunningItems(LLDBSBQueueRef instance); + +LLDB_API LLDBQueueKind LLDBSBQueueGetKind(LLDBSBQueueRef instance); + +#ifdef __cplusplus +} +#endif + +#endif // LLDB_SBQueueBinding_h_ Index: include/lldb/Bindings/SBQueueItemBinding.h =================================================================== --- include/lldb/Bindings/SBQueueItemBinding.h +++ include/lldb/Bindings/SBQueueItemBinding.h @@ -0,0 +1,41 @@ +//===-- SBQueueItemBinding.h ------------------------------------*- C++ -*-===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +#ifndef LLDB_SBQueueItemBinding_h_ +#define LLDB_SBQueueItemBinding_h_ + +#include "lldb/Bindings/SBBindingDefines.h" + +#ifdef __cplusplus +extern "C" { +#endif + +LLDB_API LLDBSBQueueItemRef LLDBCreateSBQueueItem(); + +LLDB_API void LLDBDisposeSBQueueItem(LLDBSBQueueItemRef instance); + +LLDB_API bool LLDBSBQueueItemIsValid(LLDBSBQueueItemRef instance); + +LLDB_API void LLDBSBQueueItemClear(LLDBSBQueueItemRef instance); + +LLDB_API LLDBQueueItemKind LLDBSBQueueItemGetKind(LLDBSBQueueItemRef instance); + +LLDB_API void LLDBSBQueueItemSetKind(LLDBSBQueueItemRef instance, LLDBQueueItemKind kind); + +LLDB_API LLDBSBAddressRef LLDBSBQueueItemGetAddress(LLDBSBQueueItemRef instance); + +LLDB_API void LLDBSBQueueItemSetAddress(LLDBSBQueueItemRef instance, LLDBSBAddressRef addr); + +LLDB_API LLDBSBThreadRef LLDBSBQueueItemGetExtendedBacktraceThread(LLDBSBQueueItemRef instance, const char *type); + +#ifdef __cplusplus +} +#endif + +#endif // LLDB_SBQueueItemBinding_h_ Index: include/lldb/Bindings/SBSectionBinding.h =================================================================== --- include/lldb/Bindings/SBSectionBinding.h +++ include/lldb/Bindings/SBSectionBinding.h @@ -0,0 +1,59 @@ +//===-- SBSectionBinding.h --------------------------------------*- C++ -*-===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +#ifndef LLDB_SBSectionBinding_h_ +#define LLDB_SBSectionBinding_h_ + +#include "lldb/Bindings/SBBindingDefines.h" + +#ifdef __cplusplus +extern "C" { +#endif + +LLDB_API LLDBSBSectionRef LLDBCreateSBSection(); + +LLDB_API void LLDBDisposeSBSection(LLDBSBSectionRef instance); + +LLDB_API bool LLDBSBSectionIsValid(LLDBSBSectionRef instance); + +LLDB_API const char *LLDBSBSectionGetName(LLDBSBSectionRef instance); + +LLDB_API LLDBSBSectionRef LLDBSBSectionGetParent(LLDBSBSectionRef instance); + +LLDB_API LLDBSBSectionRef LLDBSBSectionFindSubSection(LLDBSBSectionRef instance, const char *sect_name); + +LLDB_API unsigned int LLDBSBSectionGetNumSubSections(LLDBSBSectionRef instance); + +LLDB_API LLDBSBSectionRef LLDBSBSectionGetSubSectionAtIndex(LLDBSBSectionRef instance, size_t idx); + +LLDB_API unsigned long long LLDBSBSectionGetFileAddress(LLDBSBSectionRef instance); + +LLDB_API unsigned long long LLDBSBSectionGetLoadAddress(LLDBSBSectionRef instance, LLDBSBTargetRef target); + +LLDB_API unsigned long long LLDBSBSectionGetByteSize(LLDBSBSectionRef instance); + +LLDB_API unsigned long long LLDBSBSectionGetFileOffset(LLDBSBSectionRef instance); + +LLDB_API unsigned long long LLDBSBSectionGetFileByteSize(LLDBSBSectionRef instance); + +LLDB_API LLDBSBDataRef LLDBSBSectionGetSectionData(LLDBSBSectionRef instance); + +LLDB_API LLDBSBDataRef LLDBSBSectionGetSectionData2(LLDBSBSectionRef instance, uint64_t offset, uint64_t size); + +LLDB_API LLDBSectionType LLDBSBSectionGetSectionType(LLDBSBSectionRef instance); + +LLDB_API unsigned int LLDBSBSectionGetTargetByteSize(LLDBSBSectionRef instance); + +LLDB_API bool LLDBSBSectionGetDescription(LLDBSBSectionRef instance, LLDBSBStreamRef description); + +#ifdef __cplusplus +} +#endif + +#endif // LLDB_SBSectionBinding_h_ Index: include/lldb/Bindings/SBSourceManagerBinding.h =================================================================== --- include/lldb/Bindings/SBSourceManagerBinding.h +++ include/lldb/Bindings/SBSourceManagerBinding.h @@ -0,0 +1,34 @@ +//===-- SBSourceManagerBinding.h --------------------------------*- C++ -*-===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +#ifndef LLDB_SBSourceManagerBinding_h_ +#define LLDB_SBSourceManagerBinding_h_ + +#include "lldb/Bindings/SBBindingDefines.h" + +#ifdef __cplusplus +extern "C" { +#endif + +LLDB_API LLDBSBSourceManagerRef LLDBCreateSBSourceManager(LLDBSBDebuggerRef debugger); + +LLDB_API LLDBSBSourceManagerRef LLDBCreateSBSourceManager2(LLDBSBTargetRef target); + +LLDB_API void LLDBDisposeSBSourceManager(LLDBSBSourceManagerRef instance); + +LLDB_API unsigned int +LLDBSBSourceManagerDisplaySourceLinesWithLineNumbers(LLDBSBSourceManagerRef instance, LLDBSBFileSpecRef file, + uint32_t line, uint32_t context_before, uint32_t context_after, + const char *current_line_cstr, LLDBSBStreamRef s); + +#ifdef __cplusplus +} +#endif + +#endif // LLDB_SBSourceManagerBinding_h_ Index: include/lldb/Bindings/SBStreamBinding.h =================================================================== --- include/lldb/Bindings/SBStreamBinding.h +++ include/lldb/Bindings/SBStreamBinding.h @@ -0,0 +1,41 @@ +//===-- SBStreamBinding.h ---------------------------------------*- C++ -*-===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +#ifndef LLDB_SBStreamBinding_h_ +#define LLDB_SBStreamBinding_h_ + +#include "lldb/Bindings/SBBindingDefines.h" + +#ifdef __cplusplus +extern "C" { +#endif + +LLDB_API LLDBSBStreamRef LLDBCreateSBStream(); + +LLDB_API bool LLDBSBStreamIsValid(LLDBSBStreamRef instance); + +LLDB_API const char *LLDBSBStreamGetData(LLDBSBStreamRef instance); + +LLDB_API unsigned int LLDBSBStreamGetSize(LLDBSBStreamRef instance); + +LLDB_API void LLDBSBStreamPrintf(LLDBSBStreamRef instance, const char *format, ...); + +LLDB_API void LLDBSBStreamRedirectToFile(LLDBSBStreamRef instance, const char *path, bool append); + +LLDB_API void LLDBSBStreamRedirectToFileHandle(LLDBSBStreamRef instance, FILE *fh, bool transfer_fh_ownership); + +LLDB_API void LLDBSBStreamRedirectToFileDescriptor(LLDBSBStreamRef instance, int fd, bool transfer_fh_ownership); + +LLDB_API void LLDBSBStreamClear(LLDBSBStreamRef instance); + +#ifdef __cplusplus +} +#endif + +#endif // LLDB_SBStreamBinding_h_ Index: include/lldb/Bindings/SBStringListBinding.h =================================================================== --- include/lldb/Bindings/SBStringListBinding.h +++ include/lldb/Bindings/SBStringListBinding.h @@ -0,0 +1,41 @@ +//===-- SBStringListBinding.h -----------------------------------*- C++ -*-===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +#ifndef LLDB_SBStringListBinding_h_ +#define LLDB_SBStringListBinding_h_ + +#include "lldb/Bindings/SBBindingDefines.h" + +#ifdef __cplusplus +extern "C" { +#endif + +LLDB_API LLDBSBStringListRef LLDBCreateSBStringList(); + +LLDB_API void LLDBDisposeSBStringList(LLDBSBStringListRef instance); + +LLDB_API bool LLDBSBStringListIsValid(LLDBSBStringListRef instance); + +LLDB_API void LLDBSBStringListAppendString(LLDBSBStringListRef instance, const char *str); + +LLDB_API void LLDBSBStringListAppendList(LLDBSBStringListRef instance, const char **strv, int strc); + +LLDB_API void LLDBSBStringListAppendList2(LLDBSBStringListRef instance, LLDBSBStringListRef strings); + +LLDB_API unsigned int LLDBSBStringListGetSize(LLDBSBStringListRef instance); + +LLDB_API const char *LLDBSBStringListGetStringAtIndex(LLDBSBStringListRef instance, size_t idx); + +LLDB_API void LLDBSBStringListClear(LLDBSBStringListRef instance); + +#ifdef __cplusplus +} +#endif + +#endif // LLDB_SBStringListBinding_h_ Index: include/lldb/Bindings/SBSymbolBinding.h =================================================================== --- include/lldb/Bindings/SBSymbolBinding.h +++ include/lldb/Bindings/SBSymbolBinding.h @@ -0,0 +1,52 @@ +//===-- SBSymbolBinding.h ---------------------------------------*- C++ -*-===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +#ifndef LLDB_SBSymbolBinding_h_ +#define LLDB_SBSymbolBinding_h_ + +#include "lldb/Bindings/SBBindingDefines.h" + +#ifdef __cplusplus +extern "C" { +#endif + +LLDB_API LLDBSBSymbolRef LLDBCreateSBSymbol(); + +LLDB_API void LLDBDisposeSBSymbol(LLDBSBSymbolRef instance); + +LLDB_API bool LLDBSBSymbolIsValid(LLDBSBSymbolRef instance); + +LLDB_API const char *LLDBSBSymbolGetName(LLDBSBSymbolRef instance); + +LLDB_API const char *LLDBSBSymbolGetMangledName(LLDBSBSymbolRef instance); + +LLDB_API LLDBSBInstructionListRef LLDBSBSymbolGetInstructions(LLDBSBSymbolRef instance, LLDBSBTargetRef target); + +LLDB_API LLDBSBInstructionListRef +LLDBSBSymbolGetInstructions2(LLDBSBSymbolRef instance, LLDBSBTargetRef target, const char *flavor_string); + +LLDB_API LLDBSBAddressRef LLDBSBSymbolGetStartAddress(LLDBSBSymbolRef instance); + +LLDB_API LLDBSBAddressRef LLDBSBSymbolGetEndAddress(LLDBSBSymbolRef instance); + +LLDB_API unsigned int LLDBSBSymbolGetPrologueByteSize(LLDBSBSymbolRef instance); + +LLDB_API LLDBSymbolType LLDBSBSymbolGetType(LLDBSBSymbolRef instance); + +LLDB_API bool LLDBSBSymbolGetDescription(LLDBSBSymbolRef instance, LLDBSBStreamRef description); + +LLDB_API bool LLDBSBSymbolIsExternal(LLDBSBSymbolRef instance); + +LLDB_API bool LLDBSBSymbolIsSynthetic(LLDBSBSymbolRef instance); + +#ifdef __cplusplus +} +#endif + +#endif // LLDB_SBSymbolBinding_h_ Index: include/lldb/Bindings/SBSymbolContextBinding.h =================================================================== --- include/lldb/Bindings/SBSymbolContextBinding.h +++ include/lldb/Bindings/SBSymbolContextBinding.h @@ -0,0 +1,59 @@ +//===-- SBSymbolContextBinding.h --------------------------------*- C++ -*-===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +#ifndef LLDB_SBSymbolContextBinding_h_ +#define LLDB_SBSymbolContextBinding_h_ + +#include "lldb/Bindings/SBBindingDefines.h" + +#ifdef __cplusplus +extern "C" { +#endif + +LLDB_API LLDBSBSymbolContextRef LLDBCreateSBSymbolContext(); + +LLDB_API void LLDBDisposeSBSymbolContext(LLDBSBSymbolContextRef instance); + +LLDB_API bool LLDBSBSymbolContextIsValid(LLDBSBSymbolContextRef instance); + +LLDB_API LLDBSBModuleRef LLDBSBSymbolContextGetModule(LLDBSBSymbolContextRef instance); + +LLDB_API LLDBSBCompileUnitRef LLDBSBSymbolContextGetCompileUnit(LLDBSBSymbolContextRef instance); + +LLDB_API LLDBSBFunctionRef LLDBSBSymbolContextGetFunction(LLDBSBSymbolContextRef instance); + +LLDB_API LLDBSBBlockRef LLDBSBSymbolContextGetBlock(LLDBSBSymbolContextRef instance); + +LLDB_API LLDBSBLineEntryRef LLDBSBSymbolContextGetLineEntry(LLDBSBSymbolContextRef instance); + +LLDB_API LLDBSBSymbolRef LLDBSBSymbolContextGetSymbol(LLDBSBSymbolContextRef instance); + +LLDB_API void LLDBSBSymbolContextSetModule(LLDBSBSymbolContextRef instance, LLDBSBModuleRef module); + +LLDB_API void LLDBSBSymbolContextSetCompileUnit(LLDBSBSymbolContextRef instance, LLDBSBCompileUnitRef compile_unit); + +LLDB_API void LLDBSBSymbolContextSetFunction(LLDBSBSymbolContextRef instance, LLDBSBFunctionRef function); + +LLDB_API void LLDBSBSymbolContextSetBlock(LLDBSBSymbolContextRef instance, LLDBSBBlockRef block); + +LLDB_API void LLDBSBSymbolContextSetLineEntry(LLDBSBSymbolContextRef instance, LLDBSBLineEntryRef line_entry); + +LLDB_API void LLDBSBSymbolContextSetSymbol(LLDBSBSymbolContextRef instance, LLDBSBSymbolRef symbol); + +LLDB_API LLDBSBSymbolContextRef LLDBSBSymbolContextGetParentOfInlinedScope(LLDBSBSymbolContextRef instance, + LLDBSBAddressRef curr_frame_pc, + LLDBSBAddressRef parent_frame_addr); + +LLDB_API bool LLDBSBSymbolContextGetDescription(LLDBSBSymbolContextRef instance, LLDBSBStreamRef description); + +#ifdef __cplusplus +} +#endif + +#endif // LLDB_SBSymbolContextBinding_h_ Index: include/lldb/Bindings/SBSymbolContextListBinding.h =================================================================== --- include/lldb/Bindings/SBSymbolContextListBinding.h +++ include/lldb/Bindings/SBSymbolContextListBinding.h @@ -0,0 +1,42 @@ +//===-- SBSymbolContextListBinding.h ----------------------------*- C++ -*-===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +#ifndef LLDB_SBSymbolContextListBinding_h_ +#define LLDB_SBSymbolContextListBinding_h_ + +#include "lldb/Bindings/SBBindingDefines.h" + +#ifdef __cplusplus +extern "C" { +#endif + +LLDB_API LLDBSBSymbolContextListRef LLDBCreateSBSymbolContextList(); + +LLDB_API void LLDBDisposeSBSymbolContextList(LLDBSBSymbolContextListRef instance); + +LLDB_API bool LLDBSBSymbolContextListIsValid(LLDBSBSymbolContextListRef instance); + +LLDB_API unsigned int LLDBSBSymbolContextListGetSize(LLDBSBSymbolContextListRef instance); + +LLDB_API LLDBSBSymbolContextRef +LLDBSBSymbolContextListGetContextAtIndex(LLDBSBSymbolContextListRef instance, uint32_t idx); + +LLDB_API bool LLDBSBSymbolContextListGetDescription(LLDBSBSymbolContextListRef instance, LLDBSBStreamRef description); + +LLDB_API void LLDBSBSymbolContextListAppend(LLDBSBSymbolContextListRef instance, LLDBSBSymbolContextRef sc); + +LLDB_API void LLDBSBSymbolContextListAppend2(LLDBSBSymbolContextListRef instance, LLDBSBSymbolContextListRef sc_list); + +LLDB_API void LLDBSBSymbolContextListClear(LLDBSBSymbolContextListRef instance); + +#ifdef __cplusplus +} +#endif + +#endif // LLDB_SBSymbolContextListBinding_h_ Index: include/lldb/Bindings/SBTargetBinding.h =================================================================== --- include/lldb/Bindings/SBTargetBinding.h +++ include/lldb/Bindings/SBTargetBinding.h @@ -0,0 +1,269 @@ +//===-- SBTargetBinding.h ---------------------------------------*- C++ -*-===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +#ifndef LLDB_SBTargetBinding_h_ +#define LLDB_SBTargetBinding_h_ + +#include "lldb/Bindings/SBBindingDefines.h" + +#ifdef __cplusplus +extern "C" { +#endif + +LLDB_API LLDBSBTargetRef LLDBCreateSBTarget(); + +LLDB_API void LLDBDisposeSBTarget(LLDBSBTargetRef instance); + +LLDB_API bool LLDBSBTargetIsValid(LLDBSBTargetRef instance); + +LLDB_API bool LLDBSBTargetEventIsTargetEvent(LLDBSBEventRef event); + +LLDB_API LLDBSBTargetRef LLDBSBTargetGetTargetFromEvent(LLDBSBEventRef event); + +LLDB_API unsigned int LLDBSBTargetGetNumModulesFromEvent(LLDBSBEventRef event); + +LLDB_API LLDBSBModuleRef LLDBSBTargetGetModuleAtIndexFromEvent(const uint32_t idx, LLDBSBEventRef event); + +LLDB_API const char *LLDBSBTargetGetBroadcasterClassName(); + +LLDB_API LLDBSBProcessRef LLDBSBTargetGetProcess(LLDBSBTargetRef instance); + +LLDB_API LLDBSBPlatformRef LLDBSBTargetGetPlatform(LLDBSBTargetRef instance); + +LLDB_API LLDBSBErrorRef LLDBSBTargetInstall(LLDBSBTargetRef instance); + +LLDB_API LLDBSBProcessRef LLDBSBTargetLaunch(LLDBSBTargetRef instance, LLDBSBListenerRef listener, const char **argv, + const char **envp, const char *stdin_path, const char *stdout_path, + const char *stderr_path, const char *working_directory, + uint32_t launch_flags, bool stop_at_entry, LLDBSBErrorRef error); + +LLDB_API LLDBSBProcessRef +LLDBSBTargetLaunchSimple(LLDBSBTargetRef instance, const char **argv, const char **envp, const char *working_directory); + +LLDB_API LLDBSBProcessRef +LLDBSBTargetLaunch2(LLDBSBTargetRef instance, LLDBSBLaunchInfoRef launch_info, LLDBSBErrorRef error); + +LLDB_API LLDBSBProcessRef LLDBSBTargetLoadCore(LLDBSBTargetRef instance, const char *core_file); + +LLDB_API LLDBSBProcessRef +LLDBSBTargetAttach(LLDBSBTargetRef instance, LLDBSBAttachInfoRef attach_info, LLDBSBErrorRef error); + +LLDB_API LLDBSBProcessRef LLDBSBTargetAttachToProcessWithID(LLDBSBTargetRef instance, LLDBSBListenerRef listener, + lldb::pid_t pid, LLDBSBErrorRef error); + +LLDB_API LLDBSBProcessRef LLDBSBTargetAttachToProcessWithName(LLDBSBTargetRef instance, LLDBSBListenerRef listener, + const char *name, bool wait_for, LLDBSBErrorRef error); + +LLDB_API LLDBSBProcessRef LLDBSBTargetConnectRemote(LLDBSBTargetRef instance, LLDBSBListenerRef listener, + const char *url, const char *plugin_name, LLDBSBErrorRef error); + +LLDB_API LLDBSBFileSpecRef LLDBSBTargetGetExecutable(LLDBSBTargetRef instance); + +LLDB_API bool LLDBSBTargetAddModule(LLDBSBTargetRef instance, LLDBSBModuleRef module); + +LLDB_API LLDBSBModuleRef +LLDBSBTargetAddModule2(LLDBSBTargetRef instance, const char *path, const char *triple, const char *uuid); + +LLDB_API LLDBSBModuleRef LLDBSBTargetAddModule3(LLDBSBTargetRef instance, const char *path, const char *triple, + const char *uuid_cstr, const char *symfile); + +LLDB_API LLDBSBModuleRef LLDBSBTargetAddModule4(LLDBSBTargetRef instance, LLDBSBModuleSpecRef module_spec); + +LLDB_API unsigned int LLDBSBTargetGetNumModules(LLDBSBTargetRef instance); + +LLDB_API LLDBSBModuleRef LLDBSBTargetGetModuleAtIndex(LLDBSBTargetRef instance, uint32_t idx); + +LLDB_API bool LLDBSBTargetRemoveModule(LLDBSBTargetRef instance, LLDBSBModuleRef module); + +LLDB_API LLDBSBDebuggerRef LLDBSBTargetGetDebugger(LLDBSBTargetRef instance); + +LLDB_API LLDBSBModuleRef LLDBSBTargetFindModule(LLDBSBTargetRef instance, LLDBSBFileSpecRef file_spec); + +LLDB_API LLDBByteOrder LLDBSBTargetGetByteOrder(LLDBSBTargetRef instance); + +LLDB_API unsigned int LLDBSBTargetGetAddressByteSize(LLDBSBTargetRef instance); + +LLDB_API const char *LLDBSBTargetGetTriple(LLDBSBTargetRef instance); + +LLDB_API unsigned int LLDBSBTargetGetDataByteSize(LLDBSBTargetRef instance); + +LLDB_API unsigned int LLDBSBTargetGetCodeByteSize(LLDBSBTargetRef instance); + +LLDB_API LLDBSBErrorRef +LLDBSBTargetSetSectionLoadAddress(LLDBSBTargetRef instance, LLDBSBSectionRef section, lldb::addr_t section_base_addr); + +LLDB_API LLDBSBErrorRef LLDBSBTargetClearSectionLoadAddress(LLDBSBTargetRef instance, LLDBSBSectionRef section); + +LLDB_API LLDBSBErrorRef +LLDBSBTargetSetModuleLoadAddress(LLDBSBTargetRef instance, LLDBSBModuleRef module, int64_t sections_offset); + +LLDB_API LLDBSBErrorRef LLDBSBTargetClearModuleLoadAddress(LLDBSBTargetRef instance, LLDBSBModuleRef module); + +LLDB_API LLDBSBSymbolContextListRef +LLDBSBTargetFindFunctions(LLDBSBTargetRef instance, const char *name, uint32_t name_type_mask); + +LLDB_API LLDBSBValueListRef +LLDBSBTargetFindGlobalVariables(LLDBSBTargetRef instance, const char *name, uint32_t max_matches); + +LLDB_API LLDBSBValueRef LLDBSBTargetFindFirstGlobalVariable(LLDBSBTargetRef instance, const char *name); + +LLDB_API LLDBSBValueListRef LLDBSBTargetFindGlobalVariables2(LLDBSBTargetRef instance, const char *name, + uint32_t max_matches, LLDBMatchType matchtype); + +LLDB_API LLDBSBSymbolContextListRef LLDBSBTargetFindGlobalFunctions(LLDBSBTargetRef instance, const char *name, + uint32_t max_matches, LLDBMatchType matchtype); + +LLDB_API void LLDBSBTargetClear(LLDBSBTargetRef instance); + +LLDB_API LLDBSBAddressRef LLDBSBTargetResolveFileAddress(LLDBSBTargetRef instance, lldb::addr_t file_addr); + +LLDB_API LLDBSBAddressRef LLDBSBTargetResolveLoadAddress(LLDBSBTargetRef instance, lldb::addr_t vm_addr); + +LLDB_API LLDBSBAddressRef +LLDBSBTargetResolvePastLoadAddress(LLDBSBTargetRef instance, uint32_t stop_id, lldb::addr_t vm_addr); + +LLDB_API LLDBSBSymbolContextRef +LLDBSBTargetResolveSymbolContextForAddress(LLDBSBTargetRef instance, LLDBSBAddressRef addr, uint32_t resolve_scope); + +LLDB_API unsigned int LLDBSBTargetReadMemory(LLDBSBTargetRef instance, LLDBSBAddressRef addr, void *buf, size_t size, + LLDBSBErrorRef error); + +LLDB_API LLDBSBBreakpointRef +LLDBSBTargetBreakpointCreateByLocation(LLDBSBTargetRef instance, const char *file, uint32_t line); + +LLDB_API LLDBSBBreakpointRef +LLDBSBTargetBreakpointCreateByLocation2(LLDBSBTargetRef instance, LLDBSBFileSpecRef file_spec, uint32_t line); + +LLDB_API LLDBSBBreakpointRef +LLDBSBTargetBreakpointCreateByName(LLDBSBTargetRef instance, const char *symbol_name, const char *module_name); + +LLDB_API LLDBSBBreakpointRef LLDBSBTargetBreakpointCreateByName2(LLDBSBTargetRef instance, const char *symbol_name, + LLDBSBFileSpecListRef module_list, + LLDBSBFileSpecListRef comp_unit_list); + +LLDB_API LLDBSBBreakpointRef +LLDBSBTargetBreakpointCreateByName3(LLDBSBTargetRef instance, const char *symbol_name, uint32_t name_type_mask, + LLDBSBFileSpecListRef module_list, LLDBSBFileSpecListRef comp_unit_list); + +LLDB_API LLDBSBBreakpointRef LLDBSBTargetBreakpointCreateByNames(LLDBSBTargetRef instance, const char **symbol_name, + uint32_t num_names, uint32_t name_type_mask, + LLDBSBFileSpecListRef module_list, + LLDBSBFileSpecListRef comp_unit_list); + +LLDB_API LLDBSBBreakpointRef +LLDBSBTargetBreakpointCreateByRegex(LLDBSBTargetRef instance, const char *symbol_name_regex, const char *module_name); + +LLDB_API LLDBSBBreakpointRef +LLDBSBTargetBreakpointCreateByRegex2(LLDBSBTargetRef instance, const char *symbol_name_regex, + LLDBSBFileSpecListRef module_list, LLDBSBFileSpecListRef comp_unit_list); + +LLDB_API LLDBSBBreakpointRef +LLDBSBTargetBreakpointCreateBySourceRegex(LLDBSBTargetRef instance, const char *source_regex, + LLDBSBFileSpecRef source_file, const char *module_name); + +LLDB_API LLDBSBBreakpointRef +LLDBSBTargetBreakpointCreateBySourceRegex2(LLDBSBTargetRef instance, const char *source_regex, + LLDBSBFileSpecListRef module_list, LLDBSBFileSpecListRef source_file); + +LLDB_API LLDBSBBreakpointRef LLDBSBTargetBreakpointCreateForException(LLDBSBTargetRef instance, + LLDBLanguageType language, bool catch_bp, + bool throw_bp); + +LLDB_API LLDBSBBreakpointRef LLDBSBTargetBreakpointCreateByAddress(LLDBSBTargetRef instance, lldb::addr_t address); + +LLDB_API unsigned int LLDBSBTargetGetNumBreakpoints(LLDBSBTargetRef instance); + +LLDB_API LLDBSBBreakpointRef LLDBSBTargetGetBreakpointAtIndex(LLDBSBTargetRef instance, uint32_t idx); + +LLDB_API bool LLDBSBTargetBreakpointDelete(LLDBSBTargetRef instance, int break_id); + +LLDB_API LLDBSBBreakpointRef LLDBSBTargetFindBreakpointByID(LLDBSBTargetRef instance, int break_id); + +LLDB_API bool LLDBSBTargetEnableAllBreakpoints(LLDBSBTargetRef instance); + +LLDB_API bool LLDBSBTargetDisableAllBreakpoints(LLDBSBTargetRef instance); + +LLDB_API bool LLDBSBTargetDeleteAllBreakpoints(LLDBSBTargetRef instance); + +LLDB_API unsigned int LLDBSBTargetGetNumWatchpoints(LLDBSBTargetRef instance); + +LLDB_API LLDBSBWatchpointRef LLDBSBTargetGetWatchpointAtIndex(LLDBSBTargetRef instance, uint32_t idx); + +LLDB_API bool LLDBSBTargetDeleteWatchpoint(LLDBSBTargetRef instance, int watch_id); + +LLDB_API LLDBSBWatchpointRef LLDBSBTargetFindWatchpointByID(LLDBSBTargetRef instance, int watch_id); + +LLDB_API LLDBSBWatchpointRef LLDBSBTargetWatchAddress(LLDBSBTargetRef instance, lldb::addr_t addr, size_t size, + bool read, bool write, LLDBSBErrorRef error); + +LLDB_API bool LLDBSBTargetEnableAllWatchpoints(LLDBSBTargetRef instance); + +LLDB_API bool LLDBSBTargetDisableAllWatchpoints(LLDBSBTargetRef instance); + +LLDB_API bool LLDBSBTargetDeleteAllWatchpoints(LLDBSBTargetRef instance); + +LLDB_API LLDBSBBroadcasterRef LLDBSBTargetGetBroadcaster(LLDBSBTargetRef instance); + +LLDB_API LLDBSBTypeRef LLDBSBTargetFindFirstType(LLDBSBTargetRef instance, const char *type); + +LLDB_API LLDBSBTypeListRef LLDBSBTargetFindTypes(LLDBSBTargetRef instance, const char *type); + +LLDB_API LLDBSBTypeRef LLDBSBTargetGetBasicType(LLDBSBTargetRef instance, LLDBBasicType type); + +LLDB_API LLDBSBValueRef LLDBSBTargetCreateValueFromAddress(LLDBSBTargetRef instance, const char *name, + LLDBSBAddressRef addr, LLDBSBTypeRef type); + +LLDB_API LLDBSBValueRef +LLDBSBTargetCreateValueFromData(LLDBSBTargetRef instance, const char *name, LLDBSBDataRef data, LLDBSBTypeRef type); + +LLDB_API LLDBSBValueRef +LLDBSBTargetCreateValueFromExpression(LLDBSBTargetRef instance, const char *name, const char *expr); + +LLDB_API LLDBSBSourceManagerRef LLDBSBTargetGetSourceManager(LLDBSBTargetRef instance); + +LLDB_API LLDBSBInstructionListRef +LLDBSBTargetReadInstructions(LLDBSBTargetRef instance, LLDBSBAddressRef base_addr, uint32_t count); + +LLDB_API LLDBSBInstructionListRef LLDBSBTargetReadInstructions2(LLDBSBTargetRef instance, LLDBSBAddressRef base_addr, + uint32_t count, const char *flavor_string); + +LLDB_API LLDBSBInstructionListRef +LLDBSBTargetGetInstructions(LLDBSBTargetRef instance, LLDBSBAddressRef base_addr, void *buf, size_t size); + +LLDB_API LLDBSBInstructionListRef +LLDBSBTargetGetInstructionsWithFlavor(LLDBSBTargetRef instance, LLDBSBAddressRef base_addr, const char *flavor_string, + void *buf, size_t size); + +LLDB_API LLDBSBInstructionListRef +LLDBSBTargetGetInstructions2(LLDBSBTargetRef instance, lldb::addr_t base_addr, void *buf, size_t size); + +LLDB_API LLDBSBInstructionListRef +LLDBSBTargetGetInstructionsWithFlavor2(LLDBSBTargetRef instance, lldb::addr_t base_addr, const char *flavor_string, + void *buf, size_t size); + +LLDB_API LLDBSBSymbolContextListRef +LLDBSBTargetFindSymbols(LLDBSBTargetRef instance, const char *name, LLDBSymbolType type); + +LLDB_API bool LLDBSBTargetGetDescription(LLDBSBTargetRef instance, LLDBSBStreamRef description, + LLDBDescriptionLevel description_level); + +LLDB_API LLDBSBValueRef +LLDBSBTargetEvaluateExpression(LLDBSBTargetRef instance, const char *expr, LLDBSBExpressionOptionsRef options); + +LLDB_API unsigned long long LLDBSBTargetGetStackRedZoneSize(LLDBSBTargetRef instance); + +LLDB_API LLDBSBLaunchInfoRef LLDBSBTargetGetLaunchInfo(LLDBSBTargetRef instance); + +LLDB_API void LLDBSBTargetSetLaunchInfo(LLDBSBTargetRef instance, LLDBSBLaunchInfoRef launch_info); + +#ifdef __cplusplus +} +#endif + +#endif // LLDB_SBTargetBinding_h_ Index: include/lldb/Bindings/SBThreadBinding.h =================================================================== --- include/lldb/Bindings/SBThreadBinding.h +++ include/lldb/Bindings/SBThreadBinding.h @@ -0,0 +1,118 @@ +//===-- SBThreadBinding.h ---------------------------------------*- C++ -*-===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +#ifndef LLDB_SBThreadBinding_h_ +#define LLDB_SBThreadBinding_h_ + +#include "lldb/Bindings/SBBindingDefines.h" + +#ifdef __cplusplus +extern "C" { +#endif + +LLDB_API const char *LLDBSBThreadGetBroadcasterClassName(); + +LLDB_API LLDBSBThreadRef LLDBCreateSBThread(); + +LLDB_API void LLDBDisposeSBThread(LLDBSBThreadRef instance); + +LLDB_API LLDBSBQueueRef LLDBSBThreadGetQueue(LLDBSBThreadRef instance); + +LLDB_API bool LLDBSBThreadIsValid(LLDBSBThreadRef instance); + +LLDB_API void LLDBSBThreadClear(LLDBSBThreadRef instance); + +LLDB_API LLDBStopReason LLDBSBThreadGetStopReason(LLDBSBThreadRef instance); + +LLDB_API unsigned int LLDBSBThreadGetStopReasonDataCount(LLDBSBThreadRef instance); + +LLDB_API unsigned long long LLDBSBThreadGetStopReasonDataAtIndex(LLDBSBThreadRef instance, uint32_t idx); + +LLDB_API bool LLDBSBThreadGetStopReasonExtendedInfoAsJSON(LLDBSBThreadRef instance, LLDBSBStreamRef stream); + +LLDB_API unsigned int LLDBSBThreadGetStopDescription(LLDBSBThreadRef instance, char *dst, size_t dst_len); + +LLDB_API LLDBSBValueRef LLDBSBThreadGetStopReturnValue(LLDBSBThreadRef instance); + +LLDB_API unsigned long long LLDBSBThreadGetThreadID(LLDBSBThreadRef instance); + +LLDB_API unsigned int LLDBSBThreadGetIndexID(LLDBSBThreadRef instance); + +LLDB_API const char *LLDBSBThreadGetName(LLDBSBThreadRef instance); + +LLDB_API const char *LLDBSBThreadGetQueueName(LLDBSBThreadRef instance); + +LLDB_API unsigned long long LLDBSBThreadGetQueueID(LLDBSBThreadRef instance); + +LLDB_API bool LLDBSBThreadGetInfoItemByPathAsString(LLDBSBThreadRef instance, const char *path, LLDBSBStreamRef strm); + +LLDB_API void LLDBSBThreadStepOver(LLDBSBThreadRef instance, LLDBRunMode stop_other_threads); + +LLDB_API void LLDBSBThreadStepInto(LLDBSBThreadRef instance, LLDBRunMode stop_other_threads); + +LLDB_API void LLDBSBThreadStepInto2(LLDBSBThreadRef instance, const char *target_name, LLDBRunMode stop_other_threads); + +LLDB_API void LLDBSBThreadStepOut(LLDBSBThreadRef instance); + +LLDB_API void LLDBSBThreadStepOutOfFrame(LLDBSBThreadRef instance, LLDBSBFrameRef frame); + +LLDB_API void LLDBSBThreadStepInstruction(LLDBSBThreadRef instance, bool step_over); + +LLDB_API LLDBSBErrorRef +LLDBSBThreadStepOverUntil(LLDBSBThreadRef instance, LLDBSBFrameRef frame, LLDBSBFileSpecRef file_spec, uint32_t line); + +LLDB_API LLDBSBErrorRef +LLDBSBThreadStepUsingScriptedThreadPlan(LLDBSBThreadRef instance, const char *script_class_name); + +LLDB_API LLDBSBErrorRef LLDBSBThreadJumpToLine(LLDBSBThreadRef instance, LLDBSBFileSpecRef file_spec, uint32_t line); + +LLDB_API void LLDBSBThreadRunToAddress(LLDBSBThreadRef instance, lldb::addr_t addr); + +LLDB_API LLDBSBErrorRef +LLDBSBThreadReturnFromFrame(LLDBSBThreadRef instance, LLDBSBFrameRef frame, LLDBSBValueRef return_value); + +LLDB_API bool LLDBSBThreadSuspend(LLDBSBThreadRef instance); + +LLDB_API bool LLDBSBThreadResume(LLDBSBThreadRef instance); + +LLDB_API bool LLDBSBThreadIsSuspended(LLDBSBThreadRef instance); + +LLDB_API bool LLDBSBThreadIsStopped(LLDBSBThreadRef instance); + +LLDB_API unsigned int LLDBSBThreadGetNumFrames(LLDBSBThreadRef instance); + +LLDB_API LLDBSBFrameRef LLDBSBThreadGetFrameAtIndex(LLDBSBThreadRef instance, uint32_t idx); + +LLDB_API LLDBSBFrameRef LLDBSBThreadGetSelectedFrame(LLDBSBThreadRef instance); + +LLDB_API LLDBSBFrameRef LLDBSBThreadSetSelectedFrame(LLDBSBThreadRef instance, uint32_t frame_idx); + +LLDB_API bool LLDBSBThreadEventIsThreadEvent(LLDBSBEventRef event); + +LLDB_API LLDBSBFrameRef LLDBSBThreadGetStackFrameFromEvent(LLDBSBEventRef event); + +LLDB_API LLDBSBThreadRef LLDBSBThreadGetThreadFromEvent(LLDBSBEventRef event); + +LLDB_API LLDBSBProcessRef LLDBSBThreadGetProcess(LLDBSBThreadRef instance); + +LLDB_API bool LLDBSBThreadGetDescription(LLDBSBThreadRef instance, LLDBSBStreamRef description); + +LLDB_API bool LLDBSBThreadGetStatus(LLDBSBThreadRef instance, LLDBSBStreamRef status); + +LLDB_API LLDBSBThreadRef LLDBSBThreadGetExtendedBacktraceThread(LLDBSBThreadRef instance, const char *type); + +LLDB_API unsigned int LLDBSBThreadGetExtendedBacktraceOriginatingIndexID(LLDBSBThreadRef instance); + +LLDB_API bool LLDBSBThreadSafeToCallFunctions(LLDBSBThreadRef instance); + +#ifdef __cplusplus +} +#endif + +#endif // LLDB_SBThreadBinding_h_ Index: include/lldb/Bindings/SBThreadCollectionBinding.h =================================================================== --- include/lldb/Bindings/SBThreadCollectionBinding.h +++ include/lldb/Bindings/SBThreadCollectionBinding.h @@ -0,0 +1,33 @@ +//===-- SBThreadCollectionBinding.h -----------------------------*- C++ -*-===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +#ifndef LLDB_SBThreadCollectionBinding_h_ +#define LLDB_SBThreadCollectionBinding_h_ + +#include "lldb/Bindings/SBBindingDefines.h" + +#ifdef __cplusplus +extern "C" { +#endif + +LLDB_API LLDBSBThreadCollectionRef LLDBCreateSBThreadCollection(); + +LLDB_API void LLDBDisposeSBThreadCollection(LLDBSBThreadCollectionRef instance); + +LLDB_API bool LLDBSBThreadCollectionIsValid(LLDBSBThreadCollectionRef instance); + +LLDB_API unsigned int LLDBSBThreadCollectionGetSize(LLDBSBThreadCollectionRef instance); + +LLDB_API LLDBSBThreadRef LLDBSBThreadCollectionGetThreadAtIndex(LLDBSBThreadCollectionRef instance, size_t idx); + +#ifdef __cplusplus +} +#endif + +#endif // LLDB_SBThreadCollectionBinding_h_ Index: include/lldb/Bindings/SBThreadPlanBinding.h =================================================================== --- include/lldb/Bindings/SBThreadPlanBinding.h +++ include/lldb/Bindings/SBThreadPlanBinding.h @@ -0,0 +1,63 @@ +//===-- SBThreadPlanBinding.h -----------------------------------*- C++ -*-===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +#ifndef LLDB_SBThreadPlanBinding_h_ +#define LLDB_SBThreadPlanBinding_h_ + +#include "lldb/Bindings/SBBindingDefines.h" + +#ifdef __cplusplus +extern "C" { +#endif + +LLDB_API LLDBSBThreadPlanRef LLDBCreateSBThreadPlan(); + +LLDB_API LLDBSBThreadPlanRef LLDBCreateSBThreadPlan2(LLDBSBThreadRef thread, const char *class_name); + +LLDB_API void LLDBDisposeSBThreadPlan(LLDBSBThreadPlanRef instance); + +LLDB_API bool LLDBSBThreadPlanIsValid(LLDBSBThreadPlanRef instance); + +LLDB_API void LLDBSBThreadPlanClear(LLDBSBThreadPlanRef instance); + +LLDB_API enum LLDBStopReason LLDBSBThreadPlanGetStopReason(LLDBSBThreadPlanRef instance); + +LLDB_API unsigned int LLDBSBThreadPlanGetStopReasonDataCount(LLDBSBThreadPlanRef instance); + +LLDB_API unsigned long long LLDBSBThreadPlanGetStopReasonDataAtIndex(LLDBSBThreadPlanRef instance, uint32_t idx); + +LLDB_API LLDBSBThreadRef LLDBSBThreadPlanGetThread(LLDBSBThreadPlanRef instance); + +LLDB_API bool LLDBSBThreadPlanGetDescription(LLDBSBThreadPlanRef instance, LLDBSBStreamRef description); + +LLDB_API void LLDBSBThreadPlanSetPlanComplete(LLDBSBThreadPlanRef instance, bool success); + +LLDB_API bool LLDBSBThreadPlanIsPlanComplete(LLDBSBThreadPlanRef instance); + +LLDB_API bool LLDBSBThreadPlanIsValid(LLDBSBThreadPlanRef instance); + +LLDB_API LLDBSBThreadPlanRef LLDBSBThreadPlanQueueThreadPlanForStepOverRange(LLDBSBThreadPlanRef instance, + LLDBSBAddressRef start_address, + lldb::addr_t range_size); + +LLDB_API LLDBSBThreadPlanRef LLDBSBThreadPlanQueueThreadPlanForStepInRange(LLDBSBThreadPlanRef instance, + LLDBSBAddressRef start_address, + lldb::addr_t range_size); + +LLDB_API LLDBSBThreadPlanRef +LLDBSBThreadPlanQueueThreadPlanForStepOut(LLDBSBThreadPlanRef instance, uint32_t frame_idx_to_step_to, bool first_insn); + +LLDB_API LLDBSBThreadPlanRef +LLDBSBThreadPlanQueueThreadPlanForRunToAddress(LLDBSBThreadPlanRef instance, LLDBSBAddressRef address); + +#ifdef __cplusplus +} +#endif + +#endif // LLDB_SBThreadPlanBinding_h_ Index: include/lldb/Bindings/SBTypeBinding.h =================================================================== --- include/lldb/Bindings/SBTypeBinding.h +++ include/lldb/Bindings/SBTypeBinding.h @@ -0,0 +1,164 @@ +//===-- SBTypeBinding.h -----------------------------------------*- C++ -*-===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +#ifndef LLDB_SBTypeBinding_h_ +#define LLDB_SBTypeBinding_h_ + +#include "lldb/Bindings/SBBindingDefines.h" + +#ifdef __cplusplus +extern "C" { +#endif + +LLDB_API LLDBSBTypeMemberRef LLDBCreateSBTypeMember(); + +LLDB_API void LLDBDisposeSBTypeMember(LLDBSBTypeMemberRef instance); + +LLDB_API bool LLDBSBTypeMemberIsValid(LLDBSBTypeMemberRef instance); + +LLDB_API const char *LLDBSBTypeMemberGetName(LLDBSBTypeMemberRef instance); + +LLDB_API LLDBSBTypeRef LLDBSBTypeMemberGetType(LLDBSBTypeMemberRef instance); + +LLDB_API unsigned long long LLDBSBTypeMemberGetOffsetInBytes(LLDBSBTypeMemberRef instance); + +LLDB_API unsigned long long LLDBSBTypeMemberGetOffsetInBits(LLDBSBTypeMemberRef instance); + +LLDB_API bool LLDBSBTypeMemberIsBitfield(LLDBSBTypeMemberRef instance); + +LLDB_API unsigned int LLDBSBTypeMemberGetBitfieldSizeInBits(LLDBSBTypeMemberRef instance); + +LLDB_API bool LLDBSBTypeMemberGetDescription(LLDBSBTypeMemberRef instance, LLDBSBStreamRef description, + LLDBDescriptionLevel description_level); + +LLDB_API LLDBSBTypeMemberFunctionRef LLDBCreateSBTypeMemberFunction(); + +LLDB_API LLDBSBTypeMemberFunctionRef LLDBCreateSBTypeMemberFunction2(LLDBSBTypeMemberFunctionRef rhs); + +LLDB_API void LLDBDisposeSBTypeMemberFunction(LLDBSBTypeMemberFunctionRef instance); + +LLDB_API bool LLDBSBTypeMemberFunctionIsValid(LLDBSBTypeMemberFunctionRef instance); + +LLDB_API const char *LLDBSBTypeMemberFunctionGetName(LLDBSBTypeMemberFunctionRef instance); + +LLDB_API LLDBSBTypeRef LLDBSBTypeMemberFunctionGetType(LLDBSBTypeMemberFunctionRef instance); + +LLDB_API LLDBSBTypeRef LLDBSBTypeMemberFunctionGetReturnType(LLDBSBTypeMemberFunctionRef instance); + +LLDB_API unsigned int LLDBSBTypeMemberFunctionGetNumberOfArguments(LLDBSBTypeMemberFunctionRef instance); + +LLDB_API LLDBSBTypeRef LLDBSBTypeMemberFunctionGetArgumentTypeAtIndex(LLDBSBTypeMemberFunctionRef instance, uint32_t); + +LLDB_API LLDBMemberFunctionKind LLDBSBTypeMemberFunctionGetKind(LLDBSBTypeMemberFunctionRef instance); + +LLDB_API bool LLDBSBTypeMemberFunctionGetDescription(LLDBSBTypeMemberFunctionRef instance, LLDBSBStreamRef description, + LLDBDescriptionLevel description_level); + +LLDB_API LLDBSBTypeRef LLDBCreateSBType(); + +LLDB_API void LLDBDisposeSBType(LLDBSBTypeRef instance); + +LLDB_API bool LLDBSBTypeIsValid(LLDBSBTypeRef instance); + +LLDB_API unsigned long long LLDBSBTypeGetByteSize(LLDBSBTypeRef instance); + +LLDB_API bool LLDBSBTypeIsPointerType(LLDBSBTypeRef instance); + +LLDB_API bool LLDBSBTypeIsReferenceType(LLDBSBTypeRef instance); + +LLDB_API bool LLDBSBTypeIsFunctionType(LLDBSBTypeRef instance); + +LLDB_API bool LLDBSBTypeIsPolymorphicClass(LLDBSBTypeRef instance); + +LLDB_API bool LLDBSBTypeIsArrayType(LLDBSBTypeRef instance); + +LLDB_API bool LLDBSBTypeIsVectorType(LLDBSBTypeRef instance); + +LLDB_API bool LLDBSBTypeIsTypedefType(LLDBSBTypeRef instance); + +LLDB_API LLDBSBTypeRef LLDBSBTypeGetPointerType(LLDBSBTypeRef instance); + +LLDB_API LLDBSBTypeRef LLDBSBTypeGetPointeeType(LLDBSBTypeRef instance); + +LLDB_API LLDBSBTypeRef LLDBSBTypeGetReferenceType(LLDBSBTypeRef instance); + +LLDB_API LLDBSBTypeRef LLDBSBTypeGetTypedefedType(LLDBSBTypeRef instance); + +LLDB_API LLDBSBTypeRef LLDBSBTypeGetDereferencedType(LLDBSBTypeRef instance); + +LLDB_API LLDBSBTypeRef LLDBSBTypeGetUnqualifiedType(LLDBSBTypeRef instance); + +LLDB_API LLDBSBTypeRef LLDBSBTypeGetArrayElementType(LLDBSBTypeRef instance); + +LLDB_API LLDBSBTypeRef LLDBSBTypeGetVectorElementType(LLDBSBTypeRef instance); + +LLDB_API LLDBSBTypeRef LLDBSBTypeGetCanonicalType(LLDBSBTypeRef instance); + +LLDB_API LLDBBasicType LLDBSBTypeGetBasicType(LLDBSBTypeRef instance); + +LLDB_API LLDBSBTypeRef LLDBSBTypeGetBasicType2(LLDBSBTypeRef instance, LLDBBasicType type); + +LLDB_API unsigned int LLDBSBTypeGetNumberOfFields(LLDBSBTypeRef instance); + +LLDB_API unsigned int LLDBSBTypeGetNumberOfDirectBaseClasses(LLDBSBTypeRef instance); + +LLDB_API unsigned int LLDBSBTypeGetNumberOfVirtualBaseClasses(LLDBSBTypeRef instance); + +LLDB_API LLDBSBTypeMemberRef LLDBSBTypeGetFieldAtIndex(LLDBSBTypeRef instance, uint32_t idx); + +LLDB_API LLDBSBTypeMemberRef LLDBSBTypeGetDirectBaseClassAtIndex(LLDBSBTypeRef instance, uint32_t idx); + +LLDB_API LLDBSBTypeMemberRef LLDBSBTypeGetVirtualBaseClassAtIndex(LLDBSBTypeRef instance, uint32_t idx); + +LLDB_API LLDBSBTypeEnumMemberListRef LLDBSBTypeGetEnumMembers(LLDBSBTypeRef instance); + +LLDB_API unsigned int LLDBSBTypeGetNumberOfTemplateArguments(LLDBSBTypeRef instance); + +LLDB_API LLDBSBTypeRef LLDBSBTypeGetTemplateArgumentType(LLDBSBTypeRef instance, uint32_t idx); + +LLDB_API LLDBTemplateArgumentKind LLDBSBTypeGetTemplateArgumentKind(LLDBSBTypeRef instance, uint32_t idx); + +LLDB_API LLDBSBTypeRef LLDBSBTypeGetFunctionReturnType(LLDBSBTypeRef instance); + +LLDB_API LLDBSBTypeListRef LLDBSBTypeGetFunctionArgumentTypes(LLDBSBTypeRef instance); + +LLDB_API unsigned int LLDBSBTypeGetNumberOfMemberFunctions(LLDBSBTypeRef instance); + +LLDB_API LLDBSBTypeMemberFunctionRef LLDBSBTypeGetMemberFunctionAtIndex(LLDBSBTypeRef instance, uint32_t idx); + +LLDB_API const char *LLDBSBTypeGetName(LLDBSBTypeRef instance); + +LLDB_API const char *LLDBSBTypeGetDisplayTypeName(LLDBSBTypeRef instance); + +LLDB_API LLDBTypeClass LLDBSBTypeGetTypeClass(LLDBSBTypeRef instance); + +LLDB_API bool LLDBSBTypeIsTypeComplete(LLDBSBTypeRef instance); + +LLDB_API unsigned int LLDBSBTypeGetTypeFlags(LLDBSBTypeRef instance); + +LLDB_API bool LLDBSBTypeGetDescription(LLDBSBTypeRef instance, LLDBSBStreamRef description, + LLDBDescriptionLevel description_level); + +LLDB_API LLDBSBTypeListRef LLDBCreateSBTypeList(); + +LLDB_API void LLDBDisposeSBTypeList(LLDBSBTypeListRef instance); + +LLDB_API bool LLDBSBTypeListIsValid(LLDBSBTypeListRef instance); + +LLDB_API void LLDBSBTypeListAppend(LLDBSBTypeListRef instance, LLDBSBTypeRef type); + +LLDB_API LLDBSBTypeRef LLDBSBTypeListGetTypeAtIndex(LLDBSBTypeListRef instance, uint32_t index); + +LLDB_API unsigned int LLDBSBTypeListGetSize(LLDBSBTypeListRef instance); + +#ifdef __cplusplus +} +#endif + +#endif // LLDB_SBTypeBinding_h_ Index: include/lldb/Bindings/SBTypeCategoryBinding.h =================================================================== --- include/lldb/Bindings/SBTypeCategoryBinding.h +++ include/lldb/Bindings/SBTypeCategoryBinding.h @@ -0,0 +1,100 @@ +//===-- SBTypeCategoryBinding.h ----------------------------------*- C++ -*-===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +#ifndef LLDB_SBTypeCategoryBinding_h_ +#define LLDB_SBTypeCategoryBinding_h_ + +#include "lldb/Bindings/SBBindingDefines.h" + +#ifdef __cplusplus +extern "C" { +#endif + +LLDB_API LLDBSBTypeCategoryRef LLDBCreateSBTypeCategory(); + +LLDB_API LLDBSBTypeCategoryRef LLDBCreateSBTypeCategory(LLDBSBTypeCategoryRef rhs); + +LLDB_API void LLDBDisposeSBTypeCategory(LLDBSBTypeCategoryRef instance); + +LLDB_API bool LLDBSBTypeCategoryIsValid(LLDBSBTypeCategoryRef instance); + +LLDB_API bool LLDBSBTypeCategoryGetEnabled(LLDBSBTypeCategoryRef instance); + +LLDB_API void LLDBSBTypeCategorySetEnabled(LLDBSBTypeCategoryRef instance, bool); + +LLDB_API const char *LLDBSBTypeCategoryGetName(LLDBSBTypeCategoryRef instance); + +LLDB_API bool LLDBSBTypeCategoryGetDescription(LLDBSBTypeCategoryRef instance, LLDBSBStreamRef description, + LLDBDescriptionLevel description_level); + +LLDB_API unsigned int LLDBSBTypeCategoryGetNumFormats(LLDBSBTypeCategoryRef instance); + +LLDB_API unsigned int LLDBSBTypeCategoryGetNumSummaries(LLDBSBTypeCategoryRef instance); + +LLDB_API unsigned int LLDBSBTypeCategoryGetNumFilters(LLDBSBTypeCategoryRef instance); + +LLDB_API unsigned int LLDBSBTypeCategoryGetNumSynthetics(LLDBSBTypeCategoryRef instance); + +LLDB_API LLDBSBTypeNameSpecifierRef +LLDBSBTypeCategoryGetTypeNameSpecifierForFilterAtIndex(LLDBSBTypeCategoryRef instance, uint32_t); + +LLDB_API LLDBSBTypeNameSpecifierRef +LLDBSBTypeCategoryGetTypeNameSpecifierForFormatAtIndex(LLDBSBTypeCategoryRef instance, uint32_t); + +LLDB_API LLDBSBTypeNameSpecifierRef +LLDBSBTypeCategoryGetTypeNameSpecifierForSummaryAtIndex(LLDBSBTypeCategoryRef instance, uint32_t); + +LLDB_API LLDBSBTypeNameSpecifierRef +LLDBSBTypeCategoryGetTypeNameSpecifierForSyntheticAtIndex(LLDBSBTypeCategoryRef instance, uint32_t); + +LLDB_API LLDBSBTypeFilterRef +LLDBSBTypeCategoryGetFilterForType(LLDBSBTypeCategoryRef instance, LLDBSBTypeNameSpecifierRef); + +LLDB_API LLDBSBTypeFormatRef +LLDBSBTypeCategoryGetFormatForType(LLDBSBTypeCategoryRef instance, LLDBSBTypeNameSpecifierRef); + +LLDB_API LLDBSBTypeSummaryRef +LLDBSBTypeCategoryGetSummaryForType(LLDBSBTypeCategoryRef instance, LLDBSBTypeNameSpecifierRef); + +LLDB_API LLDBSBTypeSyntheticRef +LLDBSBTypeCategoryGetSyntheticForType(LLDBSBTypeCategoryRef instance, LLDBSBTypeNameSpecifierRef); + +LLDB_API LLDBSBTypeFilterRef LLDBSBTypeCategoryGetFilterAtIndex(LLDBSBTypeCategoryRef instance, uint32_t); + +LLDB_API LLDBSBTypeFormatRef LLDBSBTypeCategoryGetFormatAtIndex(LLDBSBTypeCategoryRef instance, uint32_t); + +LLDB_API LLDBSBTypeSummaryRef LLDBSBTypeCategoryGetSummaryAtIndex(LLDBSBTypeCategoryRef instance, uint32_t); + +LLDB_API LLDBSBTypeSyntheticRef LLDBSBTypeCategoryGetSyntheticAtIndex(LLDBSBTypeCategoryRef instance, uint32_t); + +LLDB_API bool LLDBSBTypeCategoryAddTypeFormat(LLDBSBTypeCategoryRef instance, LLDBSBTypeNameSpecifierRef, + LLDBSBTypeFormatRef); + +LLDB_API bool LLDBSBTypeCategoryDeleteTypeFormat(LLDBSBTypeCategoryRef instance, LLDBSBTypeNameSpecifierRef); + +LLDB_API bool LLDBSBTypeCategoryAddTypeSummary(LLDBSBTypeCategoryRef instance, LLDBSBTypeNameSpecifierRef, + LLDBSBTypeSummaryRef); + +LLDB_API bool LLDBSBTypeCategoryDeleteTypeSummary(LLDBSBTypeCategoryRef instance, LLDBSBTypeNameSpecifierRef); + +LLDB_API bool LLDBSBTypeCategoryAddTypeFilter(LLDBSBTypeCategoryRef instance, LLDBSBTypeNameSpecifierRef, + LLDBSBTypeFilterRef); + +LLDB_API bool LLDBSBTypeCategoryDeleteTypeFilter(LLDBSBTypeCategoryRef instance, LLDBSBTypeNameSpecifierRef); + +LLDB_API bool LLDBSBTypeCategoryAddTypeSynthetic(LLDBSBTypeCategoryRef instance, LLDBSBTypeNameSpecifierRef, + LLDBSBTypeSyntheticRef); + +LLDB_API bool LLDBSBTypeCategoryDeleteTypeSynthetic(LLDBSBTypeCategoryRef instance, LLDBSBTypeNameSpecifierRef); + +#ifdef __cplusplus +} +#endif + +#endif // LLDB_SBTypeCategoryBinding_h_ Index: include/lldb/Bindings/SBTypeEnumMemberBinding.h =================================================================== --- include/lldb/Bindings/SBTypeEnumMemberBinding.h +++ include/lldb/Bindings/SBTypeEnumMemberBinding.h @@ -0,0 +1,55 @@ +//===-- SBTypeEnumMemberBinding.h -------------------------------*- C++ -*-===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +#ifndef LLDB_SBTypeEnumMemberBinding_h_ +#define LLDB_SBTypeEnumMemberBinding_h_ + +#include "lldb/Bindings/SBBindingDefines.h" + +#ifdef __cplusplus +extern "C" { +#endif + +LLDB_API LLDBSBTypeEnumMemberRef LLDBCreateSBTypeEnumMember(); + +LLDB_API void LLDBDisposeSBTypeEnumMember(LLDBSBTypeEnumMemberRef instance); + +LLDB_API bool LLDBSBTypeEnumMemberIsValid(LLDBSBTypeEnumMemberRef instance); + +LLDB_API long long LLDBSBTypeEnumMemberGetValueAsSigned(LLDBSBTypeEnumMemberRef instance); + +LLDB_API unsigned long long LLDBSBTypeEnumMemberGetValueAsUnsigned(LLDBSBTypeEnumMemberRef instance); + +LLDB_API const char *LLDBSBTypeEnumMemberGetName(LLDBSBTypeEnumMemberRef instance); + +LLDB_API LLDBSBTypeRef LLDBSBTypeEnumMemberGetType(LLDBSBTypeEnumMemberRef instance); + +LLDB_API bool LLDBSBTypeEnumMemberGetDescription(LLDBSBTypeEnumMemberRef instance, LLDBSBStreamRef description, + LLDBDescriptionLevel description_level); + +LLDB_API LLDBSBTypeEnumMemberListRef LLDBCreateSBTypeEnumMemberList(); + +LLDB_API LLDBSBTypeEnumMemberListRef LLDBCreateSBTypeEnumMemberList(LLDBSBTypeEnumMemberListRef rhs); + +LLDB_API void LLDBDisposeSBTypeEnumMemberList(LLDBSBTypeEnumMemberListRef instance); + +LLDB_API bool LLDBSBTypeEnumMemberListIsValid(LLDBSBTypeEnumMemberListRef instance); + +LLDB_API void LLDBSBTypeEnumMemberListAppend(LLDBSBTypeEnumMemberListRef instance, LLDBSBTypeEnumMemberRef entry); + +LLDB_API LLDBSBTypeEnumMemberRef +LLDBSBTypeEnumMemberListGetTypeEnumMemberAtIndex(LLDBSBTypeEnumMemberListRef instance, uint32_t index); + +LLDB_API unsigned int LLDBSBTypeEnumMemberListGetSize(LLDBSBTypeEnumMemberListRef instance); + +#ifdef __cplusplus +} +#endif + +#endif // LLDB_SBTypeEnumMemberBinding_h_ Index: include/lldb/Bindings/SBTypeFilterBinding.h =================================================================== --- include/lldb/Bindings/SBTypeFilterBinding.h +++ include/lldb/Bindings/SBTypeFilterBinding.h @@ -0,0 +1,50 @@ +//===-- SBTypeFilterBinding.h -----------------------------------*- C++ -*-===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +#ifndef LLDB_SBTypeFilterBinding_h_ +#define LLDB_SBTypeFilterBinding_h_ + +#include "lldb/Bindings/SBBindingDefines.h" + +#ifdef __cplusplus +extern "C" { +#endif + +LLDB_API LLDBSBTypeFilterRef LLDBCreateSBTypeFilter(); + +LLDB_API LLDBSBTypeFilterRef LLDBCreateSBTypeFilter2(uint32_t options); + +LLDB_API void LLDBDisposeSBTypeFilter(LLDBSBTypeFilterRef instance); + +LLDB_API bool LLDBSBTypeFilterIsValid(LLDBSBTypeFilterRef instance); + +LLDB_API unsigned int LLDBSBTypeFilterGetNumberOfExpressionPaths(LLDBSBTypeFilterRef instance); + +LLDB_API const char *LLDBSBTypeFilterGetExpressionPathAtIndex(LLDBSBTypeFilterRef instance, uint32_t i); + +LLDB_API bool LLDBSBTypeFilterReplaceExpressionPathAtIndex(LLDBSBTypeFilterRef instance, uint32_t i, const char *item); + +LLDB_API void LLDBSBTypeFilterAppendExpressionPath(LLDBSBTypeFilterRef instance, const char *item); + +LLDB_API void LLDBSBTypeFilterClear(LLDBSBTypeFilterRef instance); + +LLDB_API unsigned int LLDBSBTypeFilterGetOptions(LLDBSBTypeFilterRef instance); + +LLDB_API void LLDBSBTypeFilterSetOptions(LLDBSBTypeFilterRef instance, uint32_t); + +LLDB_API bool LLDBSBTypeFilterGetDescription(LLDBSBTypeFilterRef instance, LLDBSBStreamRef description, + LLDBDescriptionLevel description_level); + +LLDB_API bool LLDBSBTypeFilterIsEqualTo(LLDBSBTypeFilterRef instance, LLDBSBTypeFilterRef rhs); + +#ifdef __cplusplus +} +#endif + +#endif // LLDB_SBTypeFilterBinding_h_ Index: include/lldb/Bindings/SBTypeFormatBinding.h =================================================================== --- include/lldb/Bindings/SBTypeFormatBinding.h +++ include/lldb/Bindings/SBTypeFormatBinding.h @@ -0,0 +1,50 @@ +//===-- SBTypeFormatBinding.h -----------------------------------*- C++ -*-===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +#ifndef LLDB_SBTypeFormatBinding_h_ +#define LLDB_SBTypeFormatBinding_h_ + +#include "lldb/Bindings/SBBindingDefines.h" + +#ifdef __cplusplus +extern "C" { +#endif + +LLDB_API LLDBSBTypeFormatRef LLDBCreateSBTypeFormat(); + +LLDB_API LLDBSBTypeFormatRef LLDBCreateSBTypeFormat2(LLDBFormat format, uint32_t options); + +LLDB_API LLDBSBTypeFormatRef LLDBCreateSBTypeFormat3(const char *type, uint32_t options); + +LLDB_API void LLDBDisposeSBTypeFormat(LLDBSBTypeFormatRef instance); + +LLDB_API bool LLDBSBTypeFormatIsValid(LLDBSBTypeFormatRef instance); + +LLDB_API LLDBFormat LLDBSBTypeFormatGetFormat(LLDBSBTypeFormatRef instance); + +LLDB_API const char *LLDBSBTypeFormatGetTypeName(LLDBSBTypeFormatRef instance); + +LLDB_API unsigned int LLDBSBTypeFormatGetOptions(LLDBSBTypeFormatRef instance); + +LLDB_API void LLDBSBTypeFormatSetFormat(LLDBSBTypeFormatRef instance, LLDBFormat); + +LLDB_API void LLDBSBTypeFormatSetTypeName(LLDBSBTypeFormatRef instance, const char *); + +LLDB_API void LLDBSBTypeFormatSetOptions(LLDBSBTypeFormatRef instance, uint32_t); + +LLDB_API bool LLDBSBTypeFormatGetDescription(LLDBSBTypeFormatRef instance, LLDBSBStreamRef description, + LLDBDescriptionLevel description_level); + +LLDB_API bool LLDBSBTypeFormatIsEqualTo(LLDBSBTypeFormatRef instance, LLDBSBTypeFormatRef rhs); + +#ifdef __cplusplus +} +#endif + +#endif // LLDB_SBTypeFormatBinding_h_ Index: include/lldb/Bindings/SBTypeNameSpecifierBinding.h =================================================================== --- include/lldb/Bindings/SBTypeNameSpecifierBinding.h +++ include/lldb/Bindings/SBTypeNameSpecifierBinding.h @@ -0,0 +1,46 @@ +//===-- SBTypeNameSpecifierBinding.h ----------------------------*- C++ -*-===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +#ifndef LLDB_SBTypeNameSpecifierBinding_h_ +#define LLDB_SBTypeNameSpecifierBinding_h_ + +#include "lldb/Bindings/SBBindingDefines.h" + +#ifdef __cplusplus +extern "C" { +#endif + +LLDB_API LLDBSBTypeNameSpecifierRef LLDBCreateSBTypeNameSpecifier(); + +LLDB_API LLDBSBTypeNameSpecifierRef LLDBCreateSBTypeNameSpecifier(const char *name, bool is_regex); + +LLDB_API LLDBSBTypeNameSpecifierRef LLDBCreateSBTypeNameSpecifier(LLDBSBTypeRef type); + +LLDB_API LLDBSBTypeNameSpecifierRef LLDBCreateSBTypeNameSpecifier(LLDBSBTypeNameSpecifierRef rhs); + +LLDB_API void LLDBDisposeSBTypeNameSpecifier(LLDBSBTypeNameSpecifierRef instance); + +LLDB_API bool LLDBSBTypeNameSpecifierIsValid(LLDBSBTypeNameSpecifierRef instance); + +LLDB_API const char *LLDBSBTypeNameSpecifierGetName(LLDBSBTypeNameSpecifierRef instance); + +LLDB_API LLDBSBTypeRef LLDBSBTypeNameSpecifierGetType(LLDBSBTypeNameSpecifierRef instance); + +LLDB_API bool LLDBSBTypeNameSpecifierIsRegex(LLDBSBTypeNameSpecifierRef instance); + +LLDB_API bool LLDBSBTypeNameSpecifierGetDescription(LLDBSBTypeNameSpecifierRef instance, LLDBSBStreamRef description, + LLDBDescriptionLevel description_level); + +LLDB_API bool LLDBSBTypeNameSpecifierIsEqualTo(LLDBSBTypeNameSpecifierRef instance, LLDBSBTypeNameSpecifierRef rhs); + +#ifdef __cplusplus +} +#endif + +#endif // LLDB_SBTypeNameSpecifierBinding_h_ Index: include/lldb/Bindings/SBTypeSummaryBinding.h =================================================================== --- include/lldb/Bindings/SBTypeSummaryBinding.h +++ include/lldb/Bindings/SBTypeSummaryBinding.h @@ -0,0 +1,74 @@ +//===-- SBTypeSummaryBinding.h ----------------------------------*- C++ -*-===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +#ifndef LLDB_SBTypeSummaryBinding_h_ +#define LLDB_SBTypeSummaryBinding_h_ + +#include "lldb/Bindings/SBBindingDefines.h" + +#ifdef __cplusplus +extern "C" { +#endif + +LLDB_API LLDBSBTypeSummaryOptionsRef LLDBCreateSBTypeSummaryOptions(); + +LLDB_API void LLDBDisposeSBTypeSummaryOptions(LLDBSBTypeSummaryOptionsRef instance); + +LLDB_API bool LLDBSBTypeSummaryOptionsIsValid(LLDBSBTypeSummaryOptionsRef instance); + +LLDB_API LLDBLanguageType LLDBSBTypeSummaryOptionsGetLanguage(LLDBSBTypeSummaryOptionsRef instance); + +LLDB_API LLDBTypeSummaryCapping LLDBSBTypeSummaryOptionsGetCapping(LLDBSBTypeSummaryOptionsRef instance); + +LLDB_API void LLDBSBTypeSummaryOptionsSetLanguage(LLDBSBTypeSummaryOptionsRef instance, LLDBLanguageType); + +LLDB_API void LLDBSBTypeSummaryOptionsSetCapping(LLDBSBTypeSummaryOptionsRef instance, LLDBTypeSummaryCapping); + +LLDB_API LLDBSBTypeSummaryRef LLDBCreateSBTypeSummary(); + +LLDB_API LLDBSBTypeSummaryRef LLDBSBTypeSummaryCreateWithSummaryString(const char *data, uint32_t options); + +LLDB_API LLDBSBTypeSummaryRef LLDBSBTypeSummaryCreateWithFunctionName(const char *data, uint32_t options); + +LLDB_API LLDBSBTypeSummaryRef LLDBSBTypeSummaryCreateWithScriptCode(const char *data, uint32_t options); + +LLDB_API LLDBSBTypeSummaryRef LLDBCreateSBTypeSummary(LLDBSBTypeSummaryRef rhs); + +LLDB_API void LLDBDisposeSBTypeSummary(LLDBSBTypeSummaryRef instance); + +LLDB_API bool LLDBSBTypeSummaryIsValid(LLDBSBTypeSummaryRef instance); + +LLDB_API bool LLDBSBTypeSummaryIsFunctionCode(LLDBSBTypeSummaryRef instance); + +LLDB_API bool LLDBSBTypeSummaryIsFunctionName(LLDBSBTypeSummaryRef instance); + +LLDB_API bool LLDBSBTypeSummaryIsSummaryString(LLDBSBTypeSummaryRef instance); + +LLDB_API const char *LLDBSBTypeSummaryGetData(LLDBSBTypeSummaryRef instance); + +LLDB_API void LLDBSBTypeSummarySetSummaryString(LLDBSBTypeSummaryRef instance, const char *data); + +LLDB_API void LLDBSBTypeSummarySetFunctionName(LLDBSBTypeSummaryRef instance, const char *data); + +LLDB_API void LLDBSBTypeSummarySetFunctionCode(LLDBSBTypeSummaryRef instance, const char *data); + +LLDB_API unsigned int LLDBSBTypeSummaryGetOptions(LLDBSBTypeSummaryRef instance); + +LLDB_API void LLDBSBTypeSummarySetOptions(LLDBSBTypeSummaryRef instance, uint32_t); + +LLDB_API bool LLDBSBTypeSummaryGetDescription(LLDBSBTypeSummaryRef instance, LLDBSBStreamRef description, + LLDBDescriptionLevel description_level); + +LLDB_API bool LLDBSBTypeSummaryIsEqualTo(LLDBSBTypeSummaryRef instance, LLDBSBTypeSummaryRef rhs); + +#ifdef __cplusplus +} +#endif + +#endif // LLDB_SBTypeSummaryBinding_h_ Index: include/lldb/Bindings/SBTypeSyntheticBinding.h =================================================================== --- include/lldb/Bindings/SBTypeSyntheticBinding.h +++ include/lldb/Bindings/SBTypeSyntheticBinding.h @@ -0,0 +1,52 @@ +//===-- SBTypeSyntheticBinding.h --------------- ----------------*- C++ -*-===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +#ifndef LLDB_SBTypeSyntheticBinding_h_ +#define LLDB_SBTypeSyntheticBinding_h_ + +#include "lldb/Bindings/SBBindingDefines.h" + +#ifdef __cplusplus +extern "C" { +#endif + +LLDB_API LLDBSBTypeSyntheticRef LLDBCreateSBTypeSynthetic(); + +LLDB_API LLDBSBTypeSyntheticRef LLDBSBTypeSyntheticCreateWithClassName(const char *data, uint32_t options); + +LLDB_API LLDBSBTypeSyntheticRef LLDBSBTypeSyntheticCreateWithScriptCode(const char *data, uint32_t options); + +LLDB_API void LLDBDisposeSBTypeSynthetic(LLDBSBTypeSyntheticRef instance); + +LLDB_API bool LLDBSBTypeSyntheticIsValid(LLDBSBTypeSyntheticRef instance); + +LLDB_API bool LLDBSBTypeSyntheticIsClassCode(LLDBSBTypeSyntheticRef instance); + +LLDB_API bool LLDBSBTypeSyntheticIsClassName(LLDBSBTypeSyntheticRef instance); + +LLDB_API const char *LLDBSBTypeSyntheticGetData(LLDBSBTypeSyntheticRef instance); + +LLDB_API void LLDBSBTypeSyntheticSetClassName(LLDBSBTypeSyntheticRef instance, const char *data); + +LLDB_API void LLDBSBTypeSyntheticSetClassCode(LLDBSBTypeSyntheticRef instance, const char *data); + +LLDB_API unsigned int LLDBSBTypeSyntheticGetOptions(LLDBSBTypeSyntheticRef instance); + +LLDB_API void LLDBSBTypeSyntheticSetOptions(LLDBSBTypeSyntheticRef instance, uint32_t); + +LLDB_API bool LLDBSBTypeSyntheticGetDescription(LLDBSBTypeSyntheticRef instance, LLDBSBStreamRef description, + LLDBDescriptionLevel description_level); + +LLDB_API bool LLDBSBTypeSyntheticIsEqualTo(LLDBSBTypeSyntheticRef instance, LLDBSBTypeSyntheticRef rhs); + +#ifdef __cplusplus +} +#endif + +#endif // LLDB_SBTypeSyntheticBinding_h_ Index: include/lldb/Bindings/SBUnixSignalsBinding.h =================================================================== --- include/lldb/Bindings/SBUnixSignalsBinding.h +++ include/lldb/Bindings/SBUnixSignalsBinding.h @@ -0,0 +1,51 @@ +//===-- SBUnixSignalsBinding.h ----------------------------------*- C++ -*-===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +#ifndef LLDB_SBUnixSignalsBinding_h_ +#define LLDB_SBUnixSignalsBinding_h_ + +#include "lldb/Bindings/SBBindingDefines.h" + +#ifdef __cplusplus +extern "C" { +#endif + +LLDB_API LLDBSBUnixSignalsRef LLDBCreateSBUnixSignals(); + +LLDB_API void LLDBDisposeSBUnixSignals(LLDBSBUnixSignalsRef instance); + +LLDB_API void LLDBSBUnixSignalsClear(LLDBSBUnixSignalsRef instance); + +LLDB_API bool LLDBSBUnixSignalsIsValid(LLDBSBUnixSignalsRef instance); + +LLDB_API const char *LLDBSBUnixSignalsGetSignalAsCString(LLDBSBUnixSignalsRef instance, int signo); + +LLDB_API int LLDBSBUnixSignalsGetSignalNumberFromName(LLDBSBUnixSignalsRef instance, const char *name); + +LLDB_API bool LLDBSBUnixSignalsGetShouldSuppress(LLDBSBUnixSignalsRef instance, int signo); + +LLDB_API bool LLDBSBUnixSignalsSetShouldSuppress(LLDBSBUnixSignalsRef instance, int signo, bool value); + +LLDB_API bool LLDBSBUnixSignalsGetShouldStop(LLDBSBUnixSignalsRef instance, int signo); + +LLDB_API bool LLDBSBUnixSignalsSetShouldStop(LLDBSBUnixSignalsRef instance, int signo, bool value); + +LLDB_API bool LLDBSBUnixSignalsGetShouldNotify(LLDBSBUnixSignalsRef instance, int signo); + +LLDB_API bool LLDBSBUnixSignalsSetShouldNotify(LLDBSBUnixSignalsRef instance, int signo, bool value); + +LLDB_API int LLDBSBUnixSignalsGetNumSignals(LLDBSBUnixSignalsRef instance); + +LLDB_API int LLDBSBUnixSignalsGetSignalAtIndex(LLDBSBUnixSignalsRef instance, int index); + +#ifdef __cplusplus +} +#endif + +#endif // LLDB_SBUnixSignalsBinding_h_ Index: include/lldb/Bindings/SBValueBinding.h =================================================================== --- include/lldb/Bindings/SBValueBinding.h +++ include/lldb/Bindings/SBValueBinding.h @@ -0,0 +1,190 @@ +//===-- SBValueBinding.h ----------------------------------------*- C++ -*-===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +#ifndef LLDB_SBValueBinding_h_ +#define LLDB_SBValueBinding_h_ + +#include "lldb/Bindings/SBBindingDefines.h" + +#ifdef __cplusplus +extern "C" { +#endif + +LLDB_API LLDBSBValueRef LLDBCreateSBValue(); + +LLDB_API void LLDBDisposeSBValue(LLDBSBValueRef instance); + +LLDB_API bool LLDBSBValueIsValid(LLDBSBValueRef instance); + +LLDB_API void LLDBSBValueClear(LLDBSBValueRef instance); + +LLDB_API LLDBSBErrorRef LLDBSBValueGetError(LLDBSBValueRef instance); + +LLDB_API unsigned long long LLDBSBValueGetID(LLDBSBValueRef instance); + +LLDB_API const char *LLDBSBValueGetName(LLDBSBValueRef instance); + +LLDB_API const char *LLDBSBValueGetTypeName(LLDBSBValueRef instance); + +LLDB_API const char *LLDBSBValueGetDisplayTypeName(LLDBSBValueRef instance); + +LLDB_API unsigned int LLDBSBValueGetByteSize(LLDBSBValueRef instance); + +LLDB_API bool LLDBSBValueIsInScope(LLDBSBValueRef instance); + +LLDB_API LLDBFormat LLDBSBValueGetFormat(LLDBSBValueRef instance); + +LLDB_API void LLDBSBValueSetFormat(LLDBSBValueRef instance, LLDBFormat format); + +LLDB_API const char *LLDBSBValueGetValue(LLDBSBValueRef instance); + +LLDB_API long long LLDBSBValueGetValueAsSigned(LLDBSBValueRef instance, LLDBSBErrorRef error, int64_t fail_value); + +LLDB_API unsigned long long LLDBSBValueGetValueAsUnsigned(LLDBSBValueRef instance, LLDBSBErrorRef error, + uint64_t fail_value); + +LLDB_API long long LLDBSBValueGetValueAsSigned2(LLDBSBValueRef instance, int64_t fail_value); + +LLDB_API unsigned long long LLDBSBValueGetValueAsUnsigned2(LLDBSBValueRef instance, uint64_t fail_value); + +LLDB_API LLDBValueType LLDBSBValueGetValueType(LLDBSBValueRef instance); + +LLDB_API bool LLDBSBValueGetValueDidChange(LLDBSBValueRef instance); + +LLDB_API const char *LLDBSBValueGetSummary(LLDBSBValueRef instance); + +LLDB_API const char *LLDBSBValueGetSummary2(LLDBSBValueRef instance, LLDBSBStreamRef stream, + LLDBSBTypeSummaryOptionsRef options); + +LLDB_API const char *LLDBSBValueGetObjectDescription(LLDBSBValueRef instance); + +LLDB_API const char *LLDBSBValueGetTypeValidatorResult(LLDBSBValueRef instance); + +LLDB_API LLDBSBValueRef LLDBSBValueGetDynamicValue(LLDBSBValueRef instance, LLDBDynamicValueType use_dynamic); + +LLDB_API LLDBSBValueRef LLDBSBValueGetStaticValue(LLDBSBValueRef instance); + +LLDB_API LLDBSBValueRef LLDBSBValueGetNonSyntheticValue(LLDBSBValueRef instance); + +LLDB_API LLDBDynamicValueType LLDBSBValueGetPreferDynamicValue(LLDBSBValueRef instance); + +LLDB_API void LLDBSBValueSetPreferDynamicValue(LLDBSBValueRef instance, LLDBDynamicValueType use_dynamic); + +LLDB_API bool LLDBSBValueGetPreferSyntheticValue(LLDBSBValueRef instance); + +LLDB_API void LLDBSBValueSetPreferSyntheticValue(LLDBSBValueRef instance, bool use_synthetic); + +LLDB_API bool LLDBSBValueIsDynamic(LLDBSBValueRef instance); + +LLDB_API bool LLDBSBValueIsSynthetic(LLDBSBValueRef instance); + +LLDB_API const char *LLDBSBValueGetLocation(LLDBSBValueRef instance); + +LLDB_API bool LLDBSBValueSetValueFromCString(LLDBSBValueRef instance, const char *value_str); + +LLDB_API bool LLDBSBValueSetValueFromCString2(LLDBSBValueRef instance, const char *value_str, LLDBSBErrorRef error); + +LLDB_API LLDBSBTypeFormatRef LLDBSBValueGetTypeFormat(LLDBSBValueRef instance); + +LLDB_API LLDBSBTypeSummaryRef LLDBSBValueGetTypeSummary(LLDBSBValueRef instance); + +LLDB_API LLDBSBTypeFilterRef LLDBSBValueGetTypeFilter(LLDBSBValueRef instance); + +LLDB_API LLDBSBTypeSyntheticRef LLDBSBValueGetTypeSynthetic(LLDBSBValueRef instance); + +LLDB_API LLDBSBValueRef LLDBSBValueGetChildAtIndex(LLDBSBValueRef instance, uint32_t idx); + +LLDB_API LLDBSBValueRef +LLDBSBValueCreateChildAtOffset(LLDBSBValueRef instance, const char *name, uint32_t offset, LLDBSBTypeRef type); + +LLDB_API LLDBSBValueRef LLDBSBValueCast(LLDBSBValueRef instance, LLDBSBTypeRef type); + +LLDB_API LLDBSBValueRef +LLDBSBValueCreateValueFromExpression(LLDBSBValueRef instance, const char *name, const char *expression); + +LLDB_API LLDBSBValueRef LLDBSBValueCreateValueFromExpression2(LLDBSBValueRef instance, const char *name, + const char *expression, + LLDBSBExpressionOptionsRef options); + +LLDB_API LLDBSBValueRef +LLDBSBValueCreateValueFromAddress(LLDBSBValueRef instance, const char *name, lldb::addr_t address, LLDBSBTypeRef type); + +LLDB_API LLDBSBValueRef +LLDBSBValueCreateValueFromData(LLDBSBValueRef instance, const char *name, LLDBSBDataRef data, LLDBSBTypeRef type); + +LLDB_API LLDBSBValueRef LLDBSBValueGetChildAtIndex2(LLDBSBValueRef instance, uint32_t idx, + LLDBDynamicValueType use_dynamic, bool can_create_synthetic); + +LLDB_API unsigned int LLDBSBValueGetIndexOfChildWithName(LLDBSBValueRef instance, const char *name); + +LLDB_API LLDBSBValueRef LLDBSBValueGetChildMemberWithName(LLDBSBValueRef instance, const char *name); + +LLDB_API LLDBSBValueRef +LLDBSBValueGetChildMemberWithName2(LLDBSBValueRef instance, const char *name, LLDBDynamicValueType use_dynamic); + +LLDB_API LLDBSBValueRef LLDBSBValueGetValueForExpressionPath(LLDBSBValueRef instance, const char *expr_path); + +LLDB_API LLDBSBValueRef LLDBSBValueAddressOf(LLDBSBValueRef instance); + +LLDB_API unsigned long long LLDBSBValueGetLoadAddress(LLDBSBValueRef instance); + +LLDB_API LLDBSBAddressRef LLDBSBValueGetAddress(LLDBSBValueRef instance); + +LLDB_API LLDBSBDataRef LLDBSBValueGetPointeeData(LLDBSBValueRef instance, uint32_t item_idx, uint32_t item_count); + +LLDB_API LLDBSBDataRef LLDBSBValueGetData(LLDBSBValueRef instance); + +LLDB_API bool LLDBSBValueSetData(LLDBSBValueRef instance, LLDBSBDataRef data, LLDBSBErrorRef error); + +LLDB_API LLDBSBDeclarationRef LLDBSBValueGetDeclaration(LLDBSBValueRef instance); + +LLDB_API bool LLDBSBValueMightHaveChildren(LLDBSBValueRef instance); + +LLDB_API bool LLDBSBValueIsRuntimeSupportValue(LLDBSBValueRef instance); + +LLDB_API unsigned int LLDBSBValueGetNumChildren(LLDBSBValueRef instance); + +LLDB_API void *LLDBSBValueGetOpaqueType(LLDBSBValueRef instance); + +LLDB_API LLDBSBTargetRef LLDBSBValueGetTarget(LLDBSBValueRef instance); + +LLDB_API LLDBSBProcessRef LLDBSBValueGetProcess(LLDBSBValueRef instance); + +LLDB_API LLDBSBThreadRef LLDBSBValueGetThread(LLDBSBValueRef instance); + +LLDB_API LLDBSBFrameRef LLDBSBValueGetFrame(LLDBSBValueRef instance); + +LLDB_API LLDBSBValueRef LLDBSBValueDereference(LLDBSBValueRef instance); + +LLDB_API bool LLDBSBValueTypeIsPointerType(LLDBSBValueRef instance); + +LLDB_API LLDBSBTypeRef LLDBSBValueGetType(LLDBSBValueRef instance); + +LLDB_API LLDBSBValueRef LLDBSBValuePersist(LLDBSBValueRef instance); + +LLDB_API bool LLDBSBValueGetDescription(LLDBSBValueRef instance, LLDBSBStreamRef description); + +LLDB_API bool LLDBSBValueGetExpressionPath(LLDBSBValueRef instance, LLDBSBStreamRef description); + +LLDB_API bool LLDBSBValueGetExpressionPath2(LLDBSBValueRef instance, LLDBSBStreamRef description, + bool qualify_cxx_base_classes); + +LLDB_API LLDBSBWatchpointRef +LLDBSBValueWatch(LLDBSBValueRef instance, bool resolve_location, bool read, bool write, LLDBSBErrorRef error); + +LLDB_API LLDBSBWatchpointRef LLDBSBValueWatch2(LLDBSBValueRef instance, bool resolve_location, bool read, bool write); + +LLDB_API LLDBSBWatchpointRef +LLDBSBValueWatchPointee(LLDBSBValueRef instance, bool resolve_location, bool read, bool write, LLDBSBErrorRef error); + +#ifdef __cplusplus +} +#endif + +#endif // LLDB_SBValueBinding_h_ Index: include/lldb/Bindings/SBValueListBinding.h =================================================================== --- include/lldb/Bindings/SBValueListBinding.h +++ include/lldb/Bindings/SBValueListBinding.h @@ -0,0 +1,43 @@ +//===-- SBValueListBinding.h ------------------------------------*- C++ -*-===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +#ifndef LLDB_SBValueListBinding_h_ +#define LLDB_SBValueListBinding_h_ + +#include "lldb/Bindings/SBBindingDefines.h" + +#ifdef __cplusplus +extern "C" { +#endif + +LLDB_API LLDBSBValueListRef LLDBCreateSBValueList(); + +LLDB_API void LLDBDisposeSBValueList(LLDBSBValueListRef instance); + +LLDB_API bool LLDBSBValueListIsValid(LLDBSBValueListRef instance); + +LLDB_API void LLDBSBValueListClear(LLDBSBValueListRef instance); + +LLDB_API void LLDBSBValueListAppend(LLDBSBValueListRef instance, LLDBSBValueRef val_obj); + +LLDB_API void LLDBSBValueListAppend2(LLDBSBValueListRef instance, LLDBSBValueListRef value_list); + +LLDB_API unsigned int LLDBSBValueListGetSize(LLDBSBValueListRef instance); + +LLDB_API LLDBSBValueRef LLDBSBValueListGetValueAtIndex(LLDBSBValueListRef instance, uint32_t idx); + +LLDB_API LLDBSBValueRef LLDBSBValueListGetFirstValueByName(LLDBSBValueListRef instance, const char *name); + +LLDB_API LLDBSBValueRef LLDBSBValueListFindValueObjectByUID(LLDBSBValueListRef instance, lldb::user_id_t uid); + +#ifdef __cplusplus +} +#endif + +#endif // LLDB_SBValueListBinding_h_ Index: include/lldb/Bindings/SBVariablesOptionsBinding.h =================================================================== --- include/lldb/Bindings/SBVariablesOptionsBinding.h +++ include/lldb/Bindings/SBVariablesOptionsBinding.h @@ -0,0 +1,55 @@ +//===-- SBVariablesOptionsBinding.h -----------------------------*- C++ -*-===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +#ifndef LLDB_SBVariablesOptionsBinding_h_ +#define LLDB_SBVariablesOptionsBinding_h_ + +#include "lldb/Bindings/SBBindingDefines.h" + +#ifdef __cplusplus +extern "C" { +#endif + +LLDB_API LLDBSBVariablesOptionsRef LLDBCreateSBVariablesOptions(); + +LLDB_API LLDBSBVariablesOptionsRef LLDBCreateSBVariablesOptions2(LLDBSBVariablesOptionsRef options); + +LLDB_API void LLDBDisposeSBVariablesOptions(LLDBSBVariablesOptionsRef instance); + +LLDB_API bool LLDBSBVariablesOptionsIsValid(LLDBSBVariablesOptionsRef instance); + +LLDB_API bool LLDBSBVariablesOptionsGetIncludeArguments(LLDBSBVariablesOptionsRef instance); + +LLDB_API void LLDBSBVariablesOptionsSetIncludeArguments(LLDBSBVariablesOptionsRef instance, bool); + +LLDB_API bool LLDBSBVariablesOptionsGetIncludeLocals(LLDBSBVariablesOptionsRef instance); + +LLDB_API void LLDBSBVariablesOptionsSetIncludeLocals(LLDBSBVariablesOptionsRef instance, bool); + +LLDB_API bool LLDBSBVariablesOptionsGetIncludeStatics(LLDBSBVariablesOptionsRef instance); + +LLDB_API void LLDBSBVariablesOptionsSetIncludeStatics(LLDBSBVariablesOptionsRef instance, bool); + +LLDB_API bool LLDBSBVariablesOptionsGetInScopeOnly(LLDBSBVariablesOptionsRef instance); + +LLDB_API void LLDBSBVariablesOptionsSetInScopeOnly(LLDBSBVariablesOptionsRef instance, bool); + +LLDB_API bool LLDBSBVariablesOptionsGetIncludeRuntimeSupportValues(LLDBSBVariablesOptionsRef instance); + +LLDB_API void LLDBSBVariablesOptionsSetIncludeRuntimeSupportValues(LLDBSBVariablesOptionsRef instance, bool); + +LLDB_API LLDBDynamicValueType LLDBSBVariablesOptionsGetUseDynamic(LLDBSBVariablesOptionsRef instance); + +LLDB_API void LLDBSBVariablesOptionsSetUseDynamic(LLDBSBVariablesOptionsRef instance, LLDBDynamicValueType); + +#ifdef __cplusplus +} +#endif + +#endif // LLDB_SBVariablesOptionsBinding_h_ Index: include/lldb/Bindings/SBWatchpointBinding.h =================================================================== --- include/lldb/Bindings/SBWatchpointBinding.h +++ include/lldb/Bindings/SBWatchpointBinding.h @@ -0,0 +1,64 @@ +//===-- SBWatchpointBinding.h -----------------------------------*- C++ -*-===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +#ifndef LLDB_SBWatchpointBinding_h_ +#define LLDB_SBWatchpointBinding_h_ + +#include "lldb/Bindings/SBBindingDefines.h" + +#ifdef __cplusplus +extern "C" { +#endif + +LLDB_API LLDBSBWatchpointRef LLDBCreateSBWatchpoint(); + +LLDB_API void LLDBDisposeSBWatchpoint(LLDBSBWatchpointRef instance); + +LLDB_API bool LLDBSBWatchpointIsValid(LLDBSBWatchpointRef instance); + +LLDB_API LLDBSBErrorRef LLDBSBWatchpointGetError(LLDBSBWatchpointRef instance); + +LLDB_API int LLDBSBWatchpointGetID(LLDBSBWatchpointRef instance); + +LLDB_API int LLDBSBWatchpointGetHardwareIndex(LLDBSBWatchpointRef instance); + +LLDB_API unsigned long long LLDBSBWatchpointGetWatchAddress(LLDBSBWatchpointRef instance); + +LLDB_API unsigned int LLDBSBWatchpointGetWatchSize(LLDBSBWatchpointRef instance); + +LLDB_API void LLDBSBWatchpointSetEnabled(LLDBSBWatchpointRef instance, bool enabled); + +LLDB_API bool LLDBSBWatchpointIsEnabled(LLDBSBWatchpointRef instance); + +LLDB_API unsigned int LLDBSBWatchpointGetHitCount(LLDBSBWatchpointRef instance); + +LLDB_API unsigned int LLDBSBWatchpointGetIgnoreCount(LLDBSBWatchpointRef instance); + +LLDB_API void LLDBSBWatchpointSetIgnoreCount(LLDBSBWatchpointRef instance, uint32_t n); + +LLDB_API const char *LLDBSBWatchpointGetCondition(LLDBSBWatchpointRef instance); + +LLDB_API void LLDBSBWatchpointSetCondition(LLDBSBWatchpointRef instance, const char *condition); + +LLDB_API bool LLDBSBWatchpointGetDescription(LLDBSBWatchpointRef instance, LLDBSBStreamRef description, + LLDBDescriptionLevel level); + +LLDB_API void LLDBSBWatchpointClear(LLDBSBWatchpointRef instance); + +LLDB_API bool LLDBSBWatchpointEventIsWatchpointEvent(LLDBSBEventRef event); + +LLDB_API LLDBWatchpointEventType LLDBSBWatchpointGetWatchpointEventTypeFromEvent(LLDBSBEventRef event); + +LLDB_API LLDBSBWatchpointRef LLDBSBWatchpointGetWatchpointFromEvent(LLDBSBEventRef event); + +#ifdef __cplusplus +} +#endif + +#endif // LLDB_SBWatchpointBinding_h_ Index: source/API/Bindings/SBAddressBinding.cpp =================================================================== --- source/API/Bindings/SBAddressBinding.cpp +++ source/API/Bindings/SBAddressBinding.cpp @@ -0,0 +1,171 @@ +//===-- SBAddressBinding.cpp ------------------------------------*- C++ -*-===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +#include "lldb/Bindings/LLDBBinding.h" +#include "lldb/API/LLDB.h" + +using namespace lldb; + +#ifdef __cplusplus +extern "C" { +#endif + +LLDBSBAddressRef +LLDBCreateSBAddress() +{ + return reinterpret_cast(new SBAddress()); +} + +LLDBSBAddressRef +LLDBCreateSBAddress2(LLDBSBSectionRef section, lldb::addr_t offset) +{ + return reinterpret_cast(new SBAddress(*reinterpret_cast(section), offset)); +} + +LLDBSBAddressRef +LLDBCreateSBAddress3(lldb::addr_t load_addr, LLDBSBTargetRef target) +{ + return reinterpret_cast(new SBAddress(load_addr, *reinterpret_cast(target))); +} + +void +LLDBDisposeSBAddress(LLDBSBAddressRef instance) +{ + delete reinterpret_cast(instance); +} + +bool +LLDBSBAddressIsValid(LLDBSBAddressRef instance) +{ + SBAddress *unwrapped = reinterpret_cast(instance); + return unwrapped->IsValid(); +} + +void +LLDBSBAddressClear(LLDBSBAddressRef instance) +{ + SBAddress *unwrapped = reinterpret_cast(instance); + unwrapped->Clear(); +} + +unsigned long long +LLDBSBAddressGetFileAddress(LLDBSBAddressRef instance) +{ + SBAddress *unwrapped = reinterpret_cast(instance); + return unwrapped->GetFileAddress(); +} + +unsigned long long +LLDBSBAddressGetLoadAddress(LLDBSBAddressRef instance, LLDBSBTargetRef target) +{ + SBAddress *unwrapped = reinterpret_cast(instance); + return unwrapped->GetLoadAddress(*reinterpret_cast(target)); +} + +void +LLDBSBAddressSetAddress(LLDBSBAddressRef instance, LLDBSBSectionRef section, lldb::addr_t offset) +{ + SBAddress *unwrapped = reinterpret_cast(instance); + unwrapped->SetAddress(*reinterpret_cast(section), offset); +} + +void +LLDBSBAddressSetLoadAddress(LLDBSBAddressRef instance, lldb::addr_t load_addr, LLDBSBTargetRef target) +{ + SBAddress *unwrapped = reinterpret_cast(instance); + unwrapped->SetLoadAddress(load_addr, *reinterpret_cast(target)); +} + +bool +LLDBSBAddressOffsetAddress(LLDBSBAddressRef instance, lldb::addr_t offset) +{ + SBAddress *unwrapped = reinterpret_cast(instance); + return unwrapped->OffsetAddress(offset); +} + +bool +LLDBSBAddressGetDescription(LLDBSBAddressRef instance, LLDBSBStreamRef description) +{ + SBAddress *unwrapped = reinterpret_cast(instance); + return unwrapped->GetDescription(*reinterpret_cast(description)); +} + +LLDBSBSymbolContextRef +LLDBSBAddressGetSymbolContext(LLDBSBAddressRef instance, uint32_t resolve_scope) +{ + SBAddress *unwrapped = reinterpret_cast(instance); + return reinterpret_cast(new SBSymbolContext(unwrapped->GetSymbolContext(resolve_scope))); +} + +LLDBSBSectionRef +LLDBSBAddressGetSection(LLDBSBAddressRef instance) +{ + SBAddress *unwrapped = reinterpret_cast(instance); + return reinterpret_cast(new SBSection(unwrapped->GetSection())); +} + +unsigned long long +LLDBSBAddressGetOffset(LLDBSBAddressRef instance) +{ + SBAddress *unwrapped = reinterpret_cast(instance); + return unwrapped->GetOffset(); +} + +LLDBSBModuleRef +LLDBSBAddressGetModule(LLDBSBAddressRef instance) +{ + SBAddress *unwrapped = reinterpret_cast(instance); + return reinterpret_cast(new SBModule(unwrapped->GetModule())); +} + +LLDBSBCompileUnitRef +LLDBSBAddressGetCompileUnit(LLDBSBAddressRef instance) +{ + SBAddress *unwrapped = reinterpret_cast(instance); + return reinterpret_cast(new SBCompileUnit(unwrapped->GetCompileUnit())); +} + +LLDBSBFunctionRef +LLDBSBAddressGetFunction(LLDBSBAddressRef instance) +{ + SBAddress *unwrapped = reinterpret_cast(instance); + return reinterpret_cast(new SBFunction(unwrapped->GetFunction())); +} + +LLDBSBBlockRef +LLDBSBAddressGetBlock(LLDBSBAddressRef instance) +{ + SBAddress *unwrapped = reinterpret_cast(instance); + return reinterpret_cast(new SBBlock(unwrapped->GetBlock())); +} + +LLDBSBSymbolRef +LLDBSBAddressGetSymbol(LLDBSBAddressRef instance) +{ + SBAddress *unwrapped = reinterpret_cast(instance); + return reinterpret_cast(new SBSymbol(unwrapped->GetSymbol())); +} + +LLDBSBLineEntryRef +LLDBSBAddressGetLineEntry(LLDBSBAddressRef instance) +{ + SBAddress *unwrapped = reinterpret_cast(instance); + return reinterpret_cast(new SBLineEntry(unwrapped->GetLineEntry())); +} + +LLDBAddressClass +LLDBSBAddressGetAddressClass(LLDBSBAddressRef instance) +{ + SBAddress *unwrapped = reinterpret_cast(instance); + return unwrapped->GetAddressClass(); +} + +#ifdef __cplusplus +} +#endif Index: source/API/Bindings/SBAttachInfoBinding.cpp =================================================================== --- source/API/Bindings/SBAttachInfoBinding.cpp +++ source/API/Bindings/SBAttachInfoBinding.cpp @@ -0,0 +1,248 @@ +//===-- SBAttachInfoBinding.cpp ---------------------------------*- C++ -*-===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +#include "lldb/Bindings/LLDBBinding.h" +#include "lldb/API/LLDB.h" + +using namespace lldb; + +#ifdef __cplusplus +extern "C" { +#endif + +LLDBSBAttachInfoRef +LLDBCreateSBAttachInfo() +{ + return reinterpret_cast(new SBAttachInfo()); +} + +LLDBSBAttachInfoRef +LLDBCreateSBAttachInfo2(lldb::pid_t pid) +{ + return reinterpret_cast(new SBAttachInfo(pid)); +} + +LLDBSBAttachInfoRef +LLDBCreateSBAttachInfo3(const char *path, bool wait_for) +{ + return reinterpret_cast(new SBAttachInfo(path, wait_for)); +} + +void +LLDBDisposeSBAttachInfo(LLDBSBAttachInfoRef instance) +{ + delete reinterpret_cast(instance); +} + +unsigned long long +LLDBSBAttachInfoGetProcessID(LLDBSBAttachInfoRef instance) +{ + SBAttachInfo *unwrapped = reinterpret_cast(instance); + return unwrapped->GetProcessID(); +} + +void +LLDBSBAttachInfoSetProcessID(LLDBSBAttachInfoRef instance, lldb::pid_t pid) +{ + SBAttachInfo *unwrapped = reinterpret_cast(instance); + unwrapped->SetProcessID(pid); +} + +void +LLDBSBAttachInfoSetExecutable(LLDBSBAttachInfoRef instance, const char *path) +{ + SBAttachInfo *unwrapped = reinterpret_cast(instance); + unwrapped->SetExecutable(path); +} + +void +LLDBSBAttachInfoSetExecutable2(LLDBSBAttachInfoRef instance, LLDBSBFileSpecRef exe_file) +{ + SBAttachInfo *unwrapped = reinterpret_cast(instance); + unwrapped->SetExecutable(*reinterpret_cast(exe_file)); +} + +bool +LLDBSBAttachInfoGetWaitForLaunch(LLDBSBAttachInfoRef instance) +{ + SBAttachInfo *unwrapped = reinterpret_cast(instance); + return unwrapped->GetWaitForLaunch(); +} + +void +LLDBSBAttachInfoSetWaitForLaunch(LLDBSBAttachInfoRef instance, bool b) +{ + SBAttachInfo *unwrapped = reinterpret_cast(instance); + unwrapped->SetWaitForLaunch(b); +} + +bool +LLDBSBAttachInfoGetIgnoreExisting(LLDBSBAttachInfoRef instance) +{ + SBAttachInfo *unwrapped = reinterpret_cast(instance); + return unwrapped->GetIgnoreExisting(); +} + +void +LLDBSBAttachInfoSetIgnoreExisting(LLDBSBAttachInfoRef instance, bool b) +{ + SBAttachInfo *unwrapped = reinterpret_cast(instance); + unwrapped->SetIgnoreExisting(b); +} + +unsigned int +LLDBSBAttachInfoGetResumeCount(LLDBSBAttachInfoRef instance) +{ + SBAttachInfo *unwrapped = reinterpret_cast(instance); + return unwrapped->GetResumeCount(); +} + +void +LLDBSBAttachInfoSetResumeCount(LLDBSBAttachInfoRef instance, uint32_t c) +{ + SBAttachInfo *unwrapped = reinterpret_cast(instance); + unwrapped->SetResumeCount(c); +} + +const char * +LLDBSBAttachInfoGetProcessPluginName(LLDBSBAttachInfoRef instance) +{ + SBAttachInfo *unwrapped = reinterpret_cast(instance); + return unwrapped->GetProcessPluginName(); +} + +void +LLDBSBAttachInfoSetProcessPluginName(LLDBSBAttachInfoRef instance, const char *plugin_name) +{ + SBAttachInfo *unwrapped = reinterpret_cast(instance); + unwrapped->SetProcessPluginName(plugin_name); +} + +unsigned int +LLDBSBAttachInfoGetUserID(LLDBSBAttachInfoRef instance) +{ + SBAttachInfo *unwrapped = reinterpret_cast(instance); + return unwrapped->GetUserID(); +} + +unsigned int +LLDBSBAttachInfoGetGroupID(LLDBSBAttachInfoRef instance) +{ + SBAttachInfo *unwrapped = reinterpret_cast(instance); + return unwrapped->GetGroupID(); +} + +bool +LLDBSBAttachInfoUserIDIsValid(LLDBSBAttachInfoRef instance) +{ + SBAttachInfo *unwrapped = reinterpret_cast(instance); + return unwrapped->UserIDIsValid(); +} + +bool +LLDBSBAttachInfoGroupIDIsValid(LLDBSBAttachInfoRef instance) +{ + SBAttachInfo *unwrapped = reinterpret_cast(instance); + return unwrapped->GroupIDIsValid(); +} + +void +LLDBSBAttachInfoSetUserID(LLDBSBAttachInfoRef instance, uint32_t uid) +{ + SBAttachInfo *unwrapped = reinterpret_cast(instance); + unwrapped->SetUserID(uid); +} + +void +LLDBSBAttachInfoSetGroupID(LLDBSBAttachInfoRef instance, uint32_t gid) +{ + SBAttachInfo *unwrapped = reinterpret_cast(instance); + unwrapped->SetGroupID(gid); +} + +unsigned int +LLDBSBAttachInfoGetEffectiveUserID(LLDBSBAttachInfoRef instance) +{ + SBAttachInfo *unwrapped = reinterpret_cast(instance); + return unwrapped->GetEffectiveUserID(); +} + +unsigned int +LLDBSBAttachInfoGetEffectiveGroupID(LLDBSBAttachInfoRef instance) +{ + SBAttachInfo *unwrapped = reinterpret_cast(instance); + return unwrapped->GetEffectiveGroupID(); +} + +bool +LLDBSBAttachInfoEffectiveUserIDIsValid(LLDBSBAttachInfoRef instance) +{ + SBAttachInfo *unwrapped = reinterpret_cast(instance); + return unwrapped->EffectiveUserIDIsValid(); +} + +bool +LLDBSBAttachInfoEffectiveGroupIDIsValid(LLDBSBAttachInfoRef instance) +{ + SBAttachInfo *unwrapped = reinterpret_cast(instance); + return unwrapped->EffectiveGroupIDIsValid(); +} + +void +LLDBSBAttachInfoSetEffectiveUserID(LLDBSBAttachInfoRef instance, uint32_t uid) +{ + SBAttachInfo *unwrapped = reinterpret_cast(instance); + unwrapped->SetEffectiveUserID(uid); +} + +void +LLDBSBAttachInfoSetEffectiveGroupID(LLDBSBAttachInfoRef instance, uint32_t gid) +{ + SBAttachInfo *unwrapped = reinterpret_cast(instance); + unwrapped->SetEffectiveGroupID(gid); +} + +unsigned long long +LLDBSBAttachInfoGetParentProcessID(LLDBSBAttachInfoRef instance) +{ + SBAttachInfo *unwrapped = reinterpret_cast(instance); + return unwrapped->GetParentProcessID(); +} + +void +LLDBSBAttachInfoSetParentProcessID(LLDBSBAttachInfoRef instance, lldb::pid_t pid) +{ + SBAttachInfo *unwrapped = reinterpret_cast(instance); + unwrapped->SetParentProcessID(pid); +} + +bool +LLDBSBAttachInfoParentProcessIDIsValid(LLDBSBAttachInfoRef instance) +{ + SBAttachInfo *unwrapped = reinterpret_cast(instance); + return unwrapped->ParentProcessIDIsValid(); +} + +LLDBSBListenerRef +LLDBSBAttachInfoGetListener(LLDBSBAttachInfoRef instance) +{ + SBAttachInfo *unwrapped = reinterpret_cast(instance); + return reinterpret_cast(new SBListener(unwrapped->GetListener())); +} + +void +LLDBSBAttachInfoSetListener(LLDBSBAttachInfoRef instance, LLDBSBListenerRef listener) +{ + SBAttachInfo *unwrapped = reinterpret_cast(instance); + unwrapped->SetListener(*reinterpret_cast(listener)); +} + +#ifdef __cplusplus +} +#endif Index: source/API/Bindings/SBBlockBinding.cpp =================================================================== --- source/API/Bindings/SBBlockBinding.cpp +++ source/API/Bindings/SBBlockBinding.cpp @@ -0,0 +1,155 @@ +//===-- SBBlockBinding.cpp --------------------------------------*- C++ -*-===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +#include "lldb/Bindings/LLDBBinding.h" +#include "lldb/API/LLDB.h" + +using namespace lldb; + +#ifdef __cplusplus +extern "C" { +#endif + +LLDBSBBlockRef +LLDBCreateSBBlock() +{ + return reinterpret_cast(new SBBlock()); +} + +void +LLDBDisposeSBBlock(LLDBSBBlockRef instance) +{ + delete reinterpret_cast(instance); +} + +bool +LLDBSBBlockIsInlined(LLDBSBBlockRef instance) +{ + SBBlock *unwrapped = reinterpret_cast(instance); + return unwrapped->IsInlined(); +} + +bool +LLDBSBBlockIsValid(LLDBSBBlockRef instance) +{ + SBBlock *unwrapped = reinterpret_cast(instance); + return unwrapped->IsValid(); +} + +const char * +LLDBSBBlockGetInlinedName(LLDBSBBlockRef instance) +{ + SBBlock *unwrapped = reinterpret_cast(instance); + return unwrapped->GetInlinedName(); +} + +LLDBSBFileSpecRef +LLDBSBBlockGetInlinedCallSiteFile(LLDBSBBlockRef instance) +{ + SBBlock *unwrapped = reinterpret_cast(instance); + return reinterpret_cast(new SBFileSpec(unwrapped->GetInlinedCallSiteFile())); +} + +unsigned int +LLDBSBBlockGetInlinedCallSiteLine(LLDBSBBlockRef instance) +{ + SBBlock *unwrapped = reinterpret_cast(instance); + return unwrapped->GetInlinedCallSiteLine(); +} + +unsigned int +LLDBSBBlockGetInlinedCallSiteColumn(LLDBSBBlockRef instance) +{ + SBBlock *unwrapped = reinterpret_cast(instance); + return unwrapped->GetInlinedCallSiteColumn(); +} + +LLDBSBBlockRef +LLDBSBBlockGetParent(LLDBSBBlockRef instance) +{ + SBBlock *unwrapped = reinterpret_cast(instance); + return reinterpret_cast(new SBBlock(unwrapped->GetParent())); +} + +LLDBSBBlockRef +LLDBSBBlockGetSibling(LLDBSBBlockRef instance) +{ + SBBlock *unwrapped = reinterpret_cast(instance); + return reinterpret_cast(new SBBlock(unwrapped->GetSibling())); +} + +LLDBSBBlockRef +LLDBSBBlockGetFirstChild(LLDBSBBlockRef instance) +{ + SBBlock *unwrapped = reinterpret_cast(instance); + return reinterpret_cast(new SBBlock(unwrapped->GetFirstChild())); +} + +unsigned int +LLDBSBBlockGetNumRanges(LLDBSBBlockRef instance) +{ + SBBlock *unwrapped = reinterpret_cast(instance); + return unwrapped->GetNumRanges(); +} + +LLDBSBAddressRef +LLDBSBBlockGetRangeStartAddress(LLDBSBBlockRef instance, uint32_t idx) +{ + SBBlock *unwrapped = reinterpret_cast(instance); + return reinterpret_cast(new SBAddress(unwrapped->GetRangeStartAddress(idx))); +} + +LLDBSBAddressRef +LLDBSBBlockGetRangeEndAddress(LLDBSBBlockRef instance, uint32_t idx) +{ + SBBlock *unwrapped = reinterpret_cast(instance); + return reinterpret_cast(new SBAddress(unwrapped->GetRangeEndAddress(idx))); +} + +unsigned int +LLDBSBBlockGetRangeIndexForBlockAddress(LLDBSBBlockRef instance, LLDBSBAddressRef block_addr) +{ + SBBlock *unwrapped = reinterpret_cast(instance); + return unwrapped->GetRangeIndexForBlockAddress(*reinterpret_cast(block_addr)); +} + +LLDBSBValueListRef +LLDBSBBlockGetVariables(LLDBSBBlockRef instance, LLDBSBFrameRef frame, bool arguments, bool locals, bool statics, + lldb::DynamicValueType use_dynamic) +{ + SBBlock *unwrapped = reinterpret_cast(instance); + return reinterpret_cast(new SBValueList( + unwrapped->GetVariables(*reinterpret_cast(frame), arguments, locals, statics, use_dynamic))); +} + +LLDBSBValueListRef +LLDBSBBlockGetVariables2(LLDBSBBlockRef instance, LLDBSBTargetRef target, bool arguments, bool locals, bool statics) +{ + SBBlock *unwrapped = reinterpret_cast(instance); + return reinterpret_cast( + new SBValueList(unwrapped->GetVariables(*reinterpret_cast(target), arguments, locals, statics))); +} + +LLDBSBBlockRef +LLDBSBBlockGetContainingInlinedBlock(LLDBSBBlockRef instance) +{ + SBBlock *unwrapped = reinterpret_cast(instance); + return reinterpret_cast(new SBBlock(unwrapped->GetContainingInlinedBlock())); +} + +bool +LLDBSBBlockGetDescription(LLDBSBBlockRef instance, LLDBSBStreamRef description) +{ + SBBlock *unwrapped = reinterpret_cast(instance); + return unwrapped->GetDescription(*reinterpret_cast(description)); +} + +#ifdef __cplusplus +} +#endif Index: source/API/Bindings/SBBreakpointBinding.cpp =================================================================== --- source/API/Bindings/SBBreakpointBinding.cpp +++ source/API/Bindings/SBBreakpointBinding.cpp @@ -0,0 +1,314 @@ +//===-- SBBreakpointBinding.cpp ---------------------------------*- C++ -*-===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +#include "lldb/Bindings/LLDBBinding.h" +#include "lldb/API/LLDB.h" + +using namespace lldb; + +#ifdef __cplusplus +extern "C" { +#endif + +LLDBSBBreakpointRef +LLDBCreateSBBreakpoint() +{ + return reinterpret_cast(new SBBreakpoint()); +} + +void +LLDBDisposeSBBreakpoint(LLDBSBBreakpointRef instance) +{ + delete reinterpret_cast(instance); +} + +int +LLDBSBBreakpointGetID(LLDBSBBreakpointRef instance) +{ + SBBreakpoint *unwrapped = reinterpret_cast(instance); + return unwrapped->GetID(); +} + +bool +LLDBSBBreakpointIsValid(LLDBSBBreakpointRef instance) +{ + SBBreakpoint *unwrapped = reinterpret_cast(instance); + return unwrapped->IsValid(); +} + +void +LLDBSBBreakpointClearAllBreakpointSites(LLDBSBBreakpointRef instance) +{ + SBBreakpoint *unwrapped = reinterpret_cast(instance); + unwrapped->ClearAllBreakpointSites(); +} + +LLDBSBBreakpointLocationRef +LLDBSBBreakpointFindLocationByAddress(LLDBSBBreakpointRef instance, lldb::addr_t vm_addr) +{ + SBBreakpoint *unwrapped = reinterpret_cast(instance); + return reinterpret_cast( + new SBBreakpointLocation(unwrapped->FindLocationByAddress(vm_addr))); +} + +int +LLDBSBBreakpointFindLocationIDByAddress(LLDBSBBreakpointRef instance, lldb::addr_t vm_addr) +{ + SBBreakpoint *unwrapped = reinterpret_cast(instance); + return unwrapped->FindLocationIDByAddress(vm_addr); +} + +LLDBSBBreakpointLocationRef +LLDBSBBreakpointFindLocationByID(LLDBSBBreakpointRef instance, int bp_loc_id) +{ + SBBreakpoint *unwrapped = reinterpret_cast(instance); + return reinterpret_cast( + new SBBreakpointLocation(unwrapped->FindLocationByID(bp_loc_id))); +} + +LLDBSBBreakpointLocationRef +LLDBSBBreakpointGetLocationAtIndex(LLDBSBBreakpointRef instance, uint32_t index) +{ + SBBreakpoint *unwrapped = reinterpret_cast(instance); + return reinterpret_cast( + new SBBreakpointLocation(unwrapped->GetLocationAtIndex(index))); +} + +void +LLDBSBBreakpointSetEnabled(LLDBSBBreakpointRef instance, bool enable) +{ + SBBreakpoint *unwrapped = reinterpret_cast(instance); + unwrapped->SetEnabled(enable); +} + +bool +LLDBSBBreakpointIsEnabled(LLDBSBBreakpointRef instance) +{ + SBBreakpoint *unwrapped = reinterpret_cast(instance); + return unwrapped->IsEnabled(); +} + +void +LLDBSBBreakpointSetOneShot(LLDBSBBreakpointRef instance, bool one_shot) +{ + SBBreakpoint *unwrapped = reinterpret_cast(instance); + unwrapped->SetOneShot(one_shot); +} + +bool +LLDBSBBreakpointIsOneShot(LLDBSBBreakpointRef instance) +{ + SBBreakpoint *unwrapped = reinterpret_cast(instance); + return unwrapped->IsOneShot(); +} + +bool +LLDBSBBreakpointIsInternal(LLDBSBBreakpointRef instance) +{ + SBBreakpoint *unwrapped = reinterpret_cast(instance); + return unwrapped->IsInternal(); +} + +unsigned int +LLDBSBBreakpointGetHitCount(LLDBSBBreakpointRef instance) +{ + SBBreakpoint *unwrapped = reinterpret_cast(instance); + return unwrapped->GetHitCount(); +} + +void +LLDBSBBreakpointSetIgnoreCount(LLDBSBBreakpointRef instance, uint32_t count) +{ + SBBreakpoint *unwrapped = reinterpret_cast(instance); + unwrapped->SetIgnoreCount(count); +} + +unsigned int +LLDBSBBreakpointGetIgnoreCount(LLDBSBBreakpointRef instance) +{ + SBBreakpoint *unwrapped = reinterpret_cast(instance); + return unwrapped->GetIgnoreCount(); +} + +void +LLDBSBBreakpointSetCondition(LLDBSBBreakpointRef instance, const char *condition) +{ + SBBreakpoint *unwrapped = reinterpret_cast(instance); + unwrapped->SetCondition(condition); +} + +const char * +LLDBSBBreakpointGetCondition(LLDBSBBreakpointRef instance) +{ + SBBreakpoint *unwrapped = reinterpret_cast(instance); + return unwrapped->GetCondition(); +} + +void +LLDBSBBreakpointSetThreadID(LLDBSBBreakpointRef instance, lldb::tid_t sb_thread_id) +{ + SBBreakpoint *unwrapped = reinterpret_cast(instance); + unwrapped->SetThreadID(sb_thread_id); +} + +unsigned long long +LLDBSBBreakpointGetThreadID(LLDBSBBreakpointRef instance) +{ + SBBreakpoint *unwrapped = reinterpret_cast(instance); + return unwrapped->GetThreadID(); +} + +void +LLDBSBBreakpointSetThreadIndex(LLDBSBBreakpointRef instance, uint32_t index) +{ + SBBreakpoint *unwrapped = reinterpret_cast(instance); + unwrapped->SetThreadIndex(index); +} + +unsigned int +LLDBSBBreakpointGetThreadIndex(LLDBSBBreakpointRef instance) +{ + SBBreakpoint *unwrapped = reinterpret_cast(instance); + return unwrapped->GetThreadIndex(); +} + +void +LLDBSBBreakpointSetThreadName(LLDBSBBreakpointRef instance, const char *thread_name) +{ + SBBreakpoint *unwrapped = reinterpret_cast(instance); + unwrapped->SetThreadName(thread_name); +} + +const char * +LLDBSBBreakpointGetThreadName(LLDBSBBreakpointRef instance) +{ + SBBreakpoint *unwrapped = reinterpret_cast(instance); + return unwrapped->GetThreadName(); +} + +void +LLDBSBBreakpointSetQueueName(LLDBSBBreakpointRef instance, const char *queue_name) +{ + SBBreakpoint *unwrapped = reinterpret_cast(instance); + unwrapped->SetQueueName(queue_name); +} + +const char * +LLDBSBBreakpointGetQueueName(LLDBSBBreakpointRef instance) +{ + SBBreakpoint *unwrapped = reinterpret_cast(instance); + return unwrapped->GetQueueName(); +} + +void +LLDBSBBreakpointSetCallback(LLDBSBBreakpointRef instance, lldb::SBBreakpoint::BreakpointHitCallback callback, + void *baton) +{ + SBBreakpoint *unwrapped = reinterpret_cast(instance); + unwrapped->SetCallback(callback, baton); +} + +void +LLDBSBBreakpointSetScriptCallbackFunction(LLDBSBBreakpointRef instance, const char *callback_function_name) +{ + SBBreakpoint *unwrapped = reinterpret_cast(instance); + unwrapped->SetScriptCallbackFunction(callback_function_name); +} + +LLDBSBErrorRef +LLDBSBBreakpointSetScriptCallbackBody(LLDBSBBreakpointRef instance, const char *script_body_text) +{ + SBBreakpoint *unwrapped = reinterpret_cast(instance); + return reinterpret_cast(new SBError(unwrapped->SetScriptCallbackBody(script_body_text))); +} + +bool +LLDBSBBreakpointAddName(LLDBSBBreakpointRef instance, const char *new_name) +{ + SBBreakpoint *unwrapped = reinterpret_cast(instance); + return unwrapped->AddName(new_name); +} + +void +LLDBSBBreakpointRemoveName(LLDBSBBreakpointRef instance, const char *name_to_remove) +{ + SBBreakpoint *unwrapped = reinterpret_cast(instance); + unwrapped->RemoveName(name_to_remove); +} + +bool +LLDBSBBreakpointMatchesName(LLDBSBBreakpointRef instance, const char *name) +{ + SBBreakpoint *unwrapped = reinterpret_cast(instance); + return unwrapped->MatchesName(name); +} + +void +LLDBSBBreakpointGetNames(LLDBSBBreakpointRef instance, LLDBSBStringListRef names) +{ + SBBreakpoint *unwrapped = reinterpret_cast(instance); + unwrapped->GetNames(*reinterpret_cast(names)); +} + +unsigned int +LLDBSBBreakpointGetNumResolvedLocations(LLDBSBBreakpointRef instance) +{ + SBBreakpoint *unwrapped = reinterpret_cast(instance); + return unwrapped->GetNumResolvedLocations(); +} + +unsigned int +LLDBSBBreakpointGetNumLocations(LLDBSBBreakpointRef instance) +{ + SBBreakpoint *unwrapped = reinterpret_cast(instance); + return unwrapped->GetNumLocations(); +} + +bool +LLDBSBBreakpointGetDescription(LLDBSBBreakpointRef instance, LLDBSBStreamRef description) +{ + SBBreakpoint *unwrapped = reinterpret_cast(instance); + return unwrapped->GetDescription(*reinterpret_cast(description)); +} + +bool +LLDBSBBreakpointEventIsBreakpointEvent(LLDBSBEventRef event) +{ + return lldb::SBBreakpoint::EventIsBreakpointEvent(*reinterpret_cast(event)); +} + +lldb::BreakpointEventType +LLDBSBBreakpointGetBreakpointEventTypeFromEvent(LLDBSBEventRef event) +{ + return lldb::SBBreakpoint::GetBreakpointEventTypeFromEvent(*reinterpret_cast(event)); +} + +LLDBSBBreakpointRef +LLDBSBBreakpointGetBreakpointFromEvent(LLDBSBEventRef event) +{ + return reinterpret_cast( + new SBBreakpoint(lldb::SBBreakpoint::GetBreakpointFromEvent(*reinterpret_cast(event)))); +} + +LLDBSBBreakpointLocationRef +LLDBSBBreakpointGetBreakpointLocationAtIndexFromEvent(LLDBSBEventRef event, uint32_t loc_idx) +{ + return reinterpret_cast(new SBBreakpointLocation( + lldb::SBBreakpoint::GetBreakpointLocationAtIndexFromEvent(*reinterpret_cast(event), loc_idx))); +} + +unsigned int +LLDBSBBreakpointGetNumBreakpointLocationsFromEvent(LLDBSBEventRef event_sp) +{ + return lldb::SBBreakpoint::GetNumBreakpointLocationsFromEvent(*reinterpret_cast(event_sp)); +} + +#ifdef __cplusplus +} +#endif Index: source/API/Bindings/SBBreakpointLocationBinding.cpp =================================================================== --- source/API/Bindings/SBBreakpointLocationBinding.cpp +++ source/API/Bindings/SBBreakpointLocationBinding.cpp @@ -0,0 +1,196 @@ +//===-- SBBreakpointLocationBinding.cpp -------------------------*- C++ -*-===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +#include "lldb/Bindings/LLDBBinding.h" +#include "lldb/API/LLDB.h" + +using namespace lldb; + +#ifdef __cplusplus +extern "C" { +#endif + +LLDBSBBreakpointLocationRef +LLDBCreateSBBreakpointLocation() +{ + return reinterpret_cast(new SBBreakpointLocation()); +} + +void +LLDBDisposeSBBreakpointLocation(LLDBSBBreakpointLocationRef instance) +{ + delete reinterpret_cast(instance); +} + +int +LLDBSBBreakpointLocationGetID(LLDBSBBreakpointLocationRef instance) +{ + SBBreakpointLocation *unwrapped = reinterpret_cast(instance); + return unwrapped->GetID(); +} + +bool +LLDBSBBreakpointLocationIsValid(LLDBSBBreakpointLocationRef instance) +{ + SBBreakpointLocation *unwrapped = reinterpret_cast(instance); + return unwrapped->IsValid(); +} + +LLDBSBAddressRef +LLDBSBBreakpointLocationGetAddress(LLDBSBBreakpointLocationRef instance) +{ + SBBreakpointLocation *unwrapped = reinterpret_cast(instance); + return reinterpret_cast(new SBAddress(unwrapped->GetAddress())); +} + +unsigned long long +LLDBSBBreakpointLocationGetLoadAddress(LLDBSBBreakpointLocationRef instance) +{ + SBBreakpointLocation *unwrapped = reinterpret_cast(instance); + return unwrapped->GetLoadAddress(); +} + +void +LLDBSBBreakpointLocationSetEnabled(LLDBSBBreakpointLocationRef instance, bool enabled) +{ + SBBreakpointLocation *unwrapped = reinterpret_cast(instance); + unwrapped->SetEnabled(enabled); +} + +bool +LLDBSBBreakpointLocationIsEnabled(LLDBSBBreakpointLocationRef instance) +{ + SBBreakpointLocation *unwrapped = reinterpret_cast(instance); + return unwrapped->IsEnabled(); +} + +unsigned int +LLDBSBBreakpointLocationGetIgnoreCount(LLDBSBBreakpointLocationRef instance) +{ + SBBreakpointLocation *unwrapped = reinterpret_cast(instance); + return unwrapped->GetIgnoreCount(); +} + +void +LLDBSBBreakpointLocationSetIgnoreCount(LLDBSBBreakpointLocationRef instance, uint32_t n) +{ + SBBreakpointLocation *unwrapped = reinterpret_cast(instance); + unwrapped->SetIgnoreCount(n); +} + +void +LLDBSBBreakpointLocationSetCondition(LLDBSBBreakpointLocationRef instance, const char *condition) +{ + SBBreakpointLocation *unwrapped = reinterpret_cast(instance); + unwrapped->SetCondition(condition); +} + +const char * +LLDBSBBreakpointLocationGetCondition(LLDBSBBreakpointLocationRef instance) +{ + SBBreakpointLocation *unwrapped = reinterpret_cast(instance); + return unwrapped->GetCondition(); +} + +void +LLDBSBBreakpointLocationSetScriptCallbackFunction(LLDBSBBreakpointLocationRef instance, + const char *callback_function_name) +{ + SBBreakpointLocation *unwrapped = reinterpret_cast(instance); + unwrapped->SetScriptCallbackFunction(callback_function_name); +} + +LLDBSBErrorRef +LLDBSBBreakpointLocationSetScriptCallbackBody(LLDBSBBreakpointLocationRef instance, const char *script_body_text) +{ + SBBreakpointLocation *unwrapped = reinterpret_cast(instance); + return reinterpret_cast(new SBError(unwrapped->SetScriptCallbackBody(script_body_text))); +} + +void +LLDBSBBreakpointLocationSetThreadID(LLDBSBBreakpointLocationRef instance, lldb::tid_t sb_thread_id) +{ + SBBreakpointLocation *unwrapped = reinterpret_cast(instance); + unwrapped->SetThreadID(sb_thread_id); +} + +unsigned long long +LLDBSBBreakpointLocationGetThreadID(LLDBSBBreakpointLocationRef instance) +{ + SBBreakpointLocation *unwrapped = reinterpret_cast(instance); + return unwrapped->GetThreadID(); +} + +void +LLDBSBBreakpointLocationSetThreadIndex(LLDBSBBreakpointLocationRef instance, uint32_t index) +{ + SBBreakpointLocation *unwrapped = reinterpret_cast(instance); + unwrapped->SetThreadIndex(index); +} + +unsigned int +LLDBSBBreakpointLocationGetThreadIndex(LLDBSBBreakpointLocationRef instance) +{ + SBBreakpointLocation *unwrapped = reinterpret_cast(instance); + return unwrapped->GetThreadIndex(); +} + +void +LLDBSBBreakpointLocationSetThreadName(LLDBSBBreakpointLocationRef instance, const char *thread_name) +{ + SBBreakpointLocation *unwrapped = reinterpret_cast(instance); + unwrapped->SetThreadName(thread_name); +} + +const char * +LLDBSBBreakpointLocationGetThreadName(LLDBSBBreakpointLocationRef instance) +{ + SBBreakpointLocation *unwrapped = reinterpret_cast(instance); + return unwrapped->GetThreadName(); +} + +void +LLDBSBBreakpointLocationSetQueueName(LLDBSBBreakpointLocationRef instance, const char *queue_name) +{ + SBBreakpointLocation *unwrapped = reinterpret_cast(instance); + unwrapped->SetQueueName(queue_name); +} + +const char * +LLDBSBBreakpointLocationGetQueueName(LLDBSBBreakpointLocationRef instance) +{ + SBBreakpointLocation *unwrapped = reinterpret_cast(instance); + return unwrapped->GetQueueName(); +} + +bool +LLDBSBBreakpointLocationIsResolved(LLDBSBBreakpointLocationRef instance) +{ + SBBreakpointLocation *unwrapped = reinterpret_cast(instance); + return unwrapped->IsResolved(); +} + +bool +LLDBSBBreakpointLocationGetDescription(LLDBSBBreakpointLocationRef instance, LLDBSBStreamRef description, + enum lldb::DescriptionLevel level) +{ + SBBreakpointLocation *unwrapped = reinterpret_cast(instance); + return unwrapped->GetDescription(*reinterpret_cast(description), level); +} + +LLDBSBBreakpointRef +LLDBSBBreakpointLocationGetBreakpoint(LLDBSBBreakpointLocationRef instance) +{ + SBBreakpointLocation *unwrapped = reinterpret_cast(instance); + return reinterpret_cast(new SBBreakpoint(unwrapped->GetBreakpoint())); +} + +#ifdef __cplusplus +} +#endif Index: source/API/Bindings/SBBroadcasterBinding.cpp =================================================================== --- source/API/Bindings/SBBroadcasterBinding.cpp +++ source/API/Bindings/SBBroadcasterBinding.cpp @@ -0,0 +1,103 @@ +//===-- SBBroadcasterBinding.cpp --------------------------------*- C++ -*-===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +#include "lldb/Bindings/LLDBBinding.h" +#include "lldb/API/LLDB.h" + +using namespace lldb; + +#ifdef __cplusplus +extern "C" { +#endif + +LLDBSBBroadcasterRef +LLDBCreateSBBroadcaster() +{ + return reinterpret_cast(new SBBroadcaster()); +} + +LLDBSBBroadcasterRef +LLDBCreateSBBroadcaster2(const char *name) +{ + return reinterpret_cast(new SBBroadcaster(name)); +} + +void +LLDBDisposeSBBroadcaster(LLDBSBBroadcasterRef instance) +{ + delete reinterpret_cast(instance); +} + +bool +LLDBSBBroadcasterIsValid(LLDBSBBroadcasterRef instance) +{ + SBBroadcaster *unwrapped = reinterpret_cast(instance); + return unwrapped->IsValid(); +} + +void +LLDBSBBroadcasterClear(LLDBSBBroadcasterRef instance) +{ + SBBroadcaster *unwrapped = reinterpret_cast(instance); + unwrapped->Clear(); +} + +void +LLDBSBBroadcasterBroadcastEventByType(LLDBSBBroadcasterRef instance, uint32_t event_type, bool unique) +{ + SBBroadcaster *unwrapped = reinterpret_cast(instance); + unwrapped->BroadcastEventByType(event_type, unique); +} + +void +LLDBSBBroadcasterBroadcastEvent(LLDBSBBroadcasterRef instance, LLDBSBEventRef event, bool unique) +{ + SBBroadcaster *unwrapped = reinterpret_cast(instance); + unwrapped->BroadcastEvent(*reinterpret_cast(event), unique); +} + +void +LLDBSBBroadcasterAddInitialEventsToListener(LLDBSBBroadcasterRef instance, LLDBSBListenerRef listener, + uint32_t requested_events) +{ + SBBroadcaster *unwrapped = reinterpret_cast(instance); + unwrapped->AddInitialEventsToListener(*reinterpret_cast(listener), requested_events); +} + +unsigned int +LLDBSBBroadcasterAddListener(LLDBSBBroadcasterRef instance, LLDBSBListenerRef listener, uint32_t event_mask) +{ + SBBroadcaster *unwrapped = reinterpret_cast(instance); + return unwrapped->AddListener(*reinterpret_cast(listener), event_mask); +} + +const char * +LLDBSBBroadcasterGetName(LLDBSBBroadcasterRef instance) +{ + SBBroadcaster *unwrapped = reinterpret_cast(instance); + return unwrapped->GetName(); +} + +bool +LLDBSBBroadcasterEventTypeHasListeners(LLDBSBBroadcasterRef instance, uint32_t event_type) +{ + SBBroadcaster *unwrapped = reinterpret_cast(instance); + return unwrapped->EventTypeHasListeners(event_type); +} + +bool +LLDBSBBroadcasterRemoveListener(LLDBSBBroadcasterRef instance, LLDBSBListenerRef listener, uint32_t event_mask) +{ + SBBroadcaster *unwrapped = reinterpret_cast(instance); + return unwrapped->RemoveListener(*reinterpret_cast(listener), event_mask); +} + +#ifdef __cplusplus +} +#endif Index: source/API/Bindings/SBCommandInterpreterBinding.cpp =================================================================== --- source/API/Bindings/SBCommandInterpreterBinding.cpp +++ source/API/Bindings/SBCommandInterpreterBinding.cpp @@ -0,0 +1,414 @@ +//===-- SBCommandInterpreterBinding.cpp -------------------------*- C++ -*-===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +#include "lldb/Bindings/LLDBBinding.h" +#include "lldb/API/LLDB.h" + +using namespace lldb; + +#ifdef __cplusplus +extern "C" { +#endif + +LLDBSBCommandInterpreterRunOptionsRef +LLDBCreateSBCommandInterpreterRunOptions() +{ + return reinterpret_cast(new SBCommandInterpreterRunOptions()); +} + +void +LLDBDisposeSBCommandInterpreterRunOptions(LLDBSBCommandInterpreterRunOptionsRef instance) +{ + delete reinterpret_cast(instance); +} + +bool +LLDBSBCommandInterpreterRunOptionsGetStopOnContinue(LLDBSBCommandInterpreterRunOptionsRef instance) +{ + SBCommandInterpreterRunOptions *unwrapped = reinterpret_cast(instance); + return unwrapped->GetStopOnContinue(); +} + +void +LLDBSBCommandInterpreterRunOptionsSetStopOnContinue(LLDBSBCommandInterpreterRunOptionsRef instance, bool var0) +{ + SBCommandInterpreterRunOptions *unwrapped = reinterpret_cast(instance); + unwrapped->SetStopOnContinue(var0); +} + +bool +LLDBSBCommandInterpreterRunOptionsGetStopOnError(LLDBSBCommandInterpreterRunOptionsRef instance) +{ + SBCommandInterpreterRunOptions *unwrapped = reinterpret_cast(instance); + return unwrapped->GetStopOnError(); +} + +void +LLDBSBCommandInterpreterRunOptionsSetStopOnError(LLDBSBCommandInterpreterRunOptionsRef instance, bool var0) +{ + SBCommandInterpreterRunOptions *unwrapped = reinterpret_cast(instance); + unwrapped->SetStopOnError(var0); +} + +bool +LLDBSBCommandInterpreterRunOptionsGetStopOnCrash(LLDBSBCommandInterpreterRunOptionsRef instance) +{ + SBCommandInterpreterRunOptions *unwrapped = reinterpret_cast(instance); + return unwrapped->GetStopOnCrash(); +} + +void +LLDBSBCommandInterpreterRunOptionsSetStopOnCrash(LLDBSBCommandInterpreterRunOptionsRef instance, bool var0) +{ + SBCommandInterpreterRunOptions *unwrapped = reinterpret_cast(instance); + unwrapped->SetStopOnCrash(var0); +} + +bool +LLDBSBCommandInterpreterRunOptionsGetEchoCommands(LLDBSBCommandInterpreterRunOptionsRef instance) +{ + SBCommandInterpreterRunOptions *unwrapped = reinterpret_cast(instance); + return unwrapped->GetEchoCommands(); +} + +void +LLDBSBCommandInterpreterRunOptionsSetEchoCommands(LLDBSBCommandInterpreterRunOptionsRef instance, bool var0) +{ + SBCommandInterpreterRunOptions *unwrapped = reinterpret_cast(instance); + unwrapped->SetEchoCommands(var0); +} + +bool +LLDBSBCommandInterpreterRunOptionsGetPrintResults(LLDBSBCommandInterpreterRunOptionsRef instance) +{ + SBCommandInterpreterRunOptions *unwrapped = reinterpret_cast(instance); + return unwrapped->GetPrintResults(); +} + +void +LLDBSBCommandInterpreterRunOptionsSetPrintResults(LLDBSBCommandInterpreterRunOptionsRef instance, bool var0) +{ + SBCommandInterpreterRunOptions *unwrapped = reinterpret_cast(instance); + unwrapped->SetPrintResults(var0); +} + +bool +LLDBSBCommandInterpreterRunOptionsGetAddToHistory(LLDBSBCommandInterpreterRunOptionsRef instance) +{ + SBCommandInterpreterRunOptions *unwrapped = reinterpret_cast(instance); + return unwrapped->GetAddToHistory(); +} + +void +LLDBSBCommandInterpreterRunOptionsSetAddToHistory(LLDBSBCommandInterpreterRunOptionsRef instance, bool var0) +{ + SBCommandInterpreterRunOptions *unwrapped = reinterpret_cast(instance); + unwrapped->SetAddToHistory(var0); +} + +void +LLDBDisposeSBCommandInterpreter(LLDBSBCommandInterpreterRef instance) +{ + delete reinterpret_cast(instance); +} + +const char * +LLDBSBCommandInterpreterGetArgumentTypeAsCString(const lldb::CommandArgumentType arg_type) +{ + return lldb::SBCommandInterpreter::GetArgumentTypeAsCString(arg_type); +} + +const char * +LLDBSBCommandInterpreterGetArgumentDescriptionAsCString(const lldb::CommandArgumentType arg_type) +{ + return lldb::SBCommandInterpreter::GetArgumentDescriptionAsCString(arg_type); +} + +bool +LLDBSBCommandInterpreterEventIsCommandInterpreterEvent(LLDBSBEventRef event) +{ + return lldb::SBCommandInterpreter::EventIsCommandInterpreterEvent(*reinterpret_cast(event)); +} + +bool +LLDBSBCommandInterpreterIsValid(LLDBSBCommandInterpreterRef instance) +{ + SBCommandInterpreter *unwrapped = reinterpret_cast(instance); + return unwrapped->IsValid(); +} + +bool +LLDBSBCommandInterpreterCommandExists(LLDBSBCommandInterpreterRef instance, const char *cmd) +{ + SBCommandInterpreter *unwrapped = reinterpret_cast(instance); + return unwrapped->CommandExists(cmd); +} + +bool +LLDBSBCommandInterpreterAliasExists(LLDBSBCommandInterpreterRef instance, const char *cmd) +{ + SBCommandInterpreter *unwrapped = reinterpret_cast(instance); + return unwrapped->AliasExists(cmd); +} + +LLDBSBBroadcasterRef +LLDBSBCommandInterpreterGetBroadcaster(LLDBSBCommandInterpreterRef instance) +{ + SBCommandInterpreter *unwrapped = reinterpret_cast(instance); + return reinterpret_cast(new SBBroadcaster(unwrapped->GetBroadcaster())); +} + +const char * +LLDBSBCommandInterpreterGetBroadcasterClass() +{ + return lldb::SBCommandInterpreter::GetBroadcasterClass(); +} + +bool +LLDBSBCommandInterpreterHasCommands(LLDBSBCommandInterpreterRef instance) +{ + SBCommandInterpreter *unwrapped = reinterpret_cast(instance); + return unwrapped->HasCommands(); +} + +bool +LLDBSBCommandInterpreterHasAliases(LLDBSBCommandInterpreterRef instance) +{ + SBCommandInterpreter *unwrapped = reinterpret_cast(instance); + return unwrapped->HasAliases(); +} + +bool +LLDBSBCommandInterpreterHasAliasOptions(LLDBSBCommandInterpreterRef instance) +{ + SBCommandInterpreter *unwrapped = reinterpret_cast(instance); + return unwrapped->HasAliasOptions(); +} + +LLDBSBProcessRef +LLDBSBCommandInterpreterGetProcess(LLDBSBCommandInterpreterRef instance) +{ + SBCommandInterpreter *unwrapped = reinterpret_cast(instance); + return reinterpret_cast(new SBProcess(unwrapped->GetProcess())); +} + +LLDBSBDebuggerRef +LLDBSBCommandInterpreterGetDebugger(LLDBSBCommandInterpreterRef instance) +{ + SBCommandInterpreter *unwrapped = reinterpret_cast(instance); + return reinterpret_cast(new SBDebugger(unwrapped->GetDebugger())); +} + +LLDBSBCommandRef +LLDBSBCommandInterpreterAddMultiwordCommand(LLDBSBCommandInterpreterRef instance, const char *name, const char *help) +{ + SBCommandInterpreter *unwrapped = reinterpret_cast(instance); + return reinterpret_cast(new SBCommand(unwrapped->AddMultiwordCommand(name, help))); +} + +LLDBSBCommandRef +LLDBSBCommandInterpreterAddCommand(LLDBSBCommandInterpreterRef instance, const char *name, + LLDBSBCommandPluginInterfaceRef impl, const char *help) +{ + SBCommandInterpreter *unwrapped = reinterpret_cast(instance); + return reinterpret_cast( + new SBCommand(unwrapped->AddCommand(name, reinterpret_cast(impl), help))); +} + +void +LLDBSBCommandInterpreterSourceInitFileInHomeDirectory(LLDBSBCommandInterpreterRef instance, + LLDBSBCommandReturnObjectRef result) +{ + SBCommandInterpreter *unwrapped = reinterpret_cast(instance); + unwrapped->SourceInitFileInHomeDirectory(*reinterpret_cast(result)); +} + +void +LLDBSBCommandInterpreterSourceInitFileInCurrentWorkingDirectory(LLDBSBCommandInterpreterRef instance, + LLDBSBCommandReturnObjectRef result) +{ + SBCommandInterpreter *unwrapped = reinterpret_cast(instance); + unwrapped->SourceInitFileInCurrentWorkingDirectory(*reinterpret_cast(result)); +} + +enum lldb::ReturnStatus +LLDBSBCommandInterpreterHandleCommand(LLDBSBCommandInterpreterRef instance, const char *command_line, + LLDBSBCommandReturnObjectRef result, bool add_to_history) +{ + SBCommandInterpreter *unwrapped = reinterpret_cast(instance); + return unwrapped->HandleCommand(command_line, *reinterpret_cast(result), add_to_history); +} + +enum lldb::ReturnStatus +LLDBSBCommandInterpreterHandleCommand2(LLDBSBCommandInterpreterRef instance, const char *command_line, + LLDBSBExecutionContextRef exe_ctx, LLDBSBCommandReturnObjectRef result, + bool add_to_history) +{ + SBCommandInterpreter *unwrapped = reinterpret_cast(instance); + return unwrapped->HandleCommand(command_line, *reinterpret_cast(exe_ctx), + *reinterpret_cast(result), add_to_history); +} + +void +LLDBSBCommandInterpreterHandleCommandsFromFile(LLDBSBCommandInterpreterRef instance, LLDBSBFileSpecRef file, + LLDBSBExecutionContextRef override_context, + LLDBSBCommandInterpreterRunOptionsRef options, + LLDBSBCommandReturnObjectRef result) +{ + SBCommandInterpreter *unwrapped = reinterpret_cast(instance); + unwrapped->HandleCommandsFromFile(*reinterpret_cast(file), + *reinterpret_cast(override_context), + *reinterpret_cast(options), + *reinterpret_cast(result)); +} + +int +LLDBSBCommandInterpreterHandleCompletion(LLDBSBCommandInterpreterRef instance, const char *current_line, + const char *cursor, const char *last_char, int match_start_point, + int max_return_elements, LLDBSBStringListRef matches) +{ + SBCommandInterpreter *unwrapped = reinterpret_cast(instance); + return unwrapped->HandleCompletion(current_line, cursor, last_char, match_start_point, max_return_elements, + *reinterpret_cast(matches)); +} + +int +LLDBSBCommandInterpreterHandleCompletion2(LLDBSBCommandInterpreterRef instance, const char *current_line, + uint32_t cursor_pos, int match_start_point, int max_return_elements, + LLDBSBStringListRef matches) +{ + SBCommandInterpreter *unwrapped = reinterpret_cast(instance); + return unwrapped->HandleCompletion(current_line, cursor_pos, match_start_point, max_return_elements, + *reinterpret_cast(matches)); +} + +bool +LLDBSBCommandInterpreterSetCommandOverrideCallback(LLDBSBCommandInterpreterRef instance, const char *command_name, + lldb::CommandOverrideCallback callback, void *baton) +{ + SBCommandInterpreter *unwrapped = reinterpret_cast(instance); + return unwrapped->SetCommandOverrideCallback(command_name, callback, baton); +} + +bool +LLDBSBCommandInterpreterIsActive(LLDBSBCommandInterpreterRef instance) +{ + SBCommandInterpreter *unwrapped = reinterpret_cast(instance); + return unwrapped->IsActive(); +} + +const char * +LLDBSBCommandInterpreterGetIOHandlerControlSequence(LLDBSBCommandInterpreterRef instance, char ch) +{ + SBCommandInterpreter *unwrapped = reinterpret_cast(instance); + return unwrapped->GetIOHandlerControlSequence(ch); +} + +bool +LLDBSBCommandInterpreterGetPromptOnQuit(LLDBSBCommandInterpreterRef instance) +{ + SBCommandInterpreter *unwrapped = reinterpret_cast(instance); + return unwrapped->GetPromptOnQuit(); +} + +void +LLDBSBCommandInterpreterSetPromptOnQuit(LLDBSBCommandInterpreterRef instance, bool b) +{ + SBCommandInterpreter *unwrapped = reinterpret_cast(instance); + unwrapped->SetPromptOnQuit(b); +} + +bool +LLDBSBCommandPluginInterfaceDoExecute(LLDBSBCommandPluginInterfaceRef instance, LLDBSBDebuggerRef, char **var0, + LLDBSBCommandReturnObjectRef var1) +{ + SBCommandPluginInterface *unwrapped = reinterpret_cast(instance); + return unwrapped->DoExecute(*reinterpret_cast(var1), var0, + *reinterpret_cast(var1)); +} + +void +LLDBDisposeSBCommandPluginInterface(LLDBSBCommandPluginInterfaceRef instance) +{ + delete reinterpret_cast(instance); +} + +LLDBSBCommandRef +LLDBCreateSBCommand() +{ + return reinterpret_cast(new SBCommand()); +} + +bool +LLDBSBCommandIsValid(LLDBSBCommandRef instance) +{ + SBCommand *unwrapped = reinterpret_cast(instance); + return unwrapped->IsValid(); +} + +const char * +LLDBSBCommandGetName(LLDBSBCommandRef instance) +{ + SBCommand *unwrapped = reinterpret_cast(instance); + return unwrapped->GetName(); +} + +const char * +LLDBSBCommandGetHelp(LLDBSBCommandRef instance) +{ + SBCommand *unwrapped = reinterpret_cast(instance); + return unwrapped->GetHelp(); +} + +const char * +LLDBSBCommandGetHelpLong(LLDBSBCommandRef instance) +{ + SBCommand *unwrapped = reinterpret_cast(instance); + return unwrapped->GetHelpLong(); +} + +void +LLDBSBCommandSetHelp(LLDBSBCommandRef instance, const char *var0) +{ + SBCommand *unwrapped = reinterpret_cast(instance); + unwrapped->SetHelp(var0); +} + +void +LLDBSBCommandSetHelpLong(LLDBSBCommandRef instance, const char *var0) +{ + SBCommand *unwrapped = reinterpret_cast(instance); + unwrapped->SetHelpLong(var0); +} + +LLDBSBCommandRef +LLDBSBCommandAddMultiwordCommand(LLDBSBCommandRef instance, const char *name, const char *help) +{ + SBCommand *unwrapped = reinterpret_cast(instance); + return reinterpret_cast(new SBCommand(unwrapped->AddMultiwordCommand(name, help))); +} + +LLDBSBCommandRef +LLDBSBCommandAddCommand(LLDBSBCommandRef instance, const char *name, LLDBSBCommandPluginInterfaceRef impl, + const char *help) +{ + SBCommand *unwrapped = reinterpret_cast(instance); + return reinterpret_cast( + new SBCommand(unwrapped->AddCommand(name, reinterpret_cast(impl), help))); +} + +void +LLDBDisposeSBCommand(LLDBSBCommandRef instance) +{ + delete reinterpret_cast(instance); +} + +#ifdef __cplusplus +} +#endif Index: source/API/Bindings/SBCommandReturnObjectBinding.cpp =================================================================== --- source/API/Bindings/SBCommandReturnObjectBinding.cpp +++ source/API/Bindings/SBCommandReturnObjectBinding.cpp @@ -0,0 +1,214 @@ +//===-- SBCommandReturnObjectBinding.cpp ------------------------*- C++ -*-===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +#include "lldb/Bindings/LLDBBinding.h" +#include "lldb/API/LLDB.h" +#include "lldb/Interpreter/CommandReturnObject.h" +#include "stdarg.h" + +using namespace lldb; + +#ifdef __cplusplus +extern "C" { +#endif + +LLDBSBCommandReturnObjectRef +LLDBCreateSBCommandReturnObject() +{ + return reinterpret_cast(new SBCommandReturnObject()); +} + +void * +LLDBSBCommandReturnObjectRelease(LLDBSBCommandReturnObjectRef instance) +{ + SBCommandReturnObject *unwrapped = reinterpret_cast(instance); + return unwrapped->Release(); +} + +void +LLDBDisposeSBCommandReturnObject(LLDBSBCommandReturnObjectRef instance) +{ + delete reinterpret_cast(instance); +} + +bool +LLDBSBCommandReturnObjectIsValid(LLDBSBCommandReturnObjectRef instance) +{ + SBCommandReturnObject *unwrapped = reinterpret_cast(instance); + return unwrapped->IsValid(); +} + +const char * +LLDBSBCommandReturnObjectGetOutput(LLDBSBCommandReturnObjectRef instance) +{ + SBCommandReturnObject *unwrapped = reinterpret_cast(instance); + return unwrapped->GetOutput(); +} + +const char * +LLDBSBCommandReturnObjectGetError(LLDBSBCommandReturnObjectRef instance) +{ + SBCommandReturnObject *unwrapped = reinterpret_cast(instance); + return unwrapped->GetError(); +} + +unsigned int +LLDBSBCommandReturnObjectPutOutput(LLDBSBCommandReturnObjectRef instance, FILE *fh) +{ + SBCommandReturnObject *unwrapped = reinterpret_cast(instance); + return unwrapped->PutOutput(fh); +} + +unsigned int +LLDBSBCommandReturnObjectGetOutputSize(LLDBSBCommandReturnObjectRef instance) +{ + SBCommandReturnObject *unwrapped = reinterpret_cast(instance); + return unwrapped->GetOutputSize(); +} + +unsigned int +LLDBSBCommandReturnObjectGetErrorSize(LLDBSBCommandReturnObjectRef instance) +{ + SBCommandReturnObject *unwrapped = reinterpret_cast(instance); + return unwrapped->GetErrorSize(); +} + +unsigned int +LLDBSBCommandReturnObjectPutError(LLDBSBCommandReturnObjectRef instance, FILE *fh) +{ + SBCommandReturnObject *unwrapped = reinterpret_cast(instance); + return unwrapped->PutError(fh); +} + +void +LLDBSBCommandReturnObjectClear(LLDBSBCommandReturnObjectRef instance) +{ + SBCommandReturnObject *unwrapped = reinterpret_cast(instance); + unwrapped->Clear(); +} + +enum lldb::ReturnStatus +LLDBSBCommandReturnObjectGetStatus(LLDBSBCommandReturnObjectRef instance) +{ + SBCommandReturnObject *unwrapped = reinterpret_cast(instance); + return unwrapped->GetStatus(); +} + +void +LLDBSBCommandReturnObjectSetStatus(LLDBSBCommandReturnObjectRef instance, lldb::ReturnStatus status) +{ + SBCommandReturnObject *unwrapped = reinterpret_cast(instance); + unwrapped->SetStatus(status); +} + +bool +LLDBSBCommandReturnObjectSucceeded(LLDBSBCommandReturnObjectRef instance) +{ + SBCommandReturnObject *unwrapped = reinterpret_cast(instance); + return unwrapped->Succeeded(); +} + +bool +LLDBSBCommandReturnObjectHasResult(LLDBSBCommandReturnObjectRef instance) +{ + SBCommandReturnObject *unwrapped = reinterpret_cast(instance); + return unwrapped->HasResult(); +} + +void +LLDBSBCommandReturnObjectAppendMessage(LLDBSBCommandReturnObjectRef instance, const char *message) +{ + SBCommandReturnObject *unwrapped = reinterpret_cast(instance); + unwrapped->AppendMessage(message); +} + +void +LLDBSBCommandReturnObjectAppendWarning(LLDBSBCommandReturnObjectRef instance, const char *message) +{ + SBCommandReturnObject *unwrapped = reinterpret_cast(instance); + unwrapped->AppendWarning(message); +} + +bool +LLDBSBCommandReturnObjectGetDescription(LLDBSBCommandReturnObjectRef instance, LLDBSBStreamRef description) +{ + SBCommandReturnObject *unwrapped = reinterpret_cast(instance); + return unwrapped->GetDescription(*reinterpret_cast(description)); +} + +void +LLDBSBCommandReturnObjectSetImmediateOutputFile(LLDBSBCommandReturnObjectRef instance, FILE *fh) +{ + SBCommandReturnObject *unwrapped = reinterpret_cast(instance); + unwrapped->SetImmediateOutputFile(fh); +} + +void +LLDBSBCommandReturnObjectSetImmediateErrorFile(LLDBSBCommandReturnObjectRef instance, FILE *fh) +{ + SBCommandReturnObject *unwrapped = reinterpret_cast(instance); + unwrapped->SetImmediateErrorFile(fh); +} + +void +LLDBSBCommandReturnObjectPutCString(LLDBSBCommandReturnObjectRef instance, const char *string, int len) +{ + SBCommandReturnObject *unwrapped = reinterpret_cast(instance); + unwrapped->PutCString(string, len); +} + +unsigned int +LLDBSBCommandReturnObjectPrintf(LLDBSBCommandReturnObjectRef instance, const char *format, ...) +{ + if (!format) + return 0; + + unsigned int retVal; + SBCommandReturnObject *unwrapped = reinterpret_cast(instance); + + va_list args; + va_start(args, format); + retVal = unwrapped->Printf(format, args); + va_end(args); + + return retVal; +} + +const char * +LLDBSBCommandReturnObjectGetOutput2(LLDBSBCommandReturnObjectRef instance, bool only_if_no_immediate) +{ + SBCommandReturnObject *unwrapped = reinterpret_cast(instance); + return unwrapped->GetOutput(only_if_no_immediate); +} + +const char * +LLDBSBCommandReturnObjectGetError2(LLDBSBCommandReturnObjectRef instance, bool only_if_no_immediate) +{ + SBCommandReturnObject *unwrapped = reinterpret_cast(instance); + return unwrapped->GetError(only_if_no_immediate); +} + +void +LLDBSBCommandReturnObjectSetError(LLDBSBCommandReturnObjectRef instance, LLDBSBErrorRef error, + const char *fallback_error_cstr) +{ + SBCommandReturnObject *unwrapped = reinterpret_cast(instance); + unwrapped->SetError(*reinterpret_cast(error), fallback_error_cstr); +} + +void +LLDBSBCommandReturnObjectSetError2(LLDBSBCommandReturnObjectRef instance, const char *error_cstr) +{ + SBCommandReturnObject *unwrapped = reinterpret_cast(instance); + unwrapped->SetError(error_cstr); +} + +#ifdef __cplusplus +} +#endif Index: source/API/Bindings/SBCommunicationBinding.cpp =================================================================== --- source/API/Bindings/SBCommunicationBinding.cpp +++ source/API/Bindings/SBCommunicationBinding.cpp @@ -0,0 +1,145 @@ +//===-- SBCommunicationBinding.cpp ------------------------------*- C++ -*-===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +#include "lldb/Bindings/LLDBBinding.h" +#include "lldb/API/LLDB.h" + +using namespace lldb; + +#ifdef __cplusplus +extern "C" { +#endif + +LLDBSBCommunicationRef +LLDBCreateSBCommunication() +{ + return reinterpret_cast(new SBCommunication()); +} + +LLDBSBCommunicationRef +LLDBCreateSBCommunication2(const char *broadcaster_name) +{ + return reinterpret_cast(new SBCommunication(broadcaster_name)); +} + +void +LLDBDisposeSBCommunication(LLDBSBCommunicationRef instance) +{ + delete reinterpret_cast(instance); +} + +bool +LLDBSBCommunicationIsValid(LLDBSBCommunicationRef instance) +{ + SBCommunication *unwrapped = reinterpret_cast(instance); + return unwrapped->IsValid(); +} + +LLDBSBBroadcasterRef +LLDBSBCommunicationGetBroadcaster(LLDBSBCommunicationRef instance) +{ + SBCommunication *unwrapped = reinterpret_cast(instance); + return reinterpret_cast(new SBBroadcaster(unwrapped->GetBroadcaster())); +} + +const char * +LLDBSBCommunicationGetBroadcasterClass() +{ + return lldb::SBCommunication::GetBroadcasterClass(); +} + +enum lldb::ConnectionStatus +LLDBSBCommunicationAdoptFileDesriptor(LLDBSBCommunicationRef instance, int fd, bool owns_fd) +{ + SBCommunication *unwrapped = reinterpret_cast(instance); + return unwrapped->AdoptFileDesriptor(fd, owns_fd); +} + +enum lldb::ConnectionStatus +LLDBSBCommunicationConnect(LLDBSBCommunicationRef instance, const char *url) +{ + SBCommunication *unwrapped = reinterpret_cast(instance); + return unwrapped->Connect(url); +} + +enum lldb::ConnectionStatus +LLDBSBCommunicationDisconnect(LLDBSBCommunicationRef instance) +{ + SBCommunication *unwrapped = reinterpret_cast(instance); + return unwrapped->Disconnect(); +} + +bool +LLDBSBCommunicationIsConnected(LLDBSBCommunicationRef instance) +{ + SBCommunication *unwrapped = reinterpret_cast(instance); + return unwrapped->IsConnected(); +} + +bool +LLDBSBCommunicationGetCloseOnEOF(LLDBSBCommunicationRef instance) +{ + SBCommunication *unwrapped = reinterpret_cast(instance); + return unwrapped->GetCloseOnEOF(); +} + +void +LLDBSBCommunicationSetCloseOnEOF(LLDBSBCommunicationRef instance, bool b) +{ + SBCommunication *unwrapped = reinterpret_cast(instance); + unwrapped->SetCloseOnEOF(b); +} + +unsigned int +LLDBSBCommunicationRead(LLDBSBCommunicationRef instance, void *dst, size_t dst_len, uint32_t timeout_usec, + lldb::ConnectionStatus status) +{ + SBCommunication *unwrapped = reinterpret_cast(instance); + return unwrapped->Read(dst, dst_len, timeout_usec, status); +} + +unsigned int +LLDBSBCommunicationWrite(LLDBSBCommunicationRef instance, void *src, size_t src_len, lldb::ConnectionStatus status) +{ + SBCommunication *unwrapped = reinterpret_cast(instance); + return unwrapped->Write(src, src_len, status); +} + +bool +LLDBSBCommunicationReadThreadStart(LLDBSBCommunicationRef instance) +{ + SBCommunication *unwrapped = reinterpret_cast(instance); + return unwrapped->ReadThreadStart(); +} + +bool +LLDBSBCommunicationReadThreadStop(LLDBSBCommunicationRef instance) +{ + SBCommunication *unwrapped = reinterpret_cast(instance); + return unwrapped->ReadThreadStop(); +} + +bool +LLDBSBCommunicationReadThreadIsRunning(LLDBSBCommunicationRef instance) +{ + SBCommunication *unwrapped = reinterpret_cast(instance); + return unwrapped->ReadThreadIsRunning(); +} + +bool +LLDBSBCommunicationSetReadThreadBytesReceivedCallback(LLDBSBCommunicationRef instance, ReadThreadBytesReceived callback, + void *callback_baton) +{ + SBCommunication *unwrapped = reinterpret_cast(instance); + return unwrapped->SetReadThreadBytesReceivedCallback(callback, callback_baton); +} + +#ifdef __cplusplus +} +#endif Index: source/API/Bindings/SBCompileUnitBinding.cpp =================================================================== --- source/API/Bindings/SBCompileUnitBinding.cpp +++ source/API/Bindings/SBCompileUnitBinding.cpp @@ -0,0 +1,120 @@ +//===-- SBCompileUnitBinding.cpp --------------------------------*- C++ -*-===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +#include "lldb/Bindings/LLDBBinding.h" +#include "lldb/API/LLDB.h" + +using namespace lldb; + +#ifdef __cplusplus +extern "C" { +#endif + +LLDBSBCompileUnitRef +LLDBCreateSBCompileUnit() +{ + return reinterpret_cast(new SBCompileUnit()); +} + +void +LLDBDisposeSBCompileUnit(LLDBSBCompileUnitRef instance) +{ + delete reinterpret_cast(instance); +} + +bool +LLDBSBCompileUnitIsValid(LLDBSBCompileUnitRef instance) +{ + SBCompileUnit *unwrapped = reinterpret_cast(instance); + return unwrapped->IsValid(); +} + +LLDBSBFileSpecRef +LLDBSBCompileUnitGetFileSpec(LLDBSBCompileUnitRef instance) +{ + SBCompileUnit *unwrapped = reinterpret_cast(instance); + return reinterpret_cast(new SBFileSpec(unwrapped->GetFileSpec())); +} + +unsigned int +LLDBSBCompileUnitGetNumLineEntries(LLDBSBCompileUnitRef instance) +{ + SBCompileUnit *unwrapped = reinterpret_cast(instance); + return unwrapped->GetNumLineEntries(); +} + +LLDBSBLineEntryRef +LLDBSBCompileUnitGetLineEntryAtIndex(LLDBSBCompileUnitRef instance, uint32_t idx) +{ + SBCompileUnit *unwrapped = reinterpret_cast(instance); + return reinterpret_cast(new SBLineEntry(unwrapped->GetLineEntryAtIndex(idx))); +} + +unsigned int +LLDBSBCompileUnitFindLineEntryIndex(LLDBSBCompileUnitRef instance, uint32_t start_idx, uint32_t line, + LLDBSBFileSpecRef inline_file_spec) +{ + SBCompileUnit *unwrapped = reinterpret_cast(instance); + return unwrapped->FindLineEntryIndex(start_idx, line, reinterpret_cast(inline_file_spec)); +} + +unsigned int +LLDBSBCompileUnitFindLineEntryIndex2(LLDBSBCompileUnitRef instance, uint32_t start_idx, uint32_t line, + LLDBSBFileSpecRef inline_file_spec, bool exact) +{ + SBCompileUnit *unwrapped = reinterpret_cast(instance); + return unwrapped->FindLineEntryIndex(start_idx, line, reinterpret_cast(inline_file_spec), exact); +} + +LLDBSBFileSpecRef +LLDBSBCompileUnitGetSupportFileAtIndex(LLDBSBCompileUnitRef instance, uint32_t idx) +{ + SBCompileUnit *unwrapped = reinterpret_cast(instance); + return reinterpret_cast(new SBFileSpec(unwrapped->GetSupportFileAtIndex(idx))); +} + +unsigned int +LLDBSBCompileUnitGetNumSupportFiles(LLDBSBCompileUnitRef instance) +{ + SBCompileUnit *unwrapped = reinterpret_cast(instance); + return unwrapped->GetNumSupportFiles(); +} + +unsigned int +LLDBSBCompileUnitFindSupportFileIndex(LLDBSBCompileUnitRef instance, uint32_t start_idx, LLDBSBFileSpecRef sb_file, + bool full) +{ + SBCompileUnit *unwrapped = reinterpret_cast(instance); + return unwrapped->FindSupportFileIndex(start_idx, *reinterpret_cast(sb_file), full); +} + +LLDBSBTypeListRef +LLDBSBCompileUnitGetTypes(LLDBSBCompileUnitRef instance, uint32_t type_mask) +{ + SBCompileUnit *unwrapped = reinterpret_cast(instance); + return reinterpret_cast(new SBTypeList(unwrapped->GetTypes(type_mask))); +} + +enum lldb::LanguageType +LLDBSBCompileUnitGetLanguage(LLDBSBCompileUnitRef instance) +{ + SBCompileUnit *unwrapped = reinterpret_cast(instance); + return unwrapped->GetLanguage(); +} + +bool +LLDBSBCompileUnitGetDescription(LLDBSBCompileUnitRef instance, LLDBSBStreamRef description) +{ + SBCompileUnit *unwrapped = reinterpret_cast(instance); + return unwrapped->GetDescription(*reinterpret_cast(description)); +} + +#ifdef __cplusplus +} +#endif Index: source/API/Bindings/SBDataBinding.cpp =================================================================== --- source/API/Bindings/SBDataBinding.cpp +++ source/API/Bindings/SBDataBinding.cpp @@ -0,0 +1,286 @@ +//===-- SBDataBinding.cpp ---------------------------------------*- C++ -*-===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +#include "lldb/Bindings/LLDBBinding.h" +#include "lldb/API/LLDB.h" + +using namespace lldb; + +#ifdef __cplusplus +extern "C" { +#endif + +LLDBSBDataRef +LLDBCreateSBData() +{ + return reinterpret_cast(new SBData()); +} + +void +LLDBDisposeSBData(LLDBSBDataRef instance) +{ + delete reinterpret_cast(instance); +} + +unsigned char +LLDBSBDataGetAddressByteSize(LLDBSBDataRef instance) +{ + SBData *unwrapped = reinterpret_cast(instance); + return unwrapped->GetAddressByteSize(); +} + +void +LLDBSBDataSetAddressByteSize(LLDBSBDataRef instance, uint8_t addr_byte_size) +{ + SBData *unwrapped = reinterpret_cast(instance); + unwrapped->SetAddressByteSize(addr_byte_size); +} + +void +LLDBSBDataClear(LLDBSBDataRef instance) +{ + SBData *unwrapped = reinterpret_cast(instance); + unwrapped->Clear(); +} + +bool +LLDBSBDataIsValid(LLDBSBDataRef instance) +{ + SBData *unwrapped = reinterpret_cast(instance); + return unwrapped->IsValid(); +} + +unsigned int +LLDBSBDataGetByteSize(LLDBSBDataRef instance) +{ + SBData *unwrapped = reinterpret_cast(instance); + return unwrapped->GetByteSize(); +} + +enum lldb::ByteOrder +LLDBSBDataGetByteOrder(LLDBSBDataRef instance) +{ + SBData *unwrapped = reinterpret_cast(instance); + return unwrapped->GetByteOrder(); +} + +void +LLDBSBDataSetByteOrder(LLDBSBDataRef instance, lldb::ByteOrder endian) +{ + SBData *unwrapped = reinterpret_cast(instance); + unwrapped->SetByteOrder(endian); +} + +float +LLDBSBDataGetFloat(LLDBSBDataRef instance, LLDBSBErrorRef error, lldb::offset_t offset) +{ + SBData *unwrapped = reinterpret_cast(instance); + return unwrapped->GetFloat(*reinterpret_cast(error), offset); +} + +double +LLDBSBDataGetDouble(LLDBSBDataRef instance, LLDBSBErrorRef error, lldb::offset_t offset) +{ + SBData *unwrapped = reinterpret_cast(instance); + return unwrapped->GetDouble(*reinterpret_cast(error), offset); +} + +long double +LLDBSBDataGetLongDouble(LLDBSBDataRef instance, LLDBSBErrorRef error, lldb::offset_t offset) +{ + SBData *unwrapped = reinterpret_cast(instance); + return unwrapped->GetLongDouble(*reinterpret_cast(error), offset); +} + +unsigned long long +LLDBSBDataGetAddress(LLDBSBDataRef instance, LLDBSBErrorRef error, lldb::offset_t offset) +{ + SBData *unwrapped = reinterpret_cast(instance); + return unwrapped->GetAddress(*reinterpret_cast(error), offset); +} + +unsigned char +LLDBSBDataGetUnsignedInt8(LLDBSBDataRef instance, LLDBSBErrorRef error, lldb::offset_t offset) +{ + SBData *unwrapped = reinterpret_cast(instance); + return unwrapped->GetUnsignedInt8(*reinterpret_cast(error), offset); +} + +unsigned short +LLDBSBDataGetUnsignedInt16(LLDBSBDataRef instance, LLDBSBErrorRef error, lldb::offset_t offset) +{ + SBData *unwrapped = reinterpret_cast(instance); + return unwrapped->GetUnsignedInt16(*reinterpret_cast(error), offset); +} + +unsigned int +LLDBSBDataGetUnsignedInt32(LLDBSBDataRef instance, LLDBSBErrorRef error, lldb::offset_t offset) +{ + SBData *unwrapped = reinterpret_cast(instance); + return unwrapped->GetUnsignedInt32(*reinterpret_cast(error), offset); +} + +unsigned long long +LLDBSBDataGetUnsignedInt64(LLDBSBDataRef instance, LLDBSBErrorRef error, lldb::offset_t offset) +{ + SBData *unwrapped = reinterpret_cast(instance); + return unwrapped->GetUnsignedInt64(*reinterpret_cast(error), offset); +} + +signed char +LLDBSBDataGetSignedInt8(LLDBSBDataRef instance, LLDBSBErrorRef error, lldb::offset_t offset) +{ + SBData *unwrapped = reinterpret_cast(instance); + return unwrapped->GetSignedInt8(*reinterpret_cast(error), offset); +} + +short +LLDBSBDataGetSignedInt16(LLDBSBDataRef instance, LLDBSBErrorRef error, lldb::offset_t offset) +{ + SBData *unwrapped = reinterpret_cast(instance); + return unwrapped->GetSignedInt16(*reinterpret_cast(error), offset); +} + +int +LLDBSBDataGetSignedInt32(LLDBSBDataRef instance, LLDBSBErrorRef error, lldb::offset_t offset) +{ + SBData *unwrapped = reinterpret_cast(instance); + return unwrapped->GetSignedInt32(*reinterpret_cast(error), offset); +} + +long long +LLDBSBDataGetSignedInt64(LLDBSBDataRef instance, LLDBSBErrorRef error, lldb::offset_t offset) +{ + SBData *unwrapped = reinterpret_cast(instance); + return unwrapped->GetSignedInt64(*reinterpret_cast(error), offset); +} + +const char * +LLDBSBDataGetString(LLDBSBDataRef instance, LLDBSBErrorRef error, lldb::offset_t offset) +{ + SBData *unwrapped = reinterpret_cast(instance); + return unwrapped->GetString(*reinterpret_cast(error), offset); +} + +unsigned int +LLDBSBDataReadRawData(LLDBSBDataRef instance, LLDBSBErrorRef error, lldb::offset_t offset, void *buf, size_t size) +{ + SBData *unwrapped = reinterpret_cast(instance); + return unwrapped->ReadRawData(*reinterpret_cast(error), offset, buf, size); +} + +bool +LLDBSBDataGetDescription(LLDBSBDataRef instance, LLDBSBStreamRef description, lldb::addr_t base_addr) +{ + SBData *unwrapped = reinterpret_cast(instance); + return unwrapped->GetDescription(*reinterpret_cast(description), base_addr); +} + +void +LLDBSBDataSetData(LLDBSBDataRef instance, LLDBSBErrorRef error, void *buf, size_t size, lldb::ByteOrder endian, + uint8_t addr_size) +{ + SBData *unwrapped = reinterpret_cast(instance); + unwrapped->SetData(*reinterpret_cast(error), buf, size, endian, addr_size); +} + +bool +LLDBSBDataAppend(LLDBSBDataRef instance, LLDBSBDataRef rhs) +{ + SBData *unwrapped = reinterpret_cast(instance); + return unwrapped->Append(*reinterpret_cast(rhs)); +} + +LLDBSBDataRef +LLDBSBDataCreateDataFromCString(lldb::ByteOrder endian, uint32_t addr_byte_size, const char *data) +{ + return reinterpret_cast( + new SBData(lldb::SBData::CreateDataFromCString(endian, addr_byte_size, data))); +} + +LLDBSBDataRef +LLDBSBDataCreateDataFromUInt64Array(lldb::ByteOrder endian, uint32_t addr_byte_size, uint64_t *array, size_t array_len) +{ + return reinterpret_cast( + new SBData(lldb::SBData::CreateDataFromUInt64Array(endian, addr_byte_size, array, array_len))); +} + +LLDBSBDataRef +LLDBSBDataCreateDataFromUInt32Array(lldb::ByteOrder endian, uint32_t addr_byte_size, uint32_t *array, size_t array_len) +{ + return reinterpret_cast( + new SBData(lldb::SBData::CreateDataFromUInt32Array(endian, addr_byte_size, array, array_len))); +} + +LLDBSBDataRef +LLDBSBDataCreateDataFromSInt64Array(lldb::ByteOrder endian, uint32_t addr_byte_size, int64_t *array, size_t array_len) +{ + return reinterpret_cast( + new SBData(lldb::SBData::CreateDataFromSInt64Array(endian, addr_byte_size, array, array_len))); +} + +LLDBSBDataRef +LLDBSBDataCreateDataFromSInt32Array(lldb::ByteOrder endian, uint32_t addr_byte_size, int32_t *array, size_t array_len) +{ + return reinterpret_cast( + new SBData(lldb::SBData::CreateDataFromSInt32Array(endian, addr_byte_size, array, array_len))); +} + +LLDBSBDataRef +LLDBSBDataCreateDataFromDoubleArray(lldb::ByteOrder endian, uint32_t addr_byte_size, double *array, size_t array_len) +{ + return reinterpret_cast( + new SBData(lldb::SBData::CreateDataFromDoubleArray(endian, addr_byte_size, array, array_len))); +} + +bool +LLDBSBDataSetDataFromCString(LLDBSBDataRef instance, const char *data) +{ + SBData *unwrapped = reinterpret_cast(instance); + return unwrapped->SetDataFromCString(data); +} + +bool +LLDBSBDataSetDataFromUInt64Array(LLDBSBDataRef instance, uint64_t *array, size_t array_len) +{ + SBData *unwrapped = reinterpret_cast(instance); + return unwrapped->SetDataFromUInt64Array(array, array_len); +} + +bool +LLDBSBDataSetDataFromUInt32Array(LLDBSBDataRef instance, uint32_t *array, size_t array_len) +{ + SBData *unwrapped = reinterpret_cast(instance); + return unwrapped->SetDataFromUInt32Array(array, array_len); +} + +bool +LLDBSBDataSetDataFromSInt64Array(LLDBSBDataRef instance, int64_t *array, size_t array_len) +{ + SBData *unwrapped = reinterpret_cast(instance); + return unwrapped->SetDataFromSInt64Array(array, array_len); +} + +bool +LLDBSBDataSetDataFromSInt32Array(LLDBSBDataRef instance, int32_t *array, size_t array_len) +{ + SBData *unwrapped = reinterpret_cast(instance); + return unwrapped->SetDataFromSInt32Array(array, array_len); +} + +bool +LLDBSBDataSetDataFromDoubleArray(LLDBSBDataRef instance, double *array, size_t array_len) +{ + SBData *unwrapped = reinterpret_cast(instance); + return unwrapped->SetDataFromDoubleArray(array, array_len); +} + +#ifdef __cplusplus +} +#endif Index: source/API/Bindings/SBDebuggerBinding.cpp =================================================================== --- source/API/Bindings/SBDebuggerBinding.cpp +++ source/API/Bindings/SBDebuggerBinding.cpp @@ -0,0 +1,678 @@ +//===-- SBDebuggerBinding.cpp -----------------------------------*- C++ -*-===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +#include "lldb/Bindings/LLDBBinding.h" +#include "lldb/API/LLDB.h" +#include "lldb/API/SBTypeCategory.h" +#include "lldb/API/SBTypeSynthetic.h" +#include "lldb/API/SBTypeNameSpecifier.h" +#include "lldb/API/SBTypeFormat.h" +#include "lldb/API/SBTypeFilter.h" +#include "lldb/API/SBTypeSummary.h" + +using namespace lldb; + +#ifdef __cplusplus +extern "C" { +#endif + +LLDBSBInputReaderRef +LLDBCreateSBInputReader() +{ + return reinterpret_cast(new SBInputReader()); +} + +void +LLDBDisposeSBInputReader(LLDBSBInputReaderRef instance) +{ + delete reinterpret_cast(instance); +} + +LLDBSBErrorRef +LLDBSBInputReaderInitialize(LLDBSBInputReaderRef instance, LLDBSBDebuggerRef var0, Callback callback, + void *callback_baton, LLDBInputReaderGranularity var1, const char *var2, const char *var3, + bool var4) +{ + SBInputReader *unwrapped = reinterpret_cast(instance); + return reinterpret_cast(new SBError(unwrapped->Initialize( + *reinterpret_cast(var0), callback, callback_baton, var1, var2, var3, var4))); +} + +void +LLDBSBInputReaderSetIsDone(LLDBSBInputReaderRef instance, bool var0) +{ + SBInputReader *unwrapped = reinterpret_cast(instance); + unwrapped->SetIsDone(var0); +} + +bool +LLDBSBInputReaderIsActive(LLDBSBInputReaderRef instance) +{ + SBInputReader *unwrapped = reinterpret_cast(instance); + return unwrapped->IsActive(); +} + +void +LLDBSBDebuggerInitialize() +{ + lldb::SBDebugger::Initialize(); +} + +void +LLDBSBDebuggerTerminate() +{ + lldb::SBDebugger::Terminate(); +} + +LLDBSBDebuggerRef +LLDBSBDebuggerCreate() +{ + return reinterpret_cast(new SBDebugger(lldb::SBDebugger::Create())); +} + +LLDBSBDebuggerRef +LLDBSBDebuggerCreate2(bool source_init_files) +{ + return reinterpret_cast(new SBDebugger(lldb::SBDebugger::Create(source_init_files))); +} + +LLDBSBDebuggerRef +LLDBSBDebuggerCreate3(bool source_init_files, LogOutputCallback log_callback, void *baton) +{ + return reinterpret_cast( + new SBDebugger(lldb::SBDebugger::Create(source_init_files, log_callback, baton))); +} + +void +LLDBSBDebuggerDestroy(LLDBSBDebuggerRef debugger) +{ + lldb::SBDebugger::Destroy(*reinterpret_cast(debugger)); +} + +void +LLDBSBDebuggerMemoryPressureDetected() +{ + lldb::SBDebugger::MemoryPressureDetected(); +} + +LLDBSBDebuggerRef +LLDBCreateSBDebugger() +{ + return reinterpret_cast(new SBDebugger()); +} + +void +LLDBDisposeSBDebugger(LLDBSBDebuggerRef instance) +{ + delete reinterpret_cast(instance); +} + +bool +LLDBSBDebuggerIsValid(LLDBSBDebuggerRef instance) +{ + SBDebugger *unwrapped = reinterpret_cast(instance); + return unwrapped->IsValid(); +} + +void +LLDBSBDebuggerClear(LLDBSBDebuggerRef instance) +{ + SBDebugger *unwrapped = reinterpret_cast(instance); + unwrapped->Clear(); +} + +void +LLDBSBDebuggerSetAsync(LLDBSBDebuggerRef instance, bool b) +{ + SBDebugger *unwrapped = reinterpret_cast(instance); + unwrapped->SetAsync(b); +} + +bool +LLDBSBDebuggerGetAsync(LLDBSBDebuggerRef instance) +{ + SBDebugger *unwrapped = reinterpret_cast(instance); + return unwrapped->GetAsync(); +} + +void +LLDBSBDebuggerSkipLLDBInitFiles(LLDBSBDebuggerRef instance, bool b) +{ + SBDebugger *unwrapped = reinterpret_cast(instance); + unwrapped->SkipLLDBInitFiles(b); +} + +void +LLDBSBDebuggerSkipAppInitFiles(LLDBSBDebuggerRef instance, bool b) +{ + SBDebugger *unwrapped = reinterpret_cast(instance); + unwrapped->SkipAppInitFiles(b); +} + +void +LLDBSBDebuggerSetInputFileHandle(LLDBSBDebuggerRef instance, FILE *f, bool transfer_ownership) +{ + SBDebugger *unwrapped = reinterpret_cast(instance); + unwrapped->SetInputFileHandle(f, transfer_ownership); +} + +void +LLDBSBDebuggerSetOutputFileHandle(LLDBSBDebuggerRef instance, FILE *f, bool transfer_ownership) +{ + SBDebugger *unwrapped = reinterpret_cast(instance); + unwrapped->SetOutputFileHandle(f, transfer_ownership); +} + +void +LLDBSBDebuggerSetErrorFileHandle(LLDBSBDebuggerRef instance, FILE *f, bool transfer_ownership) +{ + SBDebugger *unwrapped = reinterpret_cast(instance); + unwrapped->SetErrorFileHandle(f, transfer_ownership); +} + +FILE * +LLDBSBDebuggerGetInputFileHandle(LLDBSBDebuggerRef instance) +{ + SBDebugger *unwrapped = reinterpret_cast(instance); + return unwrapped->GetInputFileHandle(); +} + +FILE * +LLDBSBDebuggerGetOutputFileHandle(LLDBSBDebuggerRef instance) +{ + SBDebugger *unwrapped = reinterpret_cast(instance); + return unwrapped->GetOutputFileHandle(); +} + +FILE * +LLDBSBDebuggerGetErrorFileHandle(LLDBSBDebuggerRef instance) +{ + SBDebugger *unwrapped = reinterpret_cast(instance); + return unwrapped->GetErrorFileHandle(); +} + +void +LLDBSBDebuggerSaveInputTerminalState(LLDBSBDebuggerRef instance) +{ + SBDebugger *unwrapped = reinterpret_cast(instance); + unwrapped->SaveInputTerminalState(); +} + +void +LLDBSBDebuggerRestoreInputTerminalState(LLDBSBDebuggerRef instance) +{ + SBDebugger *unwrapped = reinterpret_cast(instance); + unwrapped->RestoreInputTerminalState(); +} + +LLDBSBCommandInterpreterRef +LLDBSBDebuggerGetCommandInterpreter(LLDBSBDebuggerRef instance) +{ + SBDebugger *unwrapped = reinterpret_cast(instance); + return reinterpret_cast(new SBCommandInterpreter(unwrapped->GetCommandInterpreter())); +} + +void +LLDBSBDebuggerHandleCommand(LLDBSBDebuggerRef instance, const char *command) +{ + SBDebugger *unwrapped = reinterpret_cast(instance); + unwrapped->HandleCommand(command); +} + +LLDBSBListenerRef +LLDBSBDebuggerGetListener(LLDBSBDebuggerRef instance) +{ + SBDebugger *unwrapped = reinterpret_cast(instance); + return reinterpret_cast(new SBListener(unwrapped->GetListener())); +} + +void +LLDBSBDebuggerHandleProcessEvent(LLDBSBDebuggerRef instance, LLDBSBProcessRef process, LLDBSBEventRef event, FILE *out, + FILE *err) +{ + SBDebugger *unwrapped = reinterpret_cast(instance); + unwrapped->HandleProcessEvent(*reinterpret_cast(process), *reinterpret_cast(event), out, + err); +} + +LLDBSBTargetRef +LLDBSBDebuggerCreateTarget(LLDBSBDebuggerRef instance, const char *filename, const char *target_triple, + const char *platform_name, bool add_dependent_modules, LLDBSBErrorRef error) +{ + SBDebugger *unwrapped = reinterpret_cast(instance); + return reinterpret_cast(new SBTarget(unwrapped->CreateTarget( + filename, target_triple, platform_name, add_dependent_modules, *reinterpret_cast(error)))); +} + +LLDBSBTargetRef +LLDBSBDebuggerCreateTargetWithFileAndTargetTriple(LLDBSBDebuggerRef instance, const char *filename, + const char *target_triple) +{ + SBDebugger *unwrapped = reinterpret_cast(instance); + return reinterpret_cast( + new SBTarget(unwrapped->CreateTargetWithFileAndTargetTriple(filename, target_triple))); +} + +LLDBSBTargetRef +LLDBSBDebuggerCreateTargetWithFileAndArch(LLDBSBDebuggerRef instance, const char *filename, const char *archname) +{ + SBDebugger *unwrapped = reinterpret_cast(instance); + return reinterpret_cast(new SBTarget(unwrapped->CreateTargetWithFileAndArch(filename, archname))); +} + +LLDBSBTargetRef +LLDBSBDebuggerCreateTarget2(LLDBSBDebuggerRef instance, const char *filename) +{ + SBDebugger *unwrapped = reinterpret_cast(instance); + return reinterpret_cast(new SBTarget(unwrapped->CreateTarget(filename))); +} + +bool +LLDBSBDebuggerDeleteTarget(LLDBSBDebuggerRef instance, LLDBSBTargetRef target) +{ + SBDebugger *unwrapped = reinterpret_cast(instance); + return unwrapped->DeleteTarget(*reinterpret_cast(target)); +} + +LLDBSBTargetRef +LLDBSBDebuggerGetTargetAtIndex(LLDBSBDebuggerRef instance, uint32_t idx) +{ + SBDebugger *unwrapped = reinterpret_cast(instance); + return reinterpret_cast(new SBTarget(unwrapped->GetTargetAtIndex(idx))); +} + +unsigned int +LLDBSBDebuggerGetIndexOfTarget(LLDBSBDebuggerRef instance, LLDBSBTargetRef target) +{ + SBDebugger *unwrapped = reinterpret_cast(instance); + return unwrapped->GetIndexOfTarget(*reinterpret_cast(target)); +} + +LLDBSBTargetRef +LLDBSBDebuggerFindTargetWithProcessID(LLDBSBDebuggerRef instance, lldb::pid_t pid) +{ + SBDebugger *unwrapped = reinterpret_cast(instance); + return reinterpret_cast(new SBTarget(unwrapped->FindTargetWithProcessID(pid))); +} + +LLDBSBTargetRef +LLDBSBDebuggerFindTargetWithFileAndArch(LLDBSBDebuggerRef instance, const char *filename, const char *arch) +{ + SBDebugger *unwrapped = reinterpret_cast(instance); + return reinterpret_cast(new SBTarget(unwrapped->FindTargetWithFileAndArch(filename, arch))); +} + +unsigned int +LLDBSBDebuggerGetNumTargets(LLDBSBDebuggerRef instance) +{ + SBDebugger *unwrapped = reinterpret_cast(instance); + return unwrapped->GetNumTargets(); +} + +LLDBSBTargetRef +LLDBSBDebuggerGetSelectedTarget(LLDBSBDebuggerRef instance) +{ + SBDebugger *unwrapped = reinterpret_cast(instance); + return reinterpret_cast(new SBTarget(unwrapped->GetSelectedTarget())); +} + +void +LLDBSBDebuggerSetSelectedTarget(LLDBSBDebuggerRef instance, LLDBSBTargetRef target) +{ + SBDebugger *unwrapped = reinterpret_cast(instance); + unwrapped->SetSelectedTarget(*reinterpret_cast(target)); +} + +LLDBSBPlatformRef +LLDBSBDebuggerGetSelectedPlatform(LLDBSBDebuggerRef instance) +{ + SBDebugger *unwrapped = reinterpret_cast(instance); + return reinterpret_cast(new SBPlatform(unwrapped->GetSelectedPlatform())); +} + +void +LLDBSBDebuggerSetSelectedPlatform(LLDBSBDebuggerRef instance, LLDBSBPlatformRef platform) +{ + SBDebugger *unwrapped = reinterpret_cast(instance); + unwrapped->SetSelectedPlatform(*reinterpret_cast(platform)); +} + +LLDBSBSourceManagerRef +LLDBSBDebuggerGetSourceManager(LLDBSBDebuggerRef instance) +{ + SBDebugger *unwrapped = reinterpret_cast(instance); + return reinterpret_cast(new SBSourceManager(unwrapped->GetSourceManager())); +} + +LLDBSBErrorRef +LLDBSBDebuggerSetCurrentPlatform(LLDBSBDebuggerRef instance, const char *platform_name) +{ + SBDebugger *unwrapped = reinterpret_cast(instance); + return reinterpret_cast(new SBError(unwrapped->SetCurrentPlatform(platform_name))); +} + +bool +LLDBSBDebuggerSetCurrentPlatformSDKRoot(LLDBSBDebuggerRef instance, const char *sysroot) +{ + SBDebugger *unwrapped = reinterpret_cast(instance); + return unwrapped->SetCurrentPlatformSDKRoot(sysroot); +} + +bool +LLDBSBDebuggerSetUseExternalEditor(LLDBSBDebuggerRef instance, bool input) +{ + SBDebugger *unwrapped = reinterpret_cast(instance); + return unwrapped->SetUseExternalEditor(input); +} + +bool +LLDBSBDebuggerGetUseExternalEditor(LLDBSBDebuggerRef instance) +{ + SBDebugger *unwrapped = reinterpret_cast(instance); + return unwrapped->GetUseExternalEditor(); +} + +bool +LLDBSBDebuggerSetUseColor(LLDBSBDebuggerRef instance, bool use_color) +{ + SBDebugger *unwrapped = reinterpret_cast(instance); + return unwrapped->SetUseColor(use_color); +} + +bool +LLDBSBDebuggerGetUseColor(LLDBSBDebuggerRef instance) +{ + SBDebugger *unwrapped = reinterpret_cast(instance); + return unwrapped->GetUseColor(); +} + +bool +LLDBSBDebuggerGetDefaultArchitecture(char *arch_name, size_t arch_name_len) +{ + return lldb::SBDebugger::GetDefaultArchitecture(arch_name, arch_name_len); +} + +bool +LLDBSBDebuggerSetDefaultArchitecture(const char *arch_name) +{ + return lldb::SBDebugger::SetDefaultArchitecture(arch_name); +} + +enum lldb::ScriptLanguage +LLDBSBDebuggerGetScriptingLanguage(LLDBSBDebuggerRef instance, const char *script_language_name) +{ + SBDebugger *unwrapped = reinterpret_cast(instance); + return unwrapped->GetScriptingLanguage(script_language_name); +} + +const char * +LLDBSBDebuggerGetVersionString() +{ + return lldb::SBDebugger::GetVersionString(); +} + +const char * +LLDBSBDebuggerStateAsCString(lldb::StateType state) +{ + return lldb::SBDebugger::StateAsCString(state); +} + +bool +LLDBSBDebuggerStateIsRunningState(lldb::StateType state) +{ + return lldb::SBDebugger::StateIsRunningState(state); +} + +bool +LLDBSBDebuggerStateIsStoppedState(lldb::StateType state) +{ + return lldb::SBDebugger::StateIsStoppedState(state); +} + +bool +LLDBSBDebuggerEnableLog(LLDBSBDebuggerRef instance, const char *channel, const char **categories) +{ + SBDebugger *unwrapped = reinterpret_cast(instance); + return unwrapped->EnableLog(channel, categories); +} + +void +LLDBSBDebuggerSetLoggingCallback(LLDBSBDebuggerRef instance, lldb::LogOutputCallback log_callback, void *baton) +{ + SBDebugger *unwrapped = reinterpret_cast(instance); + unwrapped->SetLoggingCallback(log_callback, baton); +} + +void +LLDBSBDebuggerDispatchInput(LLDBSBDebuggerRef instance, void *baton, const void *data, size_t data_len) +{ + SBDebugger *unwrapped = reinterpret_cast(instance); + unwrapped->DispatchInput(baton, data, data_len); +} + +void +LLDBSBDebuggerDispatchInput2(LLDBSBDebuggerRef instance, const void *data, size_t data_len) +{ + SBDebugger *unwrapped = reinterpret_cast(instance); + unwrapped->DispatchInput(data, data_len); +} + +void +LLDBSBDebuggerDispatchInputInterrupt(LLDBSBDebuggerRef instance) +{ + SBDebugger *unwrapped = reinterpret_cast(instance); + unwrapped->DispatchInputInterrupt(); +} + +void +LLDBSBDebuggerDispatchInputEndOfFile(LLDBSBDebuggerRef instance) +{ + SBDebugger *unwrapped = reinterpret_cast(instance); + unwrapped->DispatchInputEndOfFile(); +} + +void +LLDBSBDebuggerPushInputReader(LLDBSBDebuggerRef instance, LLDBSBInputReaderRef reader) +{ + SBDebugger *unwrapped = reinterpret_cast(instance); + unwrapped->PushInputReader(*reinterpret_cast(reader)); +} + +const char * +LLDBSBDebuggerGetInstanceName(LLDBSBDebuggerRef instance) +{ + SBDebugger *unwrapped = reinterpret_cast(instance); + return unwrapped->GetInstanceName(); +} + +LLDBSBDebuggerRef +LLDBSBDebuggerFindDebuggerWithID(int id) +{ + return reinterpret_cast(new SBDebugger(lldb::SBDebugger::FindDebuggerWithID(id))); +} + +LLDBSBErrorRef +LLDBSBDebuggerSetInternalVariable(const char *var_name, const char *value, const char *debugger_instance_name) +{ + return reinterpret_cast( + new SBError(lldb::SBDebugger::SetInternalVariable(var_name, value, debugger_instance_name))); +} + +LLDBSBStringListRef +LLDBSBDebuggerGetInternalVariableValue(const char *var_name, const char *debugger_instance_name) +{ + return reinterpret_cast( + new SBStringList(lldb::SBDebugger::GetInternalVariableValue(var_name, debugger_instance_name))); +} + +bool +LLDBSBDebuggerGetDescription(LLDBSBDebuggerRef instance, LLDBSBStreamRef description) +{ + SBDebugger *unwrapped = reinterpret_cast(instance); + return unwrapped->GetDescription(*reinterpret_cast(description)); +} + +unsigned int +LLDBSBDebuggerGetTerminalWidth(LLDBSBDebuggerRef instance) +{ + SBDebugger *unwrapped = reinterpret_cast(instance); + return unwrapped->GetTerminalWidth(); +} + +void +LLDBSBDebuggerSetTerminalWidth(LLDBSBDebuggerRef instance, uint32_t term_width) +{ + SBDebugger *unwrapped = reinterpret_cast(instance); + unwrapped->SetTerminalWidth(term_width); +} + +unsigned long long +LLDBSBDebuggerGetID(LLDBSBDebuggerRef instance) +{ + SBDebugger *unwrapped = reinterpret_cast(instance); + return unwrapped->GetID(); +} + +const char * +LLDBSBDebuggerGetPrompt(LLDBSBDebuggerRef instance) +{ + SBDebugger *unwrapped = reinterpret_cast(instance); + return unwrapped->GetPrompt(); +} + +void +LLDBSBDebuggerSetPrompt(LLDBSBDebuggerRef instance, const char *prompt) +{ + SBDebugger *unwrapped = reinterpret_cast(instance); + unwrapped->SetPrompt(prompt); +} + +enum lldb::ScriptLanguage +LLDBSBDebuggerGetScriptLanguage(LLDBSBDebuggerRef instance) +{ + SBDebugger *unwrapped = reinterpret_cast(instance); + return unwrapped->GetScriptLanguage(); +} + +void +LLDBSBDebuggerSetScriptLanguage(LLDBSBDebuggerRef instance, lldb::ScriptLanguage script_lang) +{ + SBDebugger *unwrapped = reinterpret_cast(instance); + unwrapped->SetScriptLanguage(script_lang); +} + +bool +LLDBSBDebuggerGetCloseInputOnEOF(LLDBSBDebuggerRef instance) +{ + SBDebugger *unwrapped = reinterpret_cast(instance); + return unwrapped->GetCloseInputOnEOF(); +} + +void +LLDBSBDebuggerSetCloseInputOnEOF(LLDBSBDebuggerRef instance, bool b) +{ + SBDebugger *unwrapped = reinterpret_cast(instance); + unwrapped->SetCloseInputOnEOF(b); +} + +LLDBSBTypeCategoryRef +LLDBSBDebuggerGetCategory(LLDBSBDebuggerRef instance, const char *category_name) +{ + SBDebugger *unwrapped = reinterpret_cast(instance); + return reinterpret_cast(new SBTypeCategory(unwrapped->GetCategory(category_name))); +} + +LLDBSBTypeCategoryRef +LLDBSBDebuggerCreateCategory(LLDBSBDebuggerRef instance, const char *category_name) +{ + SBDebugger *unwrapped = reinterpret_cast(instance); + return reinterpret_cast(new SBTypeCategory(unwrapped->CreateCategory(category_name))); +} + +bool +LLDBSBDebuggerDeleteCategory(LLDBSBDebuggerRef instance, const char *category_name) +{ + SBDebugger *unwrapped = reinterpret_cast(instance); + return unwrapped->DeleteCategory(category_name); +} + +unsigned int +LLDBSBDebuggerGetNumCategories(LLDBSBDebuggerRef instance) +{ + SBDebugger *unwrapped = reinterpret_cast(instance); + return unwrapped->GetNumCategories(); +} + +LLDBSBTypeCategoryRef +LLDBSBDebuggerGetCategoryAtIndex(LLDBSBDebuggerRef instance, uint32_t var0) +{ + SBDebugger *unwrapped = reinterpret_cast(instance); + return reinterpret_cast(new SBTypeCategory(unwrapped->GetCategoryAtIndex(var0))); +} + +LLDBSBTypeCategoryRef +LLDBSBDebuggerGetDefaultCategory(LLDBSBDebuggerRef instance) +{ + SBDebugger *unwrapped = reinterpret_cast(instance); + return reinterpret_cast(new SBTypeCategory(unwrapped->GetDefaultCategory())); +} + +LLDBSBTypeFormatRef +LLDBSBDebuggerGetFormatForType(LLDBSBDebuggerRef instance, LLDBSBTypeNameSpecifierRef var0) +{ + SBDebugger *unwrapped = reinterpret_cast(instance); + return reinterpret_cast( + new SBTypeFormat(unwrapped->GetFormatForType(*reinterpret_cast(var0)))); +} + +LLDBSBTypeSummaryRef +LLDBSBDebuggerGetSummaryForType(LLDBSBDebuggerRef instance, LLDBSBTypeNameSpecifierRef var0) +{ + SBDebugger *unwrapped = reinterpret_cast(instance); + return reinterpret_cast( + new SBTypeSummary(unwrapped->GetSummaryForType(*reinterpret_cast(var0)))); +} + +LLDBSBTypeFilterRef +LLDBSBDebuggerGetFilterForType(LLDBSBDebuggerRef instance, LLDBSBTypeNameSpecifierRef var0) +{ + SBDebugger *unwrapped = reinterpret_cast(instance); + return reinterpret_cast( + new SBTypeFilter(unwrapped->GetFilterForType(*reinterpret_cast(var0)))); +} + +LLDBSBTypeSyntheticRef +LLDBSBDebuggerGetSyntheticForType(LLDBSBDebuggerRef instance, LLDBSBTypeNameSpecifierRef var0) +{ + SBDebugger *unwrapped = reinterpret_cast(instance); + return reinterpret_cast( + new SBTypeSynthetic(unwrapped->GetSyntheticForType(*reinterpret_cast(var0)))); +} + +void +LLDBSBDebuggerRunCommandInterpreter(LLDBSBDebuggerRef instance, bool auto_handle_events, bool spawn_thread) +{ + SBDebugger *unwrapped = reinterpret_cast(instance); + unwrapped->RunCommandInterpreter(auto_handle_events, spawn_thread); +} + +void +LLDBSBDebuggerRunCommandInterpreter2(LLDBSBDebuggerRef instance, bool auto_handle_events, bool spawn_thread, + LLDBSBCommandInterpreterRunOptionsRef options, int num_errors, bool quit_requested, + bool stopped_for_crash) +{ + SBDebugger *unwrapped = reinterpret_cast(instance); + unwrapped->RunCommandInterpreter(auto_handle_events, spawn_thread, + *reinterpret_cast(options), num_errors, + quit_requested, stopped_for_crash); +} + +#ifdef __cplusplus +} +#endif Index: source/API/Bindings/SBDeclarationBinding.cpp =================================================================== --- source/API/Bindings/SBDeclarationBinding.cpp +++ source/API/Bindings/SBDeclarationBinding.cpp @@ -0,0 +1,89 @@ +//===-- SBDeclarationBinding.cpp --------------------------------*- C++ -*-===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +#include "lldb/Bindings/LLDBBinding.h" +#include "lldb/API/LLDB.h" + +using namespace lldb; + +#ifdef __cplusplus +extern "C" { +#endif + +LLDBSBDeclarationRef +LLDBCreateSBDeclaration() +{ + return reinterpret_cast(new SBDeclaration()); +} + +void +LLDBDisposeSBDeclaration(LLDBSBDeclarationRef instance) +{ + delete reinterpret_cast(instance); +} + +bool +LLDBSBDeclarationIsValid(LLDBSBDeclarationRef instance) +{ + SBDeclaration *unwrapped = reinterpret_cast(instance); + return unwrapped->IsValid(); +} + +LLDBSBFileSpecRef +LLDBSBDeclarationGetFileSpec(LLDBSBDeclarationRef instance) +{ + SBDeclaration *unwrapped = reinterpret_cast(instance); + return reinterpret_cast(new SBFileSpec(unwrapped->GetFileSpec())); +} + +unsigned int +LLDBSBDeclarationGetLine(LLDBSBDeclarationRef instance) +{ + SBDeclaration *unwrapped = reinterpret_cast(instance); + return unwrapped->GetLine(); +} + +unsigned int +LLDBSBDeclarationGetColumn(LLDBSBDeclarationRef instance) +{ + SBDeclaration *unwrapped = reinterpret_cast(instance); + return unwrapped->GetColumn(); +} + +void +LLDBSBDeclarationSetFileSpec(LLDBSBDeclarationRef instance, LLDBSBFileSpecRef filespec) +{ + SBDeclaration *unwrapped = reinterpret_cast(instance); + unwrapped->SetFileSpec(*reinterpret_cast(filespec)); +} + +void +LLDBSBDeclarationSetLine(LLDBSBDeclarationRef instance, uint32_t line) +{ + SBDeclaration *unwrapped = reinterpret_cast(instance); + unwrapped->SetLine(line); +} + +void +LLDBSBDeclarationSetColumn(LLDBSBDeclarationRef instance, uint32_t column) +{ + SBDeclaration *unwrapped = reinterpret_cast(instance); + unwrapped->SetColumn(column); +} + +bool +LLDBSBDeclarationGetDescription(LLDBSBDeclarationRef instance, LLDBSBStreamRef description) +{ + SBDeclaration *unwrapped = reinterpret_cast(instance); + return unwrapped->GetDescription(*reinterpret_cast(description)); +} + +#ifdef __cplusplus +} +#endif Index: source/API/Bindings/SBErrorBinding.cpp =================================================================== --- source/API/Bindings/SBErrorBinding.cpp +++ source/API/Bindings/SBErrorBinding.cpp @@ -0,0 +1,134 @@ +//===-- SBErrorBinding.cpp --------------------------------------*- C++ -*-===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +#include "lldb/Bindings/LLDBBinding.h" +#include "lldb/API/LLDB.h" +#include "stdarg.h" + +using namespace lldb; + +#ifdef __cplusplus +extern "C" { +#endif + +LLDBSBErrorRef +LLDBCreateSBError() +{ + return reinterpret_cast(new SBError()); +} + +void +LLDBDisposeSBError(LLDBSBErrorRef instance) +{ + delete reinterpret_cast(instance); +} + +const char * +LLDBSBErrorGetCString(LLDBSBErrorRef instance) +{ + SBError *unwrapped = reinterpret_cast(instance); + return unwrapped->GetCString(); +} + +void +LLDBSBErrorClear(LLDBSBErrorRef instance) +{ + SBError *unwrapped = reinterpret_cast(instance); + unwrapped->Clear(); +} + +bool +LLDBSBErrorFail(LLDBSBErrorRef instance) +{ + SBError *unwrapped = reinterpret_cast(instance); + return unwrapped->Fail(); +} + +bool +LLDBSBErrorSuccess(LLDBSBErrorRef instance) +{ + SBError *unwrapped = reinterpret_cast(instance); + return unwrapped->Success(); +} + +unsigned int +LLDBSBErrorGetError(LLDBSBErrorRef instance) +{ + SBError *unwrapped = reinterpret_cast(instance); + return unwrapped->GetError(); +} + +enum lldb::ErrorType +LLDBSBErrorGetType(LLDBSBErrorRef instance) +{ + SBError *unwrapped = reinterpret_cast(instance); + return unwrapped->GetType(); +} + +void +LLDBSBErrorSetError(LLDBSBErrorRef instance, uint32_t err, lldb::ErrorType type) +{ + SBError *unwrapped = reinterpret_cast(instance); + unwrapped->SetError(err, type); +} + +void +LLDBSBErrorSetErrorToErrno(LLDBSBErrorRef instance) +{ + SBError *unwrapped = reinterpret_cast(instance); + unwrapped->SetErrorToErrno(); +} + +void +LLDBSBErrorSetErrorToGenericError(LLDBSBErrorRef instance) +{ + SBError *unwrapped = reinterpret_cast(instance); + unwrapped->SetErrorToGenericError(); +} + +void +LLDBSBErrorSetErrorString(LLDBSBErrorRef instance, const char *err_str) +{ + SBError *unwrapped = reinterpret_cast(instance); + unwrapped->SetErrorString(err_str); +} + +int +LLDBSBErrorSetErrorStringWithFormat(LLDBSBErrorRef instance, const char *format, ...) +{ + if (!format) + return 0; + + int retVal; + SBError *unwrapped = reinterpret_cast(instance); + + va_list args; + va_start(args, format); + retVal = unwrapped->SetErrorStringWithFormat(format, args); + va_end(args); + return retVal; +} + +bool +LLDBSBErrorIsValid(LLDBSBErrorRef instance) +{ + SBError *unwrapped = reinterpret_cast(instance); + return unwrapped->IsValid(); +} + +bool +LLDBSBErrorGetDescription(LLDBSBErrorRef instance, LLDBSBStreamRef description) +{ + SBError *unwrapped = reinterpret_cast(instance); + return unwrapped->GetDescription(*reinterpret_cast(description)); +} + +#ifdef __cplusplus +} +#endif Index: source/API/Bindings/SBEventBinding.cpp =================================================================== --- source/API/Bindings/SBEventBinding.cpp +++ source/API/Bindings/SBEventBinding.cpp @@ -0,0 +1,108 @@ +//===-- SBEventBinding.cpp --------------------------------------*- C++ -*-===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +#include "lldb/Bindings/LLDBBinding.h" +#include "lldb/API/LLDB.h" + +using namespace lldb; + +#ifdef __cplusplus +extern "C" { +#endif + +LLDBSBEventRef +LLDBCreateSBEvent() +{ + return reinterpret_cast(new SBEvent()); +} + +LLDBSBEventRef +LLDBCreateSBEvent2(uint32_t event, const char *cstr, uint32_t cstr_len) +{ + return reinterpret_cast(new SBEvent(event, cstr, cstr_len)); +} + +void +LLDBDisposeSBEvent(LLDBSBEventRef instance) +{ + delete reinterpret_cast(instance); +} + +bool +LLDBSBEventIsValid(LLDBSBEventRef instance) +{ + SBEvent *unwrapped = reinterpret_cast(instance); + return unwrapped->IsValid(); +} + +const char * +LLDBSBEventGetDataFlavor(LLDBSBEventRef instance) +{ + SBEvent *unwrapped = reinterpret_cast(instance); + return unwrapped->GetDataFlavor(); +} + +unsigned int +LLDBSBEventGetType(LLDBSBEventRef instance) +{ + SBEvent *unwrapped = reinterpret_cast(instance); + return unwrapped->GetType(); +} + +LLDBSBBroadcasterRef +LLDBSBEventGetBroadcaster(LLDBSBEventRef instance) +{ + SBEvent *unwrapped = reinterpret_cast(instance); + return reinterpret_cast(new SBBroadcaster(unwrapped->GetBroadcaster())); +} + +const char * +LLDBSBEventGetBroadcasterClass(LLDBSBEventRef instance) +{ + SBEvent *unwrapped = reinterpret_cast(instance); + return unwrapped->GetBroadcasterClass(); +} + +bool +LLDBSBEventBroadcasterMatchesPtr(LLDBSBEventRef instance, LLDBSBBroadcasterRef broadcaster) +{ + SBEvent *unwrapped = reinterpret_cast(instance); + return unwrapped->BroadcasterMatchesPtr(reinterpret_cast(broadcaster)); +} + +bool +LLDBSBEventBroadcasterMatchesRef(LLDBSBEventRef instance, LLDBSBBroadcasterRef broadcaster) +{ + SBEvent *unwrapped = reinterpret_cast(instance); + return unwrapped->BroadcasterMatchesRef(*reinterpret_cast(broadcaster)); +} + +void +LLDBSBEventClear(LLDBSBEventRef instance) +{ + SBEvent *unwrapped = reinterpret_cast(instance); + unwrapped->Clear(); +} + +const char * +LLDBSBEventGetCStringFromEvent(LLDBSBEventRef event) +{ + return lldb::SBEvent::GetCStringFromEvent(*reinterpret_cast(event)); +} + +bool +LLDBSBEventGetDescription(LLDBSBEventRef instance, LLDBSBStreamRef description) +{ + SBEvent *unwrapped = reinterpret_cast(instance); + return unwrapped->GetDescription(*reinterpret_cast(description)); +} + +#ifdef __cplusplus +} +#endif Index: source/API/Bindings/SBExecutionContextBinding.cpp =================================================================== --- source/API/Bindings/SBExecutionContextBinding.cpp +++ source/API/Bindings/SBExecutionContextBinding.cpp @@ -0,0 +1,85 @@ +//===-- SBExecutionContextBinding.cpp ---------------------------*- C++ -*-===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +#include "lldb/Bindings/LLDBBinding.h" +#include "lldb/API/LLDB.h" + +using namespace lldb; + +#ifdef __cplusplus +extern "C" { +#endif + +LLDBSBExecutionContextRef +LLDBCreateSBExecutionContext() +{ + return reinterpret_cast(new SBExecutionContext()); +} + +LLDBSBExecutionContextRef +LLDBCreateSBExecutionContext2(LLDBSBTargetRef target) +{ + return reinterpret_cast(new SBExecutionContext(*reinterpret_cast(target))); +} + +LLDBSBExecutionContextRef +LLDBCreateSBExecutionContext3(LLDBSBProcessRef process) +{ + return reinterpret_cast(new SBExecutionContext(*reinterpret_cast(process))); +} + +LLDBSBExecutionContextRef +LLDBCreateSBExecutionContext4(LLDBSBThreadRef thread) +{ + return reinterpret_cast(new SBExecutionContext(*reinterpret_cast(thread))); +} + +LLDBSBExecutionContextRef +LLDBCreateSBExecutionContext5(LLDBSBFrameRef frame) +{ + return reinterpret_cast(new SBExecutionContext(*reinterpret_cast(frame))); +} + +void +LLDBDisposeSBExecutionContext(LLDBSBExecutionContextRef instance) +{ + delete reinterpret_cast(instance); +} + +LLDBSBTargetRef +LLDBSBExecutionContextGetTarget(LLDBSBExecutionContextRef instance) +{ + SBExecutionContext *unwrapped = reinterpret_cast(instance); + return reinterpret_cast(new SBTarget(unwrapped->GetTarget())); +} + +LLDBSBProcessRef +LLDBSBExecutionContextGetProcess(LLDBSBExecutionContextRef instance) +{ + SBExecutionContext *unwrapped = reinterpret_cast(instance); + return reinterpret_cast(new SBProcess(unwrapped->GetProcess())); +} + +LLDBSBThreadRef +LLDBSBExecutionContextGetThread(LLDBSBExecutionContextRef instance) +{ + SBExecutionContext *unwrapped = reinterpret_cast(instance); + return reinterpret_cast(new SBThread(unwrapped->GetThread())); +} + +LLDBSBFrameRef +LLDBSBExecutionContextGetFrame(LLDBSBExecutionContextRef instance) +{ + SBExecutionContext *unwrapped = reinterpret_cast(instance); + return reinterpret_cast(new SBFrame(unwrapped->GetFrame())); +} + +#ifdef __cplusplus +} +#endif Index: source/API/Bindings/SBExpressionOptionsBinding.cpp =================================================================== --- source/API/Bindings/SBExpressionOptionsBinding.cpp +++ source/API/Bindings/SBExpressionOptionsBinding.cpp @@ -0,0 +1,203 @@ +//===-- SBExpressionOptionsBinding.cpp --------------------------*- C++ -*-===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +#include "lldb/Bindings/LLDBBinding.h" +#include "lldb/API/LLDB.h" +#include "lldb/API/SBExpressionOptions.h" + +using namespace lldb; + +#ifdef __cplusplus +extern "C" { +#endif + +LLDBSBExpressionOptionsRef +LLDBCreateSBExpressionOptions() +{ + return reinterpret_cast(new SBExpressionOptions()); +} + +void +LLDBDisposeSBExpressionOptions(LLDBSBExpressionOptionsRef instance) +{ + delete reinterpret_cast(instance); +} + +bool +LLDBSBExpressionOptionsGetCoerceResultToId(LLDBSBExpressionOptionsRef instance) +{ + SBExpressionOptions *unwrapped = reinterpret_cast(instance); + return unwrapped->GetCoerceResultToId(); +} + +void +LLDBSBExpressionOptionsSetCoerceResultToId(LLDBSBExpressionOptionsRef instance, bool coerce) +{ + SBExpressionOptions *unwrapped = reinterpret_cast(instance); + unwrapped->SetCoerceResultToId(coerce); +} + +bool +LLDBSBExpressionOptionsGetUnwindOnError(LLDBSBExpressionOptionsRef instance) +{ + SBExpressionOptions *unwrapped = reinterpret_cast(instance); + return unwrapped->GetUnwindOnError(); +} + +void +LLDBSBExpressionOptionsSetUnwindOnError(LLDBSBExpressionOptionsRef instance, bool unwind) +{ + SBExpressionOptions *unwrapped = reinterpret_cast(instance); + unwrapped->SetUnwindOnError(unwind); +} + +bool +LLDBSBExpressionOptionsGetIgnoreBreakpoints(LLDBSBExpressionOptionsRef instance) +{ + SBExpressionOptions *unwrapped = reinterpret_cast(instance); + return unwrapped->GetIgnoreBreakpoints(); +} + +void +LLDBSBExpressionOptionsSetIgnoreBreakpoints(LLDBSBExpressionOptionsRef instance, bool ignore) +{ + SBExpressionOptions *unwrapped = reinterpret_cast(instance); + unwrapped->SetIgnoreBreakpoints(ignore); +} + +enum lldb::DynamicValueType +LLDBSBExpressionOptionsGetFetchDynamicValue(LLDBSBExpressionOptionsRef instance) +{ + SBExpressionOptions *unwrapped = reinterpret_cast(instance); + return unwrapped->GetFetchDynamicValue(); +} + +void +LLDBSBExpressionOptionsSetFetchDynamicValue(LLDBSBExpressionOptionsRef instance, lldb::DynamicValueType dynamic) +{ + SBExpressionOptions *unwrapped = reinterpret_cast(instance); + unwrapped->SetFetchDynamicValue(dynamic); +} + +unsigned int +LLDBSBExpressionOptionsGetTimeoutInMicroSeconds(LLDBSBExpressionOptionsRef instance) +{ + SBExpressionOptions *unwrapped = reinterpret_cast(instance); + return unwrapped->GetTimeoutInMicroSeconds(); +} + +void +LLDBSBExpressionOptionsSetTimeoutInMicroSeconds(LLDBSBExpressionOptionsRef instance, uint32_t timeout) +{ + SBExpressionOptions *unwrapped = reinterpret_cast(instance); + unwrapped->SetTimeoutInMicroSeconds(timeout); +} + +unsigned int +LLDBSBExpressionOptionsGetOneThreadTimeoutInMicroSeconds(LLDBSBExpressionOptionsRef instance) +{ + SBExpressionOptions *unwrapped = reinterpret_cast(instance); + return unwrapped->GetOneThreadTimeoutInMicroSeconds(); +} + +void +LLDBSBExpressionOptionsSetOneThreadTimeoutInMicroSeconds(LLDBSBExpressionOptionsRef instance, uint32_t timeout) +{ + SBExpressionOptions *unwrapped = reinterpret_cast(instance); + unwrapped->SetOneThreadTimeoutInMicroSeconds(timeout); +} + +bool +LLDBSBExpressionOptionsGetTryAllThreads(LLDBSBExpressionOptionsRef instance) +{ + SBExpressionOptions *unwrapped = reinterpret_cast(instance); + return unwrapped->GetTryAllThreads(); +} + +void +LLDBSBExpressionOptionsSetTryAllThreads(LLDBSBExpressionOptionsRef instance, bool run_others) +{ + SBExpressionOptions *unwrapped = reinterpret_cast(instance); + unwrapped->SetTryAllThreads(run_others); +} + +bool +LLDBSBExpressionOptionsGetStopOthers(LLDBSBExpressionOptionsRef instance) +{ + SBExpressionOptions *unwrapped = reinterpret_cast(instance); + return unwrapped->GetStopOthers(); +} + +void +LLDBSBExpressionOptionsSetStopOthers(LLDBSBExpressionOptionsRef instance, bool stop_others) +{ + SBExpressionOptions *unwrapped = reinterpret_cast(instance); + unwrapped->SetStopOthers(stop_others); +} + +bool +LLDBSBExpressionOptionsGetTrapExceptions(LLDBSBExpressionOptionsRef instance) +{ + SBExpressionOptions *unwrapped = reinterpret_cast(instance); + return unwrapped->GetTrapExceptions(); +} + +void +LLDBSBExpressionOptionsSetTrapExceptions(LLDBSBExpressionOptionsRef instance, bool trap_exceptions) +{ + SBExpressionOptions *unwrapped = reinterpret_cast(instance); + unwrapped->SetTrapExceptions(trap_exceptions); +} + +void +LLDBSBExpressionOptionsSetLanguage(LLDBSBExpressionOptionsRef instance, lldb::LanguageType language) +{ + SBExpressionOptions *unwrapped = reinterpret_cast(instance); + unwrapped->SetLanguage(language); +} + +void +LLDBSBExpressionOptionsSetCancelCallback(LLDBSBExpressionOptionsRef instance, lldb::ExpressionCancelCallback callback, + void *baton) +{ + SBExpressionOptions *unwrapped = reinterpret_cast(instance); + unwrapped->SetCancelCallback(callback, baton); +} + +bool +LLDBSBExpressionOptionsGetGenerateDebugInfo(LLDBSBExpressionOptionsRef instance) +{ + SBExpressionOptions *unwrapped = reinterpret_cast(instance); + return unwrapped->GetGenerateDebugInfo(); +} + +void +LLDBSBExpressionOptionsSetGenerateDebugInfo(LLDBSBExpressionOptionsRef instance, bool b) +{ + SBExpressionOptions *unwrapped = reinterpret_cast(instance); + unwrapped->SetGenerateDebugInfo(b); +} + +bool +LLDBSBExpressionOptionsGetSuppressPersistentResult(LLDBSBExpressionOptionsRef instance) +{ + SBExpressionOptions *unwrapped = reinterpret_cast(instance); + return unwrapped->GetSuppressPersistentResult(); +} + +void +LLDBSBExpressionOptionsSetSuppressPersistentResult(LLDBSBExpressionOptionsRef instance, bool b) +{ + SBExpressionOptions *unwrapped = reinterpret_cast(instance); + unwrapped->SetSuppressPersistentResult(b); +} + +#ifdef __cplusplus +} +#endif Index: source/API/Bindings/SBFileSpecBinding.cpp =================================================================== --- source/API/Bindings/SBFileSpecBinding.cpp +++ source/API/Bindings/SBFileSpecBinding.cpp @@ -0,0 +1,114 @@ +//===-- SBFileSpecBinding.cpp -----------------------------------*- C++ -*-===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +#include "lldb/Bindings/LLDBBinding.h" +#include "lldb/API/LLDB.h" + +using namespace lldb; + +#ifdef __cplusplus +extern "C" { +#endif + +LLDBSBFileSpecRef +LLDBCreateSBFileSpec() +{ + return reinterpret_cast(new SBFileSpec()); +} + +LLDBSBFileSpecRef +LLDBCreateSBFileSpec2(const char *path) +{ + return reinterpret_cast(new SBFileSpec(path)); +} + +LLDBSBFileSpecRef +LLDBCreateSBFileSpec3(const char *path, bool resolve) +{ + return reinterpret_cast(new SBFileSpec(path, resolve)); +} + +void +LLDBDisposeSBFileSpec(LLDBSBFileSpecRef instance) +{ + delete reinterpret_cast(instance); +} + +bool +LLDBSBFileSpecIsValid(LLDBSBFileSpecRef instance) +{ + SBFileSpec *unwrapped = reinterpret_cast(instance); + return unwrapped->IsValid(); +} + +bool +LLDBSBFileSpecExists(LLDBSBFileSpecRef instance) +{ + SBFileSpec *unwrapped = reinterpret_cast(instance); + return unwrapped->Exists(); +} + +bool +LLDBSBFileSpecResolveExecutableLocation(LLDBSBFileSpecRef instance) +{ + SBFileSpec *unwrapped = reinterpret_cast(instance); + return unwrapped->ResolveExecutableLocation(); +} + +const char * +LLDBSBFileSpecGetFilename(LLDBSBFileSpecRef instance) +{ + SBFileSpec *unwrapped = reinterpret_cast(instance); + return unwrapped->GetFilename(); +} + +const char * +LLDBSBFileSpecGetDirectory(LLDBSBFileSpecRef instance) +{ + SBFileSpec *unwrapped = reinterpret_cast(instance); + return unwrapped->GetDirectory(); +} + +void +LLDBSBFileSpecSetFilename(LLDBSBFileSpecRef instance, const char *filename) +{ + SBFileSpec *unwrapped = reinterpret_cast(instance); + unwrapped->SetFilename(filename); +} + +void +LLDBSBFileSpecSetDirectory(LLDBSBFileSpecRef instance, const char *directory) +{ + SBFileSpec *unwrapped = reinterpret_cast(instance); + unwrapped->SetDirectory(directory); +} + +unsigned int +LLDBSBFileSpecGetPath(LLDBSBFileSpecRef instance, char *dst_path, size_t dst_len) +{ + SBFileSpec *unwrapped = reinterpret_cast(instance); + return unwrapped->GetPath(dst_path, dst_len); +} + +int +LLDBSBFileSpecResolvePath(const char *src_path, char *dst_path, size_t dst_len) +{ + return lldb::SBFileSpec::ResolvePath(src_path, dst_path, dst_len); +} + +bool +LLDBSBFileSpecGetDescription(LLDBSBFileSpecRef instance, LLDBSBStreamRef description) +{ + SBFileSpec *unwrapped = reinterpret_cast(instance); + return unwrapped->GetDescription(*reinterpret_cast(description)); +} + +#ifdef __cplusplus +} +#endif Index: source/API/Bindings/SBFileSpecListBinding.cpp =================================================================== --- source/API/Bindings/SBFileSpecListBinding.cpp +++ source/API/Bindings/SBFileSpecListBinding.cpp @@ -0,0 +1,82 @@ +//===-- SBFileSpecListBinding.cpp -------------------------------*- C++ -*-===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +#include "lldb/Bindings/LLDBBinding.h" +#include "lldb/API/LLDB.h" + +using namespace lldb; + +#ifdef __cplusplus +extern "C" { +#endif + +LLDBSBFileSpecListRef +LLDBCreateSBFileSpecList() +{ + return reinterpret_cast(new SBFileSpecList()); +} + +void +LLDBDisposeSBFileSpecList(LLDBSBFileSpecListRef instance) +{ + delete reinterpret_cast(instance); +} + +unsigned int +LLDBSBFileSpecListGetSize(LLDBSBFileSpecListRef instance) +{ + SBFileSpecList *unwrapped = reinterpret_cast(instance); + return unwrapped->GetSize(); +} + +bool +LLDBSBFileSpecListGetDescription(LLDBSBFileSpecListRef instance, LLDBSBStreamRef description) +{ + SBFileSpecList *unwrapped = reinterpret_cast(instance); + return unwrapped->GetDescription(*reinterpret_cast(description)); +} + +void +LLDBSBFileSpecListAppend(LLDBSBFileSpecListRef instance, LLDBSBFileSpecRef sb_file) +{ + SBFileSpecList *unwrapped = reinterpret_cast(instance); + unwrapped->Append(*reinterpret_cast(sb_file)); +} + +bool +LLDBSBFileSpecListAppendIfUnique(LLDBSBFileSpecListRef instance, LLDBSBFileSpecRef sb_file) +{ + SBFileSpecList *unwrapped = reinterpret_cast(instance); + return unwrapped->AppendIfUnique(*reinterpret_cast(sb_file)); +} + +void +LLDBSBFileSpecListClear(LLDBSBFileSpecListRef instance) +{ + SBFileSpecList *unwrapped = reinterpret_cast(instance); + unwrapped->Clear(); +} + +unsigned int +LLDBSBFileSpecListFindFileIndex(LLDBSBFileSpecListRef instance, uint32_t idx, LLDBSBFileSpecRef sb_file, bool full) +{ + SBFileSpecList *unwrapped = reinterpret_cast(instance); + return unwrapped->FindFileIndex(idx, *reinterpret_cast(sb_file), full); +} + +LLDBSBFileSpecRef +LLDBSBFileSpecListGetFileSpecAtIndex(LLDBSBFileSpecListRef instance, uint32_t idx) +{ + SBFileSpecList *unwrapped = reinterpret_cast(instance); + return reinterpret_cast(new SBFileSpec(unwrapped->GetFileSpecAtIndex(idx))); +} + +#ifdef __cplusplus +} +#endif Index: source/API/Bindings/SBFrameBinding.cpp =================================================================== --- source/API/Bindings/SBFrameBinding.cpp +++ source/API/Bindings/SBFrameBinding.cpp @@ -0,0 +1,302 @@ +//===-- SBFrameBinding.cpp --------------------------------------*- C++ -*-===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +#include "lldb/Bindings/LLDBBinding.h" +#include "lldb/API/LLDB.h" + +using namespace lldb; + +#ifdef __cplusplus +extern "C" { +#endif + +LLDBSBFrameRef +LLDBCreateSBFrame() +{ + return reinterpret_cast(new SBFrame()); +} + +void +LLDBDisposeSBFrame(LLDBSBFrameRef instance) +{ + delete reinterpret_cast(instance); +} + +bool +LLDBSBFrameIsEqual(LLDBSBFrameRef instance, LLDBSBFrameRef that) +{ + SBFrame *unwrapped = reinterpret_cast(instance); + return unwrapped->IsEqual(*reinterpret_cast(that)); +} + +bool +LLDBSBFrameIsValid(LLDBSBFrameRef instance) +{ + SBFrame *unwrapped = reinterpret_cast(instance); + return unwrapped->IsValid(); +} + +unsigned int +LLDBSBFrameGetFrameID(LLDBSBFrameRef instance) +{ + SBFrame *unwrapped = reinterpret_cast(instance); + return unwrapped->GetFrameID(); +} + +unsigned long long +LLDBSBFrameGetPC(LLDBSBFrameRef instance) +{ + SBFrame *unwrapped = reinterpret_cast(instance); + return unwrapped->GetPC(); +} + +bool +LLDBSBFrameSetPC(LLDBSBFrameRef instance, lldb::addr_t new_pc) +{ + SBFrame *unwrapped = reinterpret_cast(instance); + return unwrapped->SetPC(new_pc); +} + +unsigned long long +LLDBSBFrameGetSP(LLDBSBFrameRef instance) +{ + SBFrame *unwrapped = reinterpret_cast(instance); + return unwrapped->GetSP(); +} + +unsigned long long +LLDBSBFrameGetFP(LLDBSBFrameRef instance) +{ + SBFrame *unwrapped = reinterpret_cast(instance); + return unwrapped->GetFP(); +} + +LLDBSBAddressRef +LLDBSBFrameGetPCAddress(LLDBSBFrameRef instance) +{ + SBFrame *unwrapped = reinterpret_cast(instance); + return reinterpret_cast(new SBAddress(unwrapped->GetPCAddress())); +} + +LLDBSBSymbolContextRef +LLDBSBFrameGetSymbolContext(LLDBSBFrameRef instance, uint32_t resolve_scope) +{ + SBFrame *unwrapped = reinterpret_cast(instance); + return reinterpret_cast(new SBSymbolContext(unwrapped->GetSymbolContext(resolve_scope))); +} + +LLDBSBModuleRef +LLDBSBFrameGetModule(LLDBSBFrameRef instance) +{ + SBFrame *unwrapped = reinterpret_cast(instance); + return reinterpret_cast(new SBModule(unwrapped->GetModule())); +} + +LLDBSBCompileUnitRef +LLDBSBFrameGetCompileUnit(LLDBSBFrameRef instance) +{ + SBFrame *unwrapped = reinterpret_cast(instance); + return reinterpret_cast(new SBCompileUnit(unwrapped->GetCompileUnit())); +} + +LLDBSBFunctionRef +LLDBSBFrameGetFunction(LLDBSBFrameRef instance) +{ + SBFrame *unwrapped = reinterpret_cast(instance); + return reinterpret_cast(new SBFunction(unwrapped->GetFunction())); +} + +LLDBSBSymbolRef +LLDBSBFrameGetSymbol(LLDBSBFrameRef instance) +{ + SBFrame *unwrapped = reinterpret_cast(instance); + return reinterpret_cast(new SBSymbol(unwrapped->GetSymbol())); +} + +LLDBSBBlockRef +LLDBSBFrameGetBlock(LLDBSBFrameRef instance) +{ + SBFrame *unwrapped = reinterpret_cast(instance); + return reinterpret_cast(new SBBlock(unwrapped->GetBlock())); +} + +const char * +LLDBSBFrameGetFunctionName(LLDBSBFrameRef instance) +{ + SBFrame *unwrapped = reinterpret_cast(instance); + return unwrapped->GetFunctionName(); +} + +bool +LLDBSBFrameIsInlined(LLDBSBFrameRef instance) +{ + SBFrame *unwrapped = reinterpret_cast(instance); + return unwrapped->IsInlined(); +} + +LLDBSBValueRef +LLDBSBFrameEvaluateExpression(LLDBSBFrameRef instance, const char *expr) +{ + SBFrame *unwrapped = reinterpret_cast(instance); + return reinterpret_cast(new SBValue(unwrapped->EvaluateExpression(expr))); +} + +LLDBSBValueRef +LLDBSBFrameEvaluateExpression2(LLDBSBFrameRef instance, const char *expr, lldb::DynamicValueType use_dynamic) +{ + SBFrame *unwrapped = reinterpret_cast(instance); + return reinterpret_cast(new SBValue(unwrapped->EvaluateExpression(expr, use_dynamic))); +} + +LLDBSBValueRef +LLDBSBFrameEvaluateExpression3(LLDBSBFrameRef instance, const char *expr, lldb::DynamicValueType use_dynamic, + bool unwind_on_error) +{ + SBFrame *unwrapped = reinterpret_cast(instance); + return reinterpret_cast( + new SBValue(unwrapped->EvaluateExpression(expr, use_dynamic, unwind_on_error))); +} + +LLDBSBValueRef +LLDBSBFrameEvaluateExpression4(LLDBSBFrameRef instance, const char *expr, LLDBSBExpressionOptionsRef options) +{ + SBFrame *unwrapped = reinterpret_cast(instance); + return reinterpret_cast( + new SBValue(unwrapped->EvaluateExpression(expr, *reinterpret_cast(options)))); +} + +LLDBSBBlockRef +LLDBSBFrameGetFrameBlock(LLDBSBFrameRef instance) +{ + SBFrame *unwrapped = reinterpret_cast(instance); + return reinterpret_cast(new SBBlock(unwrapped->GetFrameBlock())); +} + +LLDBSBLineEntryRef +LLDBSBFrameGetLineEntry(LLDBSBFrameRef instance) +{ + SBFrame *unwrapped = reinterpret_cast(instance); + return reinterpret_cast(new SBLineEntry(unwrapped->GetLineEntry())); +} + +LLDBSBThreadRef +LLDBSBFrameGetThread(LLDBSBFrameRef instance) +{ + SBFrame *unwrapped = reinterpret_cast(instance); + return reinterpret_cast(new SBThread(unwrapped->GetThread())); +} + +const char * +LLDBSBFrameDisassemble(LLDBSBFrameRef instance) +{ + SBFrame *unwrapped = reinterpret_cast(instance); + return unwrapped->Disassemble(); +} + +void +LLDBSBFrameClear(LLDBSBFrameRef instance) +{ + SBFrame *unwrapped = reinterpret_cast(instance); + unwrapped->Clear(); +} + +LLDBSBValueListRef +LLDBSBFrameGetVariables(LLDBSBFrameRef instance, bool arguments, bool locals, bool statics, bool in_scope_only) +{ + SBFrame *unwrapped = reinterpret_cast(instance); + return reinterpret_cast( + new SBValueList(unwrapped->GetVariables(arguments, locals, statics, in_scope_only))); +} + +LLDBSBValueListRef +LLDBSBFrameGetVariables2(LLDBSBFrameRef instance, bool arguments, bool locals, bool statics, bool in_scope_only, + lldb::DynamicValueType use_dynamic) +{ + SBFrame *unwrapped = reinterpret_cast(instance); + return reinterpret_cast( + new SBValueList(unwrapped->GetVariables(arguments, locals, statics, in_scope_only, use_dynamic))); +} + +LLDBSBValueListRef +LLDBSBFrameGetVariables3(LLDBSBFrameRef instance, LLDBSBVariablesOptionsRef options) +{ + SBFrame *unwrapped = reinterpret_cast(instance); + return reinterpret_cast( + new SBValueList(unwrapped->GetVariables(*reinterpret_cast(options)))); +} + +LLDBSBValueListRef +LLDBSBFrameGetRegisters(LLDBSBFrameRef instance) +{ + SBFrame *unwrapped = reinterpret_cast(instance); + return reinterpret_cast(new SBValueList(unwrapped->GetRegisters())); +} + +LLDBSBValueRef +LLDBSBFrameFindRegister(LLDBSBFrameRef instance, const char *name) +{ + SBFrame *unwrapped = reinterpret_cast(instance); + return reinterpret_cast(new SBValue(unwrapped->FindRegister(name))); +} + +LLDBSBValueRef +LLDBSBFrameFindVariable(LLDBSBFrameRef instance, const char *var_name) +{ + SBFrame *unwrapped = reinterpret_cast(instance); + return reinterpret_cast(new SBValue(unwrapped->FindVariable(var_name))); +} + +LLDBSBValueRef +LLDBSBFrameFindVariable2(LLDBSBFrameRef instance, const char *var_name, lldb::DynamicValueType use_dynamic) +{ + SBFrame *unwrapped = reinterpret_cast(instance); + return reinterpret_cast(new SBValue(unwrapped->FindVariable(var_name, use_dynamic))); +} + +LLDBSBValueRef +LLDBSBFrameGetValueForVariablePath(LLDBSBFrameRef instance, const char *var_expr_cstr, + enum lldb::DynamicValueType use_dynamic) +{ + SBFrame *unwrapped = reinterpret_cast(instance); + return reinterpret_cast( + new SBValue(unwrapped->GetValueForVariablePath(var_expr_cstr, use_dynamic))); +} + +LLDBSBValueRef +LLDBSBFrameGetValueForVariablePath2(LLDBSBFrameRef instance, const char *var_path) +{ + SBFrame *unwrapped = reinterpret_cast(instance); + return reinterpret_cast(new SBValue(unwrapped->GetValueForVariablePath(var_path))); +} + +LLDBSBValueRef +LLDBSBFrameFindValue(LLDBSBFrameRef instance, const char *name, enum lldb::ValueType value_type) +{ + SBFrame *unwrapped = reinterpret_cast(instance); + return reinterpret_cast(new SBValue(unwrapped->FindValue(name, value_type))); +} + +LLDBSBValueRef +LLDBSBFrameFindValue2(LLDBSBFrameRef instance, const char *name, enum lldb::ValueType value_type, + lldb::DynamicValueType use_dynamic) +{ + SBFrame *unwrapped = reinterpret_cast(instance); + return reinterpret_cast(new SBValue(unwrapped->FindValue(name, value_type, use_dynamic))); +} + +bool +LLDBSBFrameGetDescription(LLDBSBFrameRef instance, LLDBSBStreamRef description) +{ + SBFrame *unwrapped = reinterpret_cast(instance); + return unwrapped->GetDescription(*reinterpret_cast(description)); +} + +#ifdef __cplusplus +} +#endif Index: source/API/Bindings/SBFunctionBinding.cpp =================================================================== --- source/API/Bindings/SBFunctionBinding.cpp +++ source/API/Bindings/SBFunctionBinding.cpp @@ -0,0 +1,119 @@ +//===-- SBFunctionBinding.cpp -----------------------------------*- C++ -*-===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +#include "lldb/Bindings/LLDBBinding.h" +#include "lldb/API/LLDB.h" + +using namespace lldb; + +#ifdef __cplusplus +extern "C" { +#endif + +LLDBSBFunctionRef +LLDBCreateSBFunction() +{ + return reinterpret_cast(new SBFunction()); +} + +void +LLDBDisposeSBFunction(LLDBSBFunctionRef instance) +{ + delete reinterpret_cast(instance); +} + +bool +LLDBSBFunctionIsValid(LLDBSBFunctionRef instance) +{ + SBFunction *unwrapped = reinterpret_cast(instance); + return unwrapped->IsValid(); +} + +const char * +LLDBSBFunctionGetName(LLDBSBFunctionRef instance) +{ + SBFunction *unwrapped = reinterpret_cast(instance); + return unwrapped->GetName(); +} + +const char * +LLDBSBFunctionGetMangledName(LLDBSBFunctionRef instance) +{ + SBFunction *unwrapped = reinterpret_cast(instance); + return unwrapped->GetMangledName(); +} + +LLDBSBInstructionListRef +LLDBSBFunctionGetInstructions(LLDBSBFunctionRef instance, LLDBSBTargetRef target) +{ + SBFunction *unwrapped = reinterpret_cast(instance); + return reinterpret_cast( + new SBInstructionList(unwrapped->GetInstructions(*reinterpret_cast(target)))); +} + +LLDBSBInstructionListRef +LLDBSBFunctionGetInstructions2(LLDBSBFunctionRef instance, LLDBSBTargetRef target, const char *flavor) +{ + SBFunction *unwrapped = reinterpret_cast(instance); + return reinterpret_cast( + new SBInstructionList(unwrapped->GetInstructions(*reinterpret_cast(target), flavor))); +} + +LLDBSBAddressRef +LLDBSBFunctionGetStartAddress(LLDBSBFunctionRef instance) +{ + SBFunction *unwrapped = reinterpret_cast(instance); + return reinterpret_cast(new SBAddress(unwrapped->GetStartAddress())); +} + +LLDBSBAddressRef +LLDBSBFunctionGetEndAddress(LLDBSBFunctionRef instance) +{ + SBFunction *unwrapped = reinterpret_cast(instance); + return reinterpret_cast(new SBAddress(unwrapped->GetEndAddress())); +} + +unsigned int +LLDBSBFunctionGetPrologueByteSize(LLDBSBFunctionRef instance) +{ + SBFunction *unwrapped = reinterpret_cast(instance); + return unwrapped->GetPrologueByteSize(); +} + +LLDBSBTypeRef +LLDBSBFunctionGetType(LLDBSBFunctionRef instance) +{ + SBFunction *unwrapped = reinterpret_cast(instance); + return reinterpret_cast(new SBType(unwrapped->GetType())); +} + +LLDBSBBlockRef +LLDBSBFunctionGetBlock(LLDBSBFunctionRef instance) +{ + SBFunction *unwrapped = reinterpret_cast(instance); + return reinterpret_cast(new SBBlock(unwrapped->GetBlock())); +} + +LLDBLanguageType +LLDBSBFunctionGetLanguage(LLDBSBFunctionRef instance) +{ + SBFunction *unwrapped = reinterpret_cast(instance); + return unwrapped->GetLanguage(); +} + +bool +LLDBSBFunctionGetDescription(LLDBSBFunctionRef instance, LLDBSBStreamRef description) +{ + SBFunction *unwrapped = reinterpret_cast(instance); + return unwrapped->GetDescription(*reinterpret_cast(description)); +} + +#ifdef __cplusplus +} +#endif Index: source/API/Bindings/SBHostOSBinding.cpp =================================================================== --- source/API/Bindings/SBHostOSBinding.cpp +++ source/API/Bindings/SBHostOSBinding.cpp @@ -0,0 +1,69 @@ +//===-- SBHostOSBinding.cpp -------------------------------------*- C++ -*-===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +#include "lldb/Bindings/LLDBBinding.h" +#include "lldb/API/LLDB.h" + +using namespace lldb; + +#ifdef __cplusplus +extern "C" { +#endif + +LLDBSBFileSpecRef +LLDBSBHostOSGetProgramFileSpec() +{ + return reinterpret_cast(new SBFileSpec(lldb::SBHostOS::GetProgramFileSpec())); +} + +LLDBSBFileSpecRef +LLDBSBHostOSGetLLDBPythonPath() +{ + return reinterpret_cast(new SBFileSpec(lldb::SBHostOS::GetLLDBPythonPath())); +} + +LLDBSBFileSpecRef +LLDBSBHostOSGetLLDBPath(LLDBPathType path_type) +{ + return reinterpret_cast(new SBFileSpec(lldb::SBHostOS::GetLLDBPath(path_type))); +} + +void +LLDBSBHostOSThreadCreated(const char *name) +{ + lldb::SBHostOS::ThreadCreated(name); +} + +lldb::thread_t +LLDBSBHostOSThreadCreate(const char *name, lldb::thread_func_t thread_function, void *thread_arg, LLDBSBErrorRef err) +{ + return lldb::SBHostOS::ThreadCreate(name, thread_function, thread_arg, reinterpret_cast(err)); +} + +bool +LLDBSBHostOSThreadCancel(lldb::thread_t thread, LLDBSBErrorRef err) +{ + return lldb::SBHostOS::ThreadCancel(thread, reinterpret_cast(err)); +} + +bool +LLDBSBHostOSThreadDetach(lldb::thread_t thread, LLDBSBErrorRef err) +{ + return lldb::SBHostOS::ThreadDetach(thread, reinterpret_cast(err)); +} + +bool +LLDBSBHostOSThreadJoin(lldb::thread_t thread, lldb::thread_result_t *result, LLDBSBErrorRef err) +{ + return lldb::SBHostOS::ThreadJoin(thread, result, reinterpret_cast(err)); +} + +#ifdef __cplusplus +} +#endif Index: source/API/Bindings/SBInstructionBinding.cpp =================================================================== --- source/API/Bindings/SBInstructionBinding.cpp +++ source/API/Bindings/SBInstructionBinding.cpp @@ -0,0 +1,131 @@ +//===-- SBInstructionBinding.cpp --------------------------------*- C++ -*-===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +#include "lldb/Bindings/LLDBBinding.h" +#include "lldb/API/LLDB.h" + +using namespace lldb; + +#ifdef __cplusplus +extern "C" { +#endif + +LLDBSBInstructionRef +LLDBCreateSBInstruction() +{ + return reinterpret_cast(new SBInstruction()); +} + +void +LLDBDisposeSBInstruction(LLDBSBInstructionRef instance) +{ + delete reinterpret_cast(instance); +} + +bool +LLDBSBInstructionIsValid(LLDBSBInstructionRef instance) +{ + SBInstruction *unwrapped = reinterpret_cast(instance); + return unwrapped->IsValid(); +} + +LLDBSBAddressRef +LLDBSBInstructionGetAddress(LLDBSBInstructionRef instance) +{ + SBInstruction *unwrapped = reinterpret_cast(instance); + return reinterpret_cast(new SBAddress(unwrapped->GetAddress())); +} + +LLDBAddressClass +LLDBSBInstructionGetAddressClass(LLDBSBInstructionRef instance) +{ + SBInstruction *unwrapped = reinterpret_cast(instance); + return unwrapped->GetAddressClass(); +} + +const char * +LLDBSBInstructionGetMnemonic(LLDBSBInstructionRef instance, LLDBSBTargetRef target) +{ + SBInstruction *unwrapped = reinterpret_cast(instance); + return unwrapped->GetMnemonic(*reinterpret_cast(target)); +} + +const char * +LLDBSBInstructionGetOperands(LLDBSBInstructionRef instance, LLDBSBTargetRef target) +{ + SBInstruction *unwrapped = reinterpret_cast(instance); + return unwrapped->GetOperands(*reinterpret_cast(target)); +} + +const char * +LLDBSBInstructionGetComment(LLDBSBInstructionRef instance, LLDBSBTargetRef target) +{ + SBInstruction *unwrapped = reinterpret_cast(instance); + return unwrapped->GetComment(*reinterpret_cast(target)); +} + +LLDBSBDataRef +LLDBSBInstructionGetData(LLDBSBInstructionRef instance, LLDBSBTargetRef target) +{ + SBInstruction *unwrapped = reinterpret_cast(instance); + return reinterpret_cast(new SBData(unwrapped->GetData(*reinterpret_cast(target)))); +} + +unsigned int +LLDBSBInstructionGetByteSize(LLDBSBInstructionRef instance) +{ + SBInstruction *unwrapped = reinterpret_cast(instance); + return unwrapped->GetByteSize(); +} + +bool +LLDBSBInstructionDoesBranch(LLDBSBInstructionRef instance) +{ + SBInstruction *unwrapped = reinterpret_cast(instance); + return unwrapped->DoesBranch(); +} + +void +LLDBSBInstructionPrint(LLDBSBInstructionRef instance, FILE *out) +{ + SBInstruction *unwrapped = reinterpret_cast(instance); + unwrapped->Print(reinterpret_cast(out)); +} + +bool +LLDBSBInstructionGetDescription(LLDBSBInstructionRef instance, LLDBSBStreamRef description) +{ + SBInstruction *unwrapped = reinterpret_cast(instance); + return unwrapped->GetDescription(*reinterpret_cast(description)); +} + +bool +LLDBSBInstructionEmulateWithFrame(LLDBSBInstructionRef instance, LLDBSBFrameRef frame, uint32_t evaluate_options) +{ + SBInstruction *unwrapped = reinterpret_cast(instance); + return unwrapped->EmulateWithFrame(*reinterpret_cast(frame), evaluate_options); +} + +bool +LLDBSBInstructionDumpEmulation(LLDBSBInstructionRef instance, const char *triple) +{ + SBInstruction *unwrapped = reinterpret_cast(instance); + return unwrapped->DumpEmulation(triple); +} + +bool +LLDBSBInstructionTestEmulation(LLDBSBInstructionRef instance, LLDBSBStreamRef output_stream, const char *test_file) +{ + SBInstruction *unwrapped = reinterpret_cast(instance); + return unwrapped->TestEmulation(*reinterpret_cast(output_stream), test_file); +} + +#ifdef __cplusplus +} +#endif Index: source/API/Bindings/SBInstructionListBinding.cpp =================================================================== --- source/API/Bindings/SBInstructionListBinding.cpp +++ source/API/Bindings/SBInstructionListBinding.cpp @@ -0,0 +1,89 @@ +//===-- SBInstructionListBinding.cpp ----------------------------*- C++ -*-===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +#include "lldb/Bindings/LLDBBinding.h" +#include "lldb/API/LLDB.h" + +using namespace lldb; + +#ifdef __cplusplus +extern "C" { +#endif + +LLDBSBInstructionListRef +LLDBCreateSBInstructionList() +{ + return reinterpret_cast(new SBInstructionList()); +} + +void +LLDBDisposeSBInstructionList(LLDBSBInstructionListRef instance) +{ + delete reinterpret_cast(instance); +} + +bool +LLDBSBInstructionListIsValid(LLDBSBInstructionListRef instance) +{ + SBInstructionList *unwrapped = reinterpret_cast(instance); + return unwrapped->IsValid(); +} + +unsigned int +LLDBSBInstructionListGetSize(LLDBSBInstructionListRef instance) +{ + SBInstructionList *unwrapped = reinterpret_cast(instance); + return unwrapped->GetSize(); +} + +LLDBSBInstructionRef +LLDBSBInstructionListGetInstructionAtIndex(LLDBSBInstructionListRef instance, uint32_t idx) +{ + SBInstructionList *unwrapped = reinterpret_cast(instance); + return reinterpret_cast(new SBInstruction(unwrapped->GetInstructionAtIndex(idx))); +} + +void +LLDBSBInstructionListClear(LLDBSBInstructionListRef instance) +{ + SBInstructionList *unwrapped = reinterpret_cast(instance); + unwrapped->Clear(); +} + +void +LLDBSBInstructionListAppendInstruction(LLDBSBInstructionListRef instance, LLDBSBInstructionRef inst) +{ + SBInstructionList *unwrapped = reinterpret_cast(instance); + unwrapped->AppendInstruction(*reinterpret_cast(inst)); +} + +void +LLDBSBInstructionListPrint(LLDBSBInstructionListRef instance, FILE *out) +{ + SBInstructionList *unwrapped = reinterpret_cast(instance); + unwrapped->Print(out); +} + +bool +LLDBSBInstructionListGetDescription(LLDBSBInstructionListRef instance, LLDBSBStreamRef description) +{ + SBInstructionList *unwrapped = reinterpret_cast(instance); + return unwrapped->GetDescription(*reinterpret_cast(description)); +} + +bool +LLDBSBInstructionListDumpEmulationForAllInstructions(LLDBSBInstructionListRef instance, const char *triple) +{ + SBInstructionList *unwrapped = reinterpret_cast(instance); + return unwrapped->DumpEmulationForAllInstructions(triple); +} + +#ifdef __cplusplus +} +#endif Index: source/API/Bindings/SBLaunchInfoBinding.cpp =================================================================== --- source/API/Bindings/SBLaunchInfoBinding.cpp +++ source/API/Bindings/SBLaunchInfoBinding.cpp @@ -0,0 +1,299 @@ +//===-- SBLaunchInfoBinding.cpp ---------------------------------*- C++ -*-===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +#include "lldb/Bindings/LLDBBinding.h" +#include "lldb/API/LLDB.h" + +using namespace lldb; + +#ifdef __cplusplus +extern "C" { +#endif + +LLDBSBLaunchInfoRef +LLDBCreateSBLaunchInfo(const char **argv) +{ + return reinterpret_cast(new SBLaunchInfo(argv)); +} + +void +LLDBDisposeSBLaunchInfo(LLDBSBLaunchInfoRef instance) +{ + delete reinterpret_cast(instance); +} + +unsigned long long +LLDBSBLaunchInfoGetProcessID(LLDBSBLaunchInfoRef instance) +{ + SBLaunchInfo *unwrapped = reinterpret_cast(instance); + return unwrapped->GetProcessID(); +} + +unsigned int +LLDBSBLaunchInfoGetUserID(LLDBSBLaunchInfoRef instance) +{ + SBLaunchInfo *unwrapped = reinterpret_cast(instance); + return unwrapped->GetUserID(); +} + +unsigned int +LLDBSBLaunchInfoGetGroupID(LLDBSBLaunchInfoRef instance) +{ + SBLaunchInfo *unwrapped = reinterpret_cast(instance); + return unwrapped->GetGroupID(); +} + +bool +LLDBSBLaunchInfoUserIDIsValid(LLDBSBLaunchInfoRef instance) +{ + SBLaunchInfo *unwrapped = reinterpret_cast(instance); + return unwrapped->UserIDIsValid(); +} + +bool +LLDBSBLaunchInfoGroupIDIsValid(LLDBSBLaunchInfoRef instance) +{ + SBLaunchInfo *unwrapped = reinterpret_cast(instance); + return unwrapped->GroupIDIsValid(); +} + +void +LLDBSBLaunchInfoSetUserID(LLDBSBLaunchInfoRef instance, uint32_t uid) +{ + SBLaunchInfo *unwrapped = reinterpret_cast(instance); + unwrapped->SetUserID(uid); +} + +void +LLDBSBLaunchInfoSetGroupID(LLDBSBLaunchInfoRef instance, uint32_t gid) +{ + SBLaunchInfo *unwrapped = reinterpret_cast(instance); + unwrapped->SetGroupID(gid); +} + +LLDBSBFileSpecRef +LLDBSBLaunchInfoGetExecutableFile(LLDBSBLaunchInfoRef instance) +{ + SBLaunchInfo *unwrapped = reinterpret_cast(instance); + return reinterpret_cast(new SBFileSpec(unwrapped->GetExecutableFile())); +} + +void +LLDBSBLaunchInfoSetExecutableFile(LLDBSBLaunchInfoRef instance, LLDBSBFileSpecRef exe_file, bool add_as_first_arg) +{ + SBLaunchInfo *unwrapped = reinterpret_cast(instance); + unwrapped->SetExecutableFile(*reinterpret_cast(exe_file), add_as_first_arg); +} + +LLDBSBListenerRef +LLDBSBLaunchInfoGetListener(LLDBSBLaunchInfoRef instance) +{ + SBLaunchInfo *unwrapped = reinterpret_cast(instance); + return reinterpret_cast(new SBListener(unwrapped->GetListener())); +} + +void +LLDBSBLaunchInfoSetListener(LLDBSBLaunchInfoRef instance, LLDBSBListenerRef listener) +{ + SBLaunchInfo *unwrapped = reinterpret_cast(instance); + unwrapped->SetListener(*reinterpret_cast(listener)); +} + +unsigned int +LLDBSBLaunchInfoGetNumArguments(LLDBSBLaunchInfoRef instance) +{ + SBLaunchInfo *unwrapped = reinterpret_cast(instance); + return unwrapped->GetNumArguments(); +} + +const char * +LLDBSBLaunchInfoGetArgumentAtIndex(LLDBSBLaunchInfoRef instance, uint32_t idx) +{ + SBLaunchInfo *unwrapped = reinterpret_cast(instance); + return unwrapped->GetArgumentAtIndex(idx); +} + +void +LLDBSBLaunchInfoSetArguments(LLDBSBLaunchInfoRef instance, const char **argv, bool append) +{ + SBLaunchInfo *unwrapped = reinterpret_cast(instance); + unwrapped->SetArguments(argv, append); +} + +unsigned int +LLDBSBLaunchInfoGetNumEnvironmentEntries(LLDBSBLaunchInfoRef instance) +{ + SBLaunchInfo *unwrapped = reinterpret_cast(instance); + return unwrapped->GetNumEnvironmentEntries(); +} + +const char * +LLDBSBLaunchInfoGetEnvironmentEntryAtIndex(LLDBSBLaunchInfoRef instance, uint32_t idx) +{ + SBLaunchInfo *unwrapped = reinterpret_cast(instance); + return unwrapped->GetEnvironmentEntryAtIndex(idx); +} + +void +LLDBSBLaunchInfoSetEnvironmentEntries(LLDBSBLaunchInfoRef instance, const char **envp, bool append) +{ + SBLaunchInfo *unwrapped = reinterpret_cast(instance); + unwrapped->SetEnvironmentEntries(envp, append); +} + +void +LLDBSBLaunchInfoClear(LLDBSBLaunchInfoRef instance) +{ + SBLaunchInfo *unwrapped = reinterpret_cast(instance); + unwrapped->Clear(); +} + +const char * +LLDBSBLaunchInfoGetWorkingDirectory(LLDBSBLaunchInfoRef instance) +{ + SBLaunchInfo *unwrapped = reinterpret_cast(instance); + return unwrapped->GetWorkingDirectory(); +} + +void +LLDBSBLaunchInfoSetWorkingDirectory(LLDBSBLaunchInfoRef instance, const char *working_dir) +{ + SBLaunchInfo *unwrapped = reinterpret_cast(instance); + unwrapped->SetWorkingDirectory(working_dir); +} + +unsigned int +LLDBSBLaunchInfoGetLaunchFlags(LLDBSBLaunchInfoRef instance) +{ + SBLaunchInfo *unwrapped = reinterpret_cast(instance); + return unwrapped->GetLaunchFlags(); +} + +void +LLDBSBLaunchInfoSetLaunchFlags(LLDBSBLaunchInfoRef instance, uint32_t flags) +{ + SBLaunchInfo *unwrapped = reinterpret_cast(instance); + unwrapped->SetLaunchFlags(flags); +} + +const char * +LLDBSBLaunchInfoGetProcessPluginName(LLDBSBLaunchInfoRef instance) +{ + SBLaunchInfo *unwrapped = reinterpret_cast(instance); + return unwrapped->GetProcessPluginName(); +} + +void +LLDBSBLaunchInfoSetProcessPluginName(LLDBSBLaunchInfoRef instance, const char *plugin_name) +{ + SBLaunchInfo *unwrapped = reinterpret_cast(instance); + unwrapped->SetProcessPluginName(plugin_name); +} + +const char * +LLDBSBLaunchInfoGetShell(LLDBSBLaunchInfoRef instance) +{ + SBLaunchInfo *unwrapped = reinterpret_cast(instance); + return unwrapped->GetShell(); +} + +void +LLDBSBLaunchInfoSetShell(LLDBSBLaunchInfoRef instance, const char *path) +{ + SBLaunchInfo *unwrapped = reinterpret_cast(instance); + unwrapped->SetShell(path); +} + +bool +LLDBSBLaunchInfoGetShellExpandArguments(LLDBSBLaunchInfoRef instance) +{ + SBLaunchInfo *unwrapped = reinterpret_cast(instance); + return unwrapped->GetShellExpandArguments(); +} + +void +LLDBSBLaunchInfoSetShellExpandArguments(LLDBSBLaunchInfoRef instance, bool glob) +{ + SBLaunchInfo *unwrapped = reinterpret_cast(instance); + unwrapped->SetShellExpandArguments(glob); +} + +unsigned int +LLDBSBLaunchInfoGetResumeCount(LLDBSBLaunchInfoRef instance) +{ + SBLaunchInfo *unwrapped = reinterpret_cast(instance); + return unwrapped->GetResumeCount(); +} + +void +LLDBSBLaunchInfoSetResumeCount(LLDBSBLaunchInfoRef instance, uint32_t c) +{ + SBLaunchInfo *unwrapped = reinterpret_cast(instance); + unwrapped->SetResumeCount(c); +} + +bool +LLDBSBLaunchInfoAddCloseFileAction(LLDBSBLaunchInfoRef instance, int fd) +{ + SBLaunchInfo *unwrapped = reinterpret_cast(instance); + return unwrapped->AddCloseFileAction(fd); +} + +bool +LLDBSBLaunchInfoAddDuplicateFileAction(LLDBSBLaunchInfoRef instance, int fd, int dup_fd) +{ + SBLaunchInfo *unwrapped = reinterpret_cast(instance); + return unwrapped->AddDuplicateFileAction(fd, dup_fd); +} + +bool +LLDBSBLaunchInfoAddOpenFileAction(LLDBSBLaunchInfoRef instance, int fd, const char *path, bool read, bool write) +{ + SBLaunchInfo *unwrapped = reinterpret_cast(instance); + return unwrapped->AddOpenFileAction(fd, path, read, write); +} + +bool +LLDBSBLaunchInfoAddSuppressFileAction(LLDBSBLaunchInfoRef instance, int fd, bool read, bool write) +{ + SBLaunchInfo *unwrapped = reinterpret_cast(instance); + return unwrapped->AddSuppressFileAction(fd, read, write); +} + +void +LLDBSBLaunchInfoSetLaunchEventData(LLDBSBLaunchInfoRef instance, const char *data) +{ + SBLaunchInfo *unwrapped = reinterpret_cast(instance); + unwrapped->SetLaunchEventData(data); +} + +const char * +LLDBSBLaunchInfoGetLaunchEventData(LLDBSBLaunchInfoRef instance) +{ + SBLaunchInfo *unwrapped = reinterpret_cast(instance); + return unwrapped->GetLaunchEventData(); +} + +bool +LLDBSBLaunchInfoGetDetachOnError(LLDBSBLaunchInfoRef instance) +{ + SBLaunchInfo *unwrapped = reinterpret_cast(instance); + return unwrapped->GetDetachOnError(); +} + +void +LLDBSBLaunchInfoSetDetachOnError(LLDBSBLaunchInfoRef instance, bool enable) +{ + SBLaunchInfo *unwrapped = reinterpret_cast(instance); + unwrapped->SetDetachOnError(enable); +} + +#ifdef __cplusplus +} +#endif Index: source/API/Bindings/SBLineEntryBinding.cpp =================================================================== --- source/API/Bindings/SBLineEntryBinding.cpp +++ source/API/Bindings/SBLineEntryBinding.cpp @@ -0,0 +1,103 @@ +//===-- SBLineEntryBinding.cpp ----------------------------------*- C++ -*-===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +#include "lldb/Bindings/LLDBBinding.h" +#include "lldb/API/LLDB.h" + +using namespace lldb; + +#ifdef __cplusplus +extern "C" { +#endif + +LLDBSBLineEntryRef +LLDBCreateSBLineEntry() +{ + return reinterpret_cast(new SBLineEntry()); +} + +void +LLDBDisposeSBLineEntry(LLDBSBLineEntryRef instance) +{ + delete reinterpret_cast(instance); +} + +LLDBSBAddressRef +LLDBSBLineEntryGetStartAddress(LLDBSBLineEntryRef instance) +{ + SBLineEntry *unwrapped = reinterpret_cast(instance); + return reinterpret_cast(new SBAddress(unwrapped->GetStartAddress())); +} + +LLDBSBAddressRef +LLDBSBLineEntryGetEndAddress(LLDBSBLineEntryRef instance) +{ + SBLineEntry *unwrapped = reinterpret_cast(instance); + return reinterpret_cast(new SBAddress(unwrapped->GetEndAddress())); +} + +bool +LLDBSBLineEntryIsValid(LLDBSBLineEntryRef instance) +{ + SBLineEntry *unwrapped = reinterpret_cast(instance); + return unwrapped->IsValid(); +} + +LLDBSBFileSpecRef +LLDBSBLineEntryGetFileSpec(LLDBSBLineEntryRef instance) +{ + SBLineEntry *unwrapped = reinterpret_cast(instance); + return reinterpret_cast(new SBFileSpec(unwrapped->GetFileSpec())); +} + +unsigned int +LLDBSBLineEntryGetLine(LLDBSBLineEntryRef instance) +{ + SBLineEntry *unwrapped = reinterpret_cast(instance); + return unwrapped->GetLine(); +} + +unsigned int +LLDBSBLineEntryGetColumn(LLDBSBLineEntryRef instance) +{ + SBLineEntry *unwrapped = reinterpret_cast(instance); + return unwrapped->GetColumn(); +} + +void +LLDBSBLineEntrySetFileSpec(LLDBSBLineEntryRef instance, LLDBSBFileSpecRef filespec) +{ + SBLineEntry *unwrapped = reinterpret_cast(instance); + unwrapped->SetFileSpec(*reinterpret_cast(filespec)); +} + +void +LLDBSBLineEntrySetLine(LLDBSBLineEntryRef instance, uint32_t line) +{ + SBLineEntry *unwrapped = reinterpret_cast(instance); + unwrapped->SetLine(line); +} + +void +LLDBSBLineEntrySetColumn(LLDBSBLineEntryRef instance, uint32_t column) +{ + SBLineEntry *unwrapped = reinterpret_cast(instance); + unwrapped->SetColumn(column); +} + +bool +LLDBSBLineEntryGetDescription(LLDBSBLineEntryRef instance, LLDBSBStreamRef description) +{ + SBLineEntry *unwrapped = reinterpret_cast(instance); + return unwrapped->GetDescription(*reinterpret_cast(description)); +} + +#ifdef __cplusplus +} +#endif Index: source/API/Bindings/SBListenerBinding.cpp =================================================================== --- source/API/Bindings/SBListenerBinding.cpp +++ source/API/Bindings/SBListenerBinding.cpp @@ -0,0 +1,175 @@ +//===-- SBListenerBinding.cpp -----------------------------------*- C++ -*-===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +#include "lldb/Bindings/LLDBBinding.h" +#include "lldb/API/LLDB.h" + +using namespace lldb; + +#ifdef __cplusplus +extern "C" { +#endif + +LLDBSBListenerRef +LLDBCreateSBListener() +{ + return reinterpret_cast(new SBListener()); +} + +LLDBSBListenerRef +LLDBCreateSBListener2(const char *name) +{ + return reinterpret_cast(new SBListener(name)); +} + +void +LLDBDisposeSBListener(LLDBSBListenerRef instance) +{ + delete reinterpret_cast(instance); +} + +void +LLDBSBListenerAddEvent(LLDBSBListenerRef instance, LLDBSBEventRef event) +{ + SBListener *unwrapped = reinterpret_cast(instance); + unwrapped->AddEvent(*reinterpret_cast(event)); +} + +void +LLDBSBListenerClear(LLDBSBListenerRef instance) +{ + SBListener *unwrapped = reinterpret_cast(instance); + unwrapped->Clear(); +} + +bool +LLDBSBListenerIsValid(LLDBSBListenerRef instance) +{ + SBListener *unwrapped = reinterpret_cast(instance); + return unwrapped->IsValid(); +} + +unsigned int +LLDBSBListenerStartListeningForEventClass(LLDBSBListenerRef instance, LLDBSBDebuggerRef debugger, + const char *broadcaster_class, uint32_t event_mask) +{ + SBListener *unwrapped = reinterpret_cast(instance); + return unwrapped->StartListeningForEventClass(*reinterpret_cast(debugger), broadcaster_class, + event_mask); +} + +bool +LLDBSBListenerStopListeningForEventClass(LLDBSBListenerRef instance, LLDBSBDebuggerRef debugger, + const char *broadcaster_class, uint32_t event_mask) +{ + SBListener *unwrapped = reinterpret_cast(instance); + return unwrapped->StopListeningForEventClass(*reinterpret_cast(debugger), broadcaster_class, + event_mask); +} + +unsigned int +LLDBSBListenerStartListeningForEvents(LLDBSBListenerRef instance, LLDBSBBroadcasterRef broadcaster, uint32_t event_mask) +{ + SBListener *unwrapped = reinterpret_cast(instance); + return unwrapped->StartListeningForEvents(*reinterpret_cast(broadcaster), event_mask); +} + +bool +LLDBSBListenerStopListeningForEvents(LLDBSBListenerRef instance, LLDBSBBroadcasterRef broadcaster, uint32_t event_mask) +{ + SBListener *unwrapped = reinterpret_cast(instance); + return unwrapped->StopListeningForEvents(*reinterpret_cast(broadcaster), event_mask); +} + +bool +LLDBSBListenerWaitForEvent(LLDBSBListenerRef instance, uint32_t num_seconds, LLDBSBEventRef event) +{ + SBListener *unwrapped = reinterpret_cast(instance); + return unwrapped->WaitForEvent(num_seconds, *reinterpret_cast(event)); +} + +bool +LLDBSBListenerWaitForEventForBroadcaster(LLDBSBListenerRef instance, uint32_t num_seconds, + LLDBSBBroadcasterRef broadcaster, LLDBSBEventRef sb_event) +{ + SBListener *unwrapped = reinterpret_cast(instance); + return unwrapped->WaitForEventForBroadcaster(num_seconds, *reinterpret_cast(broadcaster), + *reinterpret_cast(sb_event)); +} + +bool +LLDBSBListenerWaitForEventForBroadcasterWithType(LLDBSBListenerRef instance, uint32_t num_seconds, + LLDBSBBroadcasterRef broadcaster, uint32_t event_type_mask, + LLDBSBEventRef sb_event) +{ + SBListener *unwrapped = reinterpret_cast(instance); + return unwrapped->WaitForEventForBroadcasterWithType(num_seconds, *reinterpret_cast(broadcaster), + event_type_mask, *reinterpret_cast(sb_event)); +} + +bool +LLDBSBListenerPeekAtNextEvent(LLDBSBListenerRef instance, LLDBSBEventRef sb_event) +{ + SBListener *unwrapped = reinterpret_cast(instance); + return unwrapped->PeekAtNextEvent(*reinterpret_cast(sb_event)); +} + +bool +LLDBSBListenerPeekAtNextEventForBroadcaster(LLDBSBListenerRef instance, LLDBSBBroadcasterRef broadcaster, + LLDBSBEventRef sb_event) +{ + SBListener *unwrapped = reinterpret_cast(instance); + return unwrapped->PeekAtNextEventForBroadcaster(*reinterpret_cast(broadcaster), + *reinterpret_cast(sb_event)); +} + +bool +LLDBSBListenerPeekAtNextEventForBroadcasterWithType(LLDBSBListenerRef instance, LLDBSBBroadcasterRef broadcaster, + uint32_t event_type_mask, LLDBSBEventRef sb_event) +{ + SBListener *unwrapped = reinterpret_cast(instance); + return unwrapped->PeekAtNextEventForBroadcasterWithType(*reinterpret_cast(broadcaster), + event_type_mask, *reinterpret_cast(sb_event)); +} + +bool +LLDBSBListenerGetNextEvent(LLDBSBListenerRef instance, LLDBSBEventRef sb_event) +{ + SBListener *unwrapped = reinterpret_cast(instance); + return unwrapped->GetNextEvent(*reinterpret_cast(sb_event)); +} + +bool +LLDBSBListenerGetNextEventForBroadcaster(LLDBSBListenerRef instance, LLDBSBBroadcasterRef broadcaster, + LLDBSBEventRef sb_event) +{ + SBListener *unwrapped = reinterpret_cast(instance); + return unwrapped->GetNextEventForBroadcaster(*reinterpret_cast(broadcaster), + *reinterpret_cast(sb_event)); +} + +bool +LLDBSBListenerGetNextEventForBroadcasterWithType(LLDBSBListenerRef instance, LLDBSBBroadcasterRef broadcaster, + uint32_t event_type_mask, LLDBSBEventRef sb_event) +{ + SBListener *unwrapped = reinterpret_cast(instance); + return unwrapped->GetNextEventForBroadcasterWithType(*reinterpret_cast(broadcaster), + event_type_mask, *reinterpret_cast(sb_event)); +} + +bool +LLDBSBListenerHandleBroadcastEvent(LLDBSBListenerRef instance, LLDBSBEventRef event) +{ + SBListener *unwrapped = reinterpret_cast(instance); + return unwrapped->HandleBroadcastEvent(*reinterpret_cast(event)); +} + +#ifdef __cplusplus +} +#endif Index: source/API/Bindings/SBModuleBinding.cpp =================================================================== --- source/API/Bindings/SBModuleBinding.cpp +++ source/API/Bindings/SBModuleBinding.cpp @@ -0,0 +1,295 @@ +//===-- SBModuleBinding.cpp -------------------------------------*- C++ -*-===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +#include "lldb/Bindings/LLDBBinding.h" +#include "lldb/API/LLDB.h" + +using namespace lldb; + +#ifdef __cplusplus +extern "C" { +#endif + +LLDBSBModuleRef +LLDBCreateSBModule() +{ + return reinterpret_cast(new SBModule()); +} + +LLDBSBModuleRef +LLDBCreateSBModule2(LLDBSBModuleSpecRef module_spec) +{ + return reinterpret_cast(new SBModule(*reinterpret_cast(module_spec))); +} + +LLDBSBModuleRef +LLDBCreateSBModule3(LLDBSBProcessRef process, lldb::addr_t header_addr) +{ + return reinterpret_cast(new SBModule(*reinterpret_cast(process), header_addr)); +} + +void +LLDBDisposeSBModule(LLDBSBModuleRef instance) +{ + delete reinterpret_cast(instance); +} + +bool +LLDBSBModuleIsValid(LLDBSBModuleRef instance) +{ + SBModule *unwrapped = reinterpret_cast(instance); + return unwrapped->IsValid(); +} + +void +LLDBSBModuleClear(LLDBSBModuleRef instance) +{ + SBModule *unwrapped = reinterpret_cast(instance); + unwrapped->Clear(); +} + +LLDBSBFileSpecRef +LLDBSBModuleGetFileSpec(LLDBSBModuleRef instance) +{ + SBModule *unwrapped = reinterpret_cast(instance); + return reinterpret_cast(new SBFileSpec(unwrapped->GetFileSpec())); +} + +LLDBSBFileSpecRef +LLDBSBModuleGetPlatformFileSpec(LLDBSBModuleRef instance) +{ + SBModule *unwrapped = reinterpret_cast(instance); + return reinterpret_cast(new SBFileSpec(unwrapped->GetPlatformFileSpec())); +} + +bool +LLDBSBModuleSetPlatformFileSpec(LLDBSBModuleRef instance, LLDBSBFileSpecRef platform_file) +{ + SBModule *unwrapped = reinterpret_cast(instance); + return unwrapped->SetPlatformFileSpec(*reinterpret_cast(platform_file)); +} + +LLDBSBFileSpecRef +LLDBSBModuleGetRemoteInstallFileSpec(LLDBSBModuleRef instance) +{ + SBModule *unwrapped = reinterpret_cast(instance); + return reinterpret_cast(new SBFileSpec(unwrapped->GetRemoteInstallFileSpec())); +} + +bool +LLDBSBModuleSetRemoteInstallFileSpec(LLDBSBModuleRef instance, LLDBSBFileSpecRef file) +{ + SBModule *unwrapped = reinterpret_cast(instance); + return unwrapped->SetRemoteInstallFileSpec(*reinterpret_cast(file)); +} + +enum lldb::ByteOrder +LLDBSBModuleGetByteOrder(LLDBSBModuleRef instance) +{ + SBModule *unwrapped = reinterpret_cast(instance); + return unwrapped->GetByteOrder(); +} + +unsigned int +LLDBSBModuleGetAddressByteSize(LLDBSBModuleRef instance) +{ + SBModule *unwrapped = reinterpret_cast(instance); + return unwrapped->GetAddressByteSize(); +} + +const char * +LLDBSBModuleGetTriple(LLDBSBModuleRef instance) +{ + SBModule *unwrapped = reinterpret_cast(instance); + return unwrapped->GetTriple(); +} + +const uint8_t * +LLDBSBModuleGetUUIDBytes(LLDBSBModuleRef instance) +{ + SBModule *unwrapped = reinterpret_cast(instance); + return unwrapped->GetUUIDBytes(); +} + +const char * +LLDBSBModuleGetUUIDString(LLDBSBModuleRef instance) +{ + SBModule *unwrapped = reinterpret_cast(instance); + return unwrapped->GetUUIDString(); +} + +LLDBSBSectionRef +LLDBSBModuleFindSection(LLDBSBModuleRef instance, const char *sect_name) +{ + SBModule *unwrapped = reinterpret_cast(instance); + return reinterpret_cast(new SBSection(unwrapped->FindSection(sect_name))); +} + +LLDBSBAddressRef +LLDBSBModuleResolveFileAddress(LLDBSBModuleRef instance, lldb::addr_t vm_addr) +{ + SBModule *unwrapped = reinterpret_cast(instance); + return reinterpret_cast(new SBAddress(unwrapped->ResolveFileAddress(vm_addr))); +} + +LLDBSBSymbolContextRef +LLDBSBModuleResolveSymbolContextForAddress(LLDBSBModuleRef instance, LLDBSBAddressRef addr, uint32_t resolve_scope) +{ + SBModule *unwrapped = reinterpret_cast(instance); + return reinterpret_cast(new SBSymbolContext( + unwrapped->ResolveSymbolContextForAddress(*reinterpret_cast(addr), resolve_scope))); +} + +bool +LLDBSBModuleGetDescription(LLDBSBModuleRef instance, LLDBSBStreamRef description) +{ + SBModule *unwrapped = reinterpret_cast(instance); + return unwrapped->GetDescription(*reinterpret_cast(description)); +} + +unsigned int +LLDBSBModuleGetNumCompileUnits(LLDBSBModuleRef instance) +{ + SBModule *unwrapped = reinterpret_cast(instance); + return unwrapped->GetNumCompileUnits(); +} + +LLDBSBCompileUnitRef +LLDBSBModuleGetCompileUnitAtIndex(LLDBSBModuleRef instance, uint32_t var0) +{ + SBModule *unwrapped = reinterpret_cast(instance); + return reinterpret_cast(new SBCompileUnit(unwrapped->GetCompileUnitAtIndex(var0))); +} + +unsigned int +LLDBSBModuleGetNumSymbols(LLDBSBModuleRef instance) +{ + SBModule *unwrapped = reinterpret_cast(instance); + return unwrapped->GetNumSymbols(); +} + +LLDBSBSymbolRef +LLDBSBModuleGetSymbolAtIndex(LLDBSBModuleRef instance, size_t idx) +{ + SBModule *unwrapped = reinterpret_cast(instance); + return reinterpret_cast(new SBSymbol(unwrapped->GetSymbolAtIndex(idx))); +} + +LLDBSBSymbolRef +LLDBSBModuleFindSymbol(LLDBSBModuleRef instance, const char *name, lldb::SymbolType type) +{ + SBModule *unwrapped = reinterpret_cast(instance); + return reinterpret_cast(new SBSymbol(unwrapped->FindSymbol(name, type))); +} + +LLDBSBSymbolContextListRef +LLDBSBModuleFindSymbols(LLDBSBModuleRef instance, const char *name, lldb::SymbolType type) +{ + SBModule *unwrapped = reinterpret_cast(instance); + return reinterpret_cast(new SBSymbolContextList(unwrapped->FindSymbols(name, type))); +} + +unsigned int +LLDBSBModuleGetNumSections(LLDBSBModuleRef instance) +{ + SBModule *unwrapped = reinterpret_cast(instance); + return unwrapped->GetNumSections(); +} + +LLDBSBSectionRef +LLDBSBModuleGetSectionAtIndex(LLDBSBModuleRef instance, size_t idx) +{ + SBModule *unwrapped = reinterpret_cast(instance); + return reinterpret_cast(new SBSection(unwrapped->GetSectionAtIndex(idx))); +} + +LLDBSBSymbolContextListRef +LLDBSBModuleFindFunctions(LLDBSBModuleRef instance, const char *name, uint32_t name_type_mask) +{ + SBModule *unwrapped = reinterpret_cast(instance); + return reinterpret_cast( + new SBSymbolContextList(unwrapped->FindFunctions(name, name_type_mask))); +} + +LLDBSBValueListRef +LLDBSBModuleFindGlobalVariables(LLDBSBModuleRef instance, LLDBSBTargetRef target, const char *name, + uint32_t max_matches) +{ + SBModule *unwrapped = reinterpret_cast(instance); + return reinterpret_cast( + new SBValueList(unwrapped->FindGlobalVariables(*reinterpret_cast(target), name, max_matches))); +} + +LLDBSBValueRef +LLDBSBModuleFindFirstGlobalVariable(LLDBSBModuleRef instance, LLDBSBTargetRef target, const char *name) +{ + SBModule *unwrapped = reinterpret_cast(instance); + return reinterpret_cast( + new SBValue(unwrapped->FindFirstGlobalVariable(*reinterpret_cast(target), name))); +} + +LLDBSBTypeRef +LLDBSBModuleFindFirstType(LLDBSBModuleRef instance, const char *name) +{ + SBModule *unwrapped = reinterpret_cast(instance); + return reinterpret_cast(new SBType(unwrapped->FindFirstType(name))); +} + +LLDBSBTypeListRef +LLDBSBModuleFindTypes(LLDBSBModuleRef instance, const char *type) +{ + SBModule *unwrapped = reinterpret_cast(instance); + return reinterpret_cast(new SBTypeList(unwrapped->FindTypes(type))); +} + +LLDBSBTypeRef +LLDBSBModuleGetTypeByID(LLDBSBModuleRef instance, lldb::user_id_t uid) +{ + SBModule *unwrapped = reinterpret_cast(instance); + return reinterpret_cast(new SBType(unwrapped->GetTypeByID(uid))); +} + +LLDBSBTypeRef +LLDBSBModuleGetBasicType(LLDBSBModuleRef instance, lldb::BasicType type) +{ + SBModule *unwrapped = reinterpret_cast(instance); + return reinterpret_cast(new SBType(unwrapped->GetBasicType(type))); +} + +LLDBSBTypeListRef +LLDBSBModuleGetTypes(LLDBSBModuleRef instance, uint32_t type_mask) +{ + SBModule *unwrapped = reinterpret_cast(instance); + return reinterpret_cast(new SBTypeList(unwrapped->GetTypes(type_mask))); +} + +unsigned int +LLDBSBModuleGetVersion(LLDBSBModuleRef instance, uint32_t *versions, uint32_t num_versions) +{ + SBModule *unwrapped = reinterpret_cast(instance); + return unwrapped->GetVersion(versions, num_versions); +} + +LLDBSBFileSpecRef +LLDBSBModuleGetSymbolFileSpec(LLDBSBModuleRef instance) +{ + SBModule *unwrapped = reinterpret_cast(instance); + return reinterpret_cast(new SBFileSpec(unwrapped->GetSymbolFileSpec())); +} + +LLDBSBAddressRef +LLDBSBModuleGetObjectFileHeaderAddress(LLDBSBModuleRef instance) +{ + SBModule *unwrapped = reinterpret_cast(instance); + return reinterpret_cast(new SBAddress(unwrapped->GetObjectFileHeaderAddress())); +} + +#ifdef __cplusplus +} +#endif Index: source/API/Bindings/SBModuleSpecBinding.cpp =================================================================== --- source/API/Bindings/SBModuleSpecBinding.cpp +++ source/API/Bindings/SBModuleSpecBinding.cpp @@ -0,0 +1,216 @@ +//===-- SBModuleSpecBinding.cpp ---------------------------------*- C++ -*-===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +#include "lldb/Bindings/LLDBBinding.h" +#include "lldb/API/LLDB.h" +#include "lldb/API/SBModuleSpec.h" + +using namespace lldb; + +#ifdef __cplusplus +extern "C" { +#endif + +LLDBSBModuleSpecRef +LLDBCreateSBModuleSpec() +{ + return reinterpret_cast(new SBModuleSpec()); +} + +void +LLDBDisposeSBModuleSpec(LLDBSBModuleSpecRef instance) +{ + delete reinterpret_cast(instance); +} + +bool +LLDBSBModuleSpecIsValid(LLDBSBModuleSpecRef instance) +{ + SBModuleSpec *unwrapped = reinterpret_cast(instance); + return unwrapped->IsValid(); +} + +void +LLDBSBModuleSpecClear(LLDBSBModuleSpecRef instance) +{ + SBModuleSpec *unwrapped = reinterpret_cast(instance); + unwrapped->Clear(); +} + +LLDBSBFileSpecRef +LLDBSBModuleSpecGetFileSpec(LLDBSBModuleSpecRef instance) +{ + SBModuleSpec *unwrapped = reinterpret_cast(instance); + return reinterpret_cast(new SBFileSpec(unwrapped->GetFileSpec())); +} + +void +LLDBSBModuleSpecSetFileSpec(LLDBSBModuleSpecRef instance, LLDBSBFileSpecRef fspec) +{ + SBModuleSpec *unwrapped = reinterpret_cast(instance); + unwrapped->SetFileSpec(*reinterpret_cast(fspec)); +} + +LLDBSBFileSpecRef +LLDBSBModuleSpecGetPlatformFileSpec(LLDBSBModuleSpecRef instance) +{ + SBModuleSpec *unwrapped = reinterpret_cast(instance); + return reinterpret_cast(new SBFileSpec(unwrapped->GetPlatformFileSpec())); +} + +void +LLDBSBModuleSpecSetPlatformFileSpec(LLDBSBModuleSpecRef instance, LLDBSBFileSpecRef fspec) +{ + SBModuleSpec *unwrapped = reinterpret_cast(instance); + unwrapped->SetPlatformFileSpec(*reinterpret_cast(fspec)); +} + +LLDBSBFileSpecRef +LLDBSBModuleSpecGetSymbolFileSpec(LLDBSBModuleSpecRef instance) +{ + SBModuleSpec *unwrapped = reinterpret_cast(instance); + return reinterpret_cast(new SBFileSpec(unwrapped->GetSymbolFileSpec())); +} + +void +LLDBSBModuleSpecSetSymbolFileSpec(LLDBSBModuleSpecRef instance, LLDBSBFileSpecRef fspec) +{ + SBModuleSpec *unwrapped = reinterpret_cast(instance); + unwrapped->SetSymbolFileSpec(*reinterpret_cast(fspec)); +} + +const char * +LLDBSBModuleSpecGetObjectName(LLDBSBModuleSpecRef instance) +{ + SBModuleSpec *unwrapped = reinterpret_cast(instance); + return unwrapped->GetObjectName(); +} + +void +LLDBSBModuleSpecSetObjectName(LLDBSBModuleSpecRef instance, const char *name) +{ + SBModuleSpec *unwrapped = reinterpret_cast(instance); + unwrapped->SetObjectName(name); +} + +const char * +LLDBSBModuleSpecGetTriple(LLDBSBModuleSpecRef instance) +{ + SBModuleSpec *unwrapped = reinterpret_cast(instance); + return unwrapped->GetTriple(); +} + +void +LLDBSBModuleSpecSetTriple(LLDBSBModuleSpecRef instance, const char *triple) +{ + SBModuleSpec *unwrapped = reinterpret_cast(instance); + unwrapped->SetTriple(triple); +} + +const uint8_t * +LLDBSBModuleSpecGetUUIDBytes(LLDBSBModuleSpecRef instance) +{ + SBModuleSpec *unwrapped = reinterpret_cast(instance); + return unwrapped->GetUUIDBytes(); +} + +unsigned int +LLDBSBModuleSpecGetUUIDLength(LLDBSBModuleSpecRef instance) +{ + SBModuleSpec *unwrapped = reinterpret_cast(instance); + return unwrapped->GetUUIDLength(); +} + +bool +LLDBSBModuleSpecSetUUIDBytes(LLDBSBModuleSpecRef instance, const uint8_t *uuid, size_t uuid_len) +{ + SBModuleSpec *unwrapped = reinterpret_cast(instance); + return unwrapped->SetUUIDBytes(uuid, uuid_len); +} + +bool +LLDBSBModuleSpecGetDescription(LLDBSBModuleSpecRef instance, LLDBSBStreamRef description) +{ + SBModuleSpec *unwrapped = reinterpret_cast(instance); + return unwrapped->GetDescription(*reinterpret_cast(description)); +} + +LLDBSBModuleSpecListRef +LLDBCreateSBModuleSpecList() +{ + return reinterpret_cast(new SBModuleSpecList()); +} + +void +LLDBDisposeSBModuleSpecList(LLDBSBModuleSpecListRef instance) +{ + delete reinterpret_cast(instance); +} + +LLDBSBModuleSpecListRef +LLDBSBModuleSpecListGetModuleSpecifications(const char *path) +{ + return reinterpret_cast( + new SBModuleSpecList(lldb::SBModuleSpecList::GetModuleSpecifications(path))); +} + +void +LLDBSBModuleSpecListAppend(LLDBSBModuleSpecListRef instance, LLDBSBModuleSpecRef spec) +{ + SBModuleSpecList *unwrapped = reinterpret_cast(instance); + unwrapped->Append(*reinterpret_cast(spec)); +} + +void +LLDBSBModuleSpecListAppend2(LLDBSBModuleSpecListRef instance, LLDBSBModuleSpecListRef spec_list) +{ + SBModuleSpecList *unwrapped = reinterpret_cast(instance); + unwrapped->Append(*reinterpret_cast(spec_list)); +} + +LLDBSBModuleSpecRef +LLDBSBModuleSpecListFindFirstMatchingSpec(LLDBSBModuleSpecListRef instance, LLDBSBModuleSpecRef match_spec) +{ + SBModuleSpecList *unwrapped = reinterpret_cast(instance); + return reinterpret_cast( + new SBModuleSpec(unwrapped->FindFirstMatchingSpec(*reinterpret_cast(match_spec)))); +} + +LLDBSBModuleSpecListRef +LLDBSBModuleSpecListFindMatchingSpecs(LLDBSBModuleSpecListRef instance, LLDBSBModuleSpecRef match_spec) +{ + SBModuleSpecList *unwrapped = reinterpret_cast(instance); + return reinterpret_cast( + new SBModuleSpecList(unwrapped->FindMatchingSpecs(*reinterpret_cast(match_spec)))); +} + +unsigned int +LLDBSBModuleSpecListGetSize(LLDBSBModuleSpecListRef instance) +{ + SBModuleSpecList *unwrapped = reinterpret_cast(instance); + return unwrapped->GetSize(); +} + +LLDBSBModuleSpecRef +LLDBSBModuleSpecListGetSpecAtIndex(LLDBSBModuleSpecListRef instance, size_t i) +{ + SBModuleSpecList *unwrapped = reinterpret_cast(instance); + return reinterpret_cast(new SBModuleSpec(unwrapped->GetSpecAtIndex(i))); +} + +bool +LLDBSBModuleSpecListGetDescription(LLDBSBModuleSpecListRef instance, LLDBSBStreamRef description) +{ + SBModuleSpecList *unwrapped = reinterpret_cast(instance); + return unwrapped->GetDescription(*reinterpret_cast(description)); +} + +#ifdef __cplusplus +} +#endif Index: source/API/Bindings/SBPlatformBinding.cpp =================================================================== --- source/API/Bindings/SBPlatformBinding.cpp +++ source/API/Bindings/SBPlatformBinding.cpp @@ -0,0 +1,357 @@ +//===-- SBPlatformBinding.cpp -----------------------------------*- C++ -*-===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +#include "lldb/Bindings/LLDBBinding.h" +#include "lldb/API/LLDB.h" + +using namespace lldb; + +#ifdef __cplusplus +extern "C" { +#endif + +LLDBSBPlatformConnectOptionsRef +LLDBCreateSBPlatformConnectOptions(const char *url) +{ + return reinterpret_cast(new SBPlatformConnectOptions(url)); +} + +void +LLDBDisposeSBPlatformConnectOptions(LLDBSBPlatformConnectOptionsRef instance) +{ + delete reinterpret_cast(instance); +} + +const char * +LLDBSBPlatformConnectOptionsGetURL(LLDBSBPlatformConnectOptionsRef instance) +{ + SBPlatformConnectOptions *unwrapped = reinterpret_cast(instance); + return unwrapped->GetURL(); +} + +void +LLDBSBPlatformConnectOptionsSetURL(LLDBSBPlatformConnectOptionsRef instance, const char *url) +{ + SBPlatformConnectOptions *unwrapped = reinterpret_cast(instance); + unwrapped->SetURL(url); +} + +bool +LLDBSBPlatformConnectOptionsGetRsyncEnabled(LLDBSBPlatformConnectOptionsRef instance) +{ + SBPlatformConnectOptions *unwrapped = reinterpret_cast(instance); + return unwrapped->GetRsyncEnabled(); +} + +void +LLDBSBPlatformConnectOptionsEnableRsync(LLDBSBPlatformConnectOptionsRef instance, const char *options, + const char *remote_path_prefix, bool omit_remote_hostname) +{ + SBPlatformConnectOptions *unwrapped = reinterpret_cast(instance); + unwrapped->EnableRsync(options, remote_path_prefix, omit_remote_hostname); +} + +void +LLDBSBPlatformConnectOptionsDisableRsync(LLDBSBPlatformConnectOptionsRef instance) +{ + SBPlatformConnectOptions *unwrapped = reinterpret_cast(instance); + unwrapped->DisableRsync(); +} + +const char * +LLDBSBPlatformConnectOptionsGetLocalCacheDirectory(LLDBSBPlatformConnectOptionsRef instance) +{ + SBPlatformConnectOptions *unwrapped = reinterpret_cast(instance); + return unwrapped->GetLocalCacheDirectory(); +} + +void +LLDBSBPlatformConnectOptionsSetLocalCacheDirectory(LLDBSBPlatformConnectOptionsRef instance, const char *path) +{ + SBPlatformConnectOptions *unwrapped = reinterpret_cast(instance); + unwrapped->SetLocalCacheDirectory(path); +} + +LLDBSBPlatformShellCommandRef +LLDBCreateSBPlatformShellCommand(const char *shell_command) +{ + return reinterpret_cast(new SBPlatformShellCommand(shell_command)); +} + +void +LLDBDisposeSBPlatformShellCommand(LLDBSBPlatformShellCommandRef instance) +{ + delete reinterpret_cast(instance); +} + +void +LLDBSBPlatformShellCommandClear(LLDBSBPlatformShellCommandRef instance) +{ + SBPlatformShellCommand *unwrapped = reinterpret_cast(instance); + unwrapped->Clear(); +} + +const char * +LLDBSBPlatformShellCommandGetCommand(LLDBSBPlatformShellCommandRef instance) +{ + SBPlatformShellCommand *unwrapped = reinterpret_cast(instance); + return unwrapped->GetCommand(); +} + +void +LLDBSBPlatformShellCommandSetCommand(LLDBSBPlatformShellCommandRef instance, const char *shell_command) +{ + SBPlatformShellCommand *unwrapped = reinterpret_cast(instance); + unwrapped->SetCommand(shell_command); +} + +const char * +LLDBSBPlatformShellCommandGetWorkingDirectory(LLDBSBPlatformShellCommandRef instance) +{ + SBPlatformShellCommand *unwrapped = reinterpret_cast(instance); + return unwrapped->GetWorkingDirectory(); +} + +void +LLDBSBPlatformShellCommandSetWorkingDirectory(LLDBSBPlatformShellCommandRef instance, const char *path) +{ + SBPlatformShellCommand *unwrapped = reinterpret_cast(instance); + unwrapped->SetWorkingDirectory(path); +} + +unsigned int +LLDBSBPlatformShellCommandGetTimeoutSeconds(LLDBSBPlatformShellCommandRef instance) +{ + SBPlatformShellCommand *unwrapped = reinterpret_cast(instance); + return unwrapped->GetTimeoutSeconds(); +} + +void +LLDBSBPlatformShellCommandSetTimeoutSeconds(LLDBSBPlatformShellCommandRef instance, uint32_t sec) +{ + SBPlatformShellCommand *unwrapped = reinterpret_cast(instance); + unwrapped->SetTimeoutSeconds(sec); +} + +int +LLDBSBPlatformShellCommandGetSignal(LLDBSBPlatformShellCommandRef instance) +{ + SBPlatformShellCommand *unwrapped = reinterpret_cast(instance); + return unwrapped->GetSignal(); +} + +int +LLDBSBPlatformShellCommandGetStatus(LLDBSBPlatformShellCommandRef instance) +{ + SBPlatformShellCommand *unwrapped = reinterpret_cast(instance); + return unwrapped->GetStatus(); +} + +const char * +LLDBSBPlatformShellCommandGetOutput(LLDBSBPlatformShellCommandRef instance) +{ + SBPlatformShellCommand *unwrapped = reinterpret_cast(instance); + return unwrapped->GetOutput(); +} + +LLDBSBPlatformRef +LLDBCreateSBPlatform() +{ + return reinterpret_cast(new SBPlatform()); +} + +LLDBSBPlatformRef +LLDBCreateSBPlatform2(const char *platform_name) +{ + return reinterpret_cast(new SBPlatform(platform_name)); +} + +void +LLDBDisposeSBPlatform(LLDBSBPlatformRef instance) +{ + delete reinterpret_cast(instance); +} + +bool +LLDBSBPlatformIsValid(LLDBSBPlatformRef instance) +{ + SBPlatform *unwrapped = reinterpret_cast(instance); + return unwrapped->IsValid(); +} + +void +LLDBSBPlatformClear(LLDBSBPlatformRef instance) +{ + SBPlatform *unwrapped = reinterpret_cast(instance); + unwrapped->Clear(); +} + +const char * +LLDBSBPlatformGetWorkingDirectory(LLDBSBPlatformRef instance) +{ + SBPlatform *unwrapped = reinterpret_cast(instance); + return unwrapped->GetWorkingDirectory(); +} + +bool +LLDBSBPlatformSetWorkingDirectory(LLDBSBPlatformRef instance, const char *path) +{ + SBPlatform *unwrapped = reinterpret_cast(instance); + return unwrapped->SetWorkingDirectory(path); +} + +const char * +LLDBSBPlatformGetName(LLDBSBPlatformRef instance) +{ + SBPlatform *unwrapped = reinterpret_cast(instance); + return unwrapped->GetName(); +} + +LLDBSBErrorRef +LLDBSBPlatformConnectRemote(LLDBSBPlatformRef instance, LLDBSBPlatformConnectOptionsRef connect_options) +{ + SBPlatform *unwrapped = reinterpret_cast(instance); + return reinterpret_cast( + new SBError(unwrapped->ConnectRemote(*reinterpret_cast(connect_options)))); +} + +void +LLDBSBPlatformDisconnectRemote(LLDBSBPlatformRef instance) +{ + SBPlatform *unwrapped = reinterpret_cast(instance); + unwrapped->DisconnectRemote(); +} + +bool +LLDBSBPlatformIsConnected(LLDBSBPlatformRef instance) +{ + SBPlatform *unwrapped = reinterpret_cast(instance); + return unwrapped->IsConnected(); +} + +const char * +LLDBSBPlatformGetTriple(LLDBSBPlatformRef instance) +{ + SBPlatform *unwrapped = reinterpret_cast(instance); + return unwrapped->GetTriple(); +} + +const char * +LLDBSBPlatformGetHostname(LLDBSBPlatformRef instance) +{ + SBPlatform *unwrapped = reinterpret_cast(instance); + return unwrapped->GetHostname(); +} + +const char * +LLDBSBPlatformGetOSBuild(LLDBSBPlatformRef instance) +{ + SBPlatform *unwrapped = reinterpret_cast(instance); + return unwrapped->GetOSBuild(); +} + +const char * +LLDBSBPlatformGetOSDescription(LLDBSBPlatformRef instance) +{ + SBPlatform *unwrapped = reinterpret_cast(instance); + return unwrapped->GetOSDescription(); +} + +unsigned int +LLDBSBPlatformGetOSMajorVersion(LLDBSBPlatformRef instance) +{ + SBPlatform *unwrapped = reinterpret_cast(instance); + return unwrapped->GetOSMajorVersion(); +} + +unsigned int +LLDBSBPlatformGetOSMinorVersion(LLDBSBPlatformRef instance) +{ + SBPlatform *unwrapped = reinterpret_cast(instance); + return unwrapped->GetOSMinorVersion(); +} + +unsigned int +LLDBSBPlatformGetOSUpdateVersion(LLDBSBPlatformRef instance) +{ + SBPlatform *unwrapped = reinterpret_cast(instance); + return unwrapped->GetOSUpdateVersion(); +} + +LLDBSBErrorRef +LLDBSBPlatformPut(LLDBSBPlatformRef instance, LLDBSBFileSpecRef src, LLDBSBFileSpecRef dst) +{ + SBPlatform *unwrapped = reinterpret_cast(instance); + return reinterpret_cast( + new SBError(unwrapped->Put(*reinterpret_cast(src), *reinterpret_cast(dst)))); +} + +LLDBSBErrorRef +LLDBSBPlatformGet(LLDBSBPlatformRef instance, LLDBSBFileSpecRef src, LLDBSBFileSpecRef dst) +{ + SBPlatform *unwrapped = reinterpret_cast(instance); + return reinterpret_cast( + new SBError(unwrapped->Get(*reinterpret_cast(src), *reinterpret_cast(dst)))); +} + +LLDBSBErrorRef +LLDBSBPlatformInstall(LLDBSBPlatformRef instance, LLDBSBFileSpecRef src, LLDBSBFileSpecRef dst) +{ + SBPlatform *unwrapped = reinterpret_cast(instance); + return reinterpret_cast( + new SBError(unwrapped->Install(*reinterpret_cast(src), *reinterpret_cast(dst)))); +} + +LLDBSBErrorRef +LLDBSBPlatformRun(LLDBSBPlatformRef instance, LLDBSBPlatformShellCommandRef shell_command) +{ + SBPlatform *unwrapped = reinterpret_cast(instance); + return reinterpret_cast( + new SBError(unwrapped->Run(*reinterpret_cast(shell_command)))); +} + +LLDBSBErrorRef +LLDBSBPlatformLaunch(LLDBSBPlatformRef instance, LLDBSBLaunchInfoRef launch_info) +{ + SBPlatform *unwrapped = reinterpret_cast(instance); + return reinterpret_cast( + new SBError(unwrapped->Launch(*reinterpret_cast(launch_info)))); +} + +LLDBSBErrorRef +LLDBSBPlatformKill(LLDBSBPlatformRef instance, const lldb::pid_t pid) +{ + SBPlatform *unwrapped = reinterpret_cast(instance); + return reinterpret_cast(new SBError(unwrapped->Kill(pid))); +} + +LLDBSBErrorRef +LLDBSBPlatformMakeDirectory(LLDBSBPlatformRef instance, const char *path, uint32_t file_permissions) +{ + SBPlatform *unwrapped = reinterpret_cast(instance); + return reinterpret_cast(new SBError(unwrapped->MakeDirectory(path, file_permissions))); +} + +unsigned int +LLDBSBPlatformGetFilePermissions(LLDBSBPlatformRef instance, const char *path) +{ + SBPlatform *unwrapped = reinterpret_cast(instance); + return unwrapped->GetFilePermissions(path); +} + +LLDBSBErrorRef +LLDBSBPlatformSetFilePermissions(LLDBSBPlatformRef instance, const char *path, uint32_t file_permissions) +{ + SBPlatform *unwrapped = reinterpret_cast(instance); + return reinterpret_cast(new SBError(unwrapped->SetFilePermissions(path, file_permissions))); +} + +#ifdef __cplusplus +} +#endif Index: source/API/Bindings/SBProcessBinding.cpp =================================================================== --- source/API/Bindings/SBProcessBinding.cpp +++ source/API/Bindings/SBProcessBinding.cpp @@ -0,0 +1,483 @@ +//===-- SBProcessBinding.cpp ------------------------------------*- C++ -*-===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +#include "lldb/Bindings/LLDBBinding.h" +#include "lldb/API/LLDB.h" +#include "lldb/API/SBUnixSignals.h" +#include "lldb/API/SBThreadCollection.h" + +using namespace lldb; + +#ifdef __cplusplus +extern "C" { +#endif + +LLDBSBProcessRef +LLDBCreateSBProcess() +{ + return reinterpret_cast(new SBProcess()); +} + +void +LLDBDisposeSBProcess(LLDBSBProcessRef instance) +{ + delete reinterpret_cast(instance); +} + +const char * +LLDBSBProcessGetBroadcasterClassName() +{ + return lldb::SBProcess::GetBroadcasterClassName(); +} + +const char * +LLDBSBProcessGetPluginName(LLDBSBProcessRef instance) +{ + SBProcess *unwrapped = reinterpret_cast(instance); + return unwrapped->GetPluginName(); +} + +const char * +LLDBSBProcessGetShortPluginName(LLDBSBProcessRef instance) +{ + SBProcess *unwrapped = reinterpret_cast(instance); + return unwrapped->GetShortPluginName(); +} + +void +LLDBSBProcessClear(LLDBSBProcessRef instance) +{ + SBProcess *unwrapped = reinterpret_cast(instance); + unwrapped->Clear(); +} + +bool +LLDBSBProcessIsValid(LLDBSBProcessRef instance) +{ + SBProcess *unwrapped = reinterpret_cast(instance); + return unwrapped->IsValid(); +} + +LLDBSBTargetRef +LLDBSBProcessGetTarget(LLDBSBProcessRef instance) +{ + SBProcess *unwrapped = reinterpret_cast(instance); + return reinterpret_cast(new SBTarget(unwrapped->GetTarget())); +} + +enum lldb::ByteOrder +LLDBSBProcessGetByteOrder(LLDBSBProcessRef instance) +{ + SBProcess *unwrapped = reinterpret_cast(instance); + return unwrapped->GetByteOrder(); +} + +unsigned int +LLDBSBProcessPutSTDIN(LLDBSBProcessRef instance, const char *src, size_t src_len) +{ + SBProcess *unwrapped = reinterpret_cast(instance); + return unwrapped->PutSTDIN(src, src_len); +} + +unsigned int +LLDBSBProcessGetSTDOUT(LLDBSBProcessRef instance, char *dst, size_t dst_len) +{ + SBProcess *unwrapped = reinterpret_cast(instance); + return unwrapped->GetSTDOUT(dst, dst_len); +} + +unsigned int +LLDBSBProcessGetSTDERR(LLDBSBProcessRef instance, char *dst, size_t dst_len) +{ + SBProcess *unwrapped = reinterpret_cast(instance); + return unwrapped->GetSTDERR(dst, dst_len); +} + +unsigned int +LLDBSBProcessGetAsyncProfileData(LLDBSBProcessRef instance, char *dst, size_t dst_len) +{ + SBProcess *unwrapped = reinterpret_cast(instance); + return unwrapped->GetAsyncProfileData(dst, dst_len); +} + +void +LLDBSBProcessReportEventState(LLDBSBProcessRef instance, LLDBSBEventRef event, FILE *out) +{ + SBProcess *unwrapped = reinterpret_cast(instance); + unwrapped->ReportEventState(*reinterpret_cast(event), reinterpret_cast(out)); +} + +void +LLDBSBProcessAppendEventStateReport(LLDBSBProcessRef instance, LLDBSBEventRef event, + LLDBSBCommandReturnObjectRef result) +{ + SBProcess *unwrapped = reinterpret_cast(instance); + unwrapped->AppendEventStateReport(*reinterpret_cast(event), + *reinterpret_cast(result)); +} + +bool +LLDBSBProcessRemoteAttachToProcessWithID(LLDBSBProcessRef instance, lldb::pid_t pid, LLDBSBErrorRef error) +{ + SBProcess *unwrapped = reinterpret_cast(instance); + return unwrapped->RemoteAttachToProcessWithID(pid, *reinterpret_cast(error)); +} + +bool +LLDBSBProcessRemoteLaunch(LLDBSBProcessRef instance, const char **argv, const char **envp, const char *stdin_path, + const char *stdout_path, const char *stderr_path, const char *working_directory, + uint32_t launch_flags, bool stop_at_entry, LLDBSBErrorRef error) +{ + SBProcess *unwrapped = reinterpret_cast(instance); + return unwrapped->RemoteLaunch(argv, envp, stdin_path, stdout_path, stderr_path, working_directory, launch_flags, + stop_at_entry, *reinterpret_cast(error)); +} + +unsigned int +LLDBSBProcessGetNumThreads(LLDBSBProcessRef instance) +{ + SBProcess *unwrapped = reinterpret_cast(instance); + return unwrapped->GetNumThreads(); +} + +LLDBSBThreadRef +LLDBSBProcessGetThreadAtIndex(LLDBSBProcessRef instance, size_t index) +{ + SBProcess *unwrapped = reinterpret_cast(instance); + return reinterpret_cast(new SBThread(unwrapped->GetThreadAtIndex(index))); +} + +LLDBSBThreadRef +LLDBSBProcessGetThreadByID(LLDBSBProcessRef instance, lldb::tid_t sb_thread_id) +{ + SBProcess *unwrapped = reinterpret_cast(instance); + return reinterpret_cast(new SBThread(unwrapped->GetThreadByID(sb_thread_id))); +} + +LLDBSBThreadRef +LLDBSBProcessGetThreadByIndexID(LLDBSBProcessRef instance, uint32_t index_id) +{ + SBProcess *unwrapped = reinterpret_cast(instance); + return reinterpret_cast(new SBThread(unwrapped->GetThreadByIndexID(index_id))); +} + +LLDBSBThreadRef +LLDBSBProcessGetSelectedThread(LLDBSBProcessRef instance) +{ + SBProcess *unwrapped = reinterpret_cast(instance); + return reinterpret_cast(new SBThread(unwrapped->GetSelectedThread())); +} + +LLDBSBThreadRef +LLDBSBProcessCreateOSPluginThread(LLDBSBProcessRef instance, lldb::tid_t tid, lldb::addr_t context) +{ + SBProcess *unwrapped = reinterpret_cast(instance); + return reinterpret_cast(new SBThread(unwrapped->CreateOSPluginThread(tid, context))); +} + +bool +LLDBSBProcessSetSelectedThread(LLDBSBProcessRef instance, LLDBSBThreadRef thread) +{ + SBProcess *unwrapped = reinterpret_cast(instance); + return unwrapped->SetSelectedThread(*reinterpret_cast(thread)); +} + +bool +LLDBSBProcessSetSelectedThreadByID(LLDBSBProcessRef instance, lldb::tid_t tid) +{ + SBProcess *unwrapped = reinterpret_cast(instance); + return unwrapped->SetSelectedThreadByID(tid); +} + +bool +LLDBSBProcessSetSelectedThreadByIndexID(LLDBSBProcessRef instance, uint32_t index_id) +{ + SBProcess *unwrapped = reinterpret_cast(instance); + return unwrapped->SetSelectedThreadByIndexID(index_id); +} + +unsigned int +LLDBSBProcessGetNumQueues(LLDBSBProcessRef instance) +{ + SBProcess *unwrapped = reinterpret_cast(instance); + return unwrapped->GetNumQueues(); +} + +LLDBSBQueueRef +LLDBSBProcessGetQueueAtIndex(LLDBSBProcessRef instance, size_t index) +{ + SBProcess *unwrapped = reinterpret_cast(instance); + return reinterpret_cast(new SBQueue(unwrapped->GetQueueAtIndex(index))); +} + +LLDBStateType +LLDBSBProcessGetState(LLDBSBProcessRef instance) +{ + SBProcess *unwrapped = reinterpret_cast(instance); + return unwrapped->GetState(); +} + +int +LLDBSBProcessGetExitStatus(LLDBSBProcessRef instance) +{ + SBProcess *unwrapped = reinterpret_cast(instance); + return unwrapped->GetExitStatus(); +} + +const char * +LLDBSBProcessGetExitDescription(LLDBSBProcessRef instance) +{ + SBProcess *unwrapped = reinterpret_cast(instance); + return unwrapped->GetExitDescription(); +} + +unsigned long long +LLDBSBProcessGetProcessID(LLDBSBProcessRef instance) +{ + SBProcess *unwrapped = reinterpret_cast(instance); + return unwrapped->GetProcessID(); +} + +unsigned int +LLDBSBProcessGetUniqueID(LLDBSBProcessRef instance) +{ + SBProcess *unwrapped = reinterpret_cast(instance); + return unwrapped->GetUniqueID(); +} + +unsigned int +LLDBSBProcessGetAddressByteSize(LLDBSBProcessRef instance) +{ + SBProcess *unwrapped = reinterpret_cast(instance); + return unwrapped->GetAddressByteSize(); +} + +LLDBSBErrorRef +LLDBSBProcessDestroy(LLDBSBProcessRef instance) +{ + SBProcess *unwrapped = reinterpret_cast(instance); + return reinterpret_cast(new SBError(unwrapped->Destroy())); +} + +LLDBSBErrorRef +LLDBSBProcessContinue(LLDBSBProcessRef instance) +{ + SBProcess *unwrapped = reinterpret_cast(instance); + return reinterpret_cast(new SBError(unwrapped->Continue())); +} + +LLDBSBErrorRef +LLDBSBProcessStop(LLDBSBProcessRef instance) +{ + SBProcess *unwrapped = reinterpret_cast(instance); + return reinterpret_cast(new SBError(unwrapped->Stop())); +} + +LLDBSBErrorRef +LLDBSBProcessKill(LLDBSBProcessRef instance) +{ + SBProcess *unwrapped = reinterpret_cast(instance); + return reinterpret_cast(new SBError(unwrapped->Kill())); +} + +LLDBSBErrorRef +LLDBSBProcessDetach(LLDBSBProcessRef instance) +{ + SBProcess *unwrapped = reinterpret_cast(instance); + return reinterpret_cast(new SBError(unwrapped->Detach())); +} + +LLDBSBErrorRef +LLDBSBProcessDetach2(LLDBSBProcessRef instance, bool keep_stopped) +{ + SBProcess *unwrapped = reinterpret_cast(instance); + return reinterpret_cast(new SBError(unwrapped->Detach(keep_stopped))); +} + +LLDBSBErrorRef +LLDBSBProcessSignal(LLDBSBProcessRef instance, int signal) +{ + SBProcess *unwrapped = reinterpret_cast(instance); + return reinterpret_cast(new SBError(unwrapped->Signal(signal))); +} + +LLDBSBUnixSignalsRef +LLDBSBProcessGetUnixSignals(LLDBSBProcessRef instance) +{ + SBProcess *unwrapped = reinterpret_cast(instance); + return reinterpret_cast(new SBUnixSignals(unwrapped->GetUnixSignals())); +} + +void +LLDBSBProcessSendAsyncInterrupt(LLDBSBProcessRef instance) +{ + SBProcess *unwrapped = reinterpret_cast(instance); + unwrapped->SendAsyncInterrupt(); +} + +unsigned int +LLDBSBProcessGetStopID(LLDBSBProcessRef instance, bool include_expression_stops) +{ + SBProcess *unwrapped = reinterpret_cast(instance); + return unwrapped->GetStopID(include_expression_stops); +} + +unsigned int +LLDBSBProcessReadMemory(LLDBSBProcessRef instance, lldb::addr_t addr, void *buf, size_t size, LLDBSBErrorRef error) +{ + SBProcess *unwrapped = reinterpret_cast(instance); + return unwrapped->ReadMemory(addr, buf, size, *reinterpret_cast(error)); +} + +unsigned int +LLDBSBProcessWriteMemory(LLDBSBProcessRef instance, lldb::addr_t addr, void *buf, size_t size, LLDBSBErrorRef error) +{ + SBProcess *unwrapped = reinterpret_cast(instance); + return unwrapped->WriteMemory(addr, buf, size, *reinterpret_cast(error)); +} + +unsigned int +LLDBSBProcessReadCStringFromMemory(LLDBSBProcessRef instance, lldb::addr_t addr, void *buf, size_t size, + LLDBSBErrorRef error) +{ + SBProcess *unwrapped = reinterpret_cast(instance); + return unwrapped->ReadCStringFromMemory(addr, buf, size, *reinterpret_cast(error)); +} + +unsigned long long +LLDBSBProcessReadUnsignedFromMemory(LLDBSBProcessRef instance, lldb::addr_t addr, uint32_t byte_size, + LLDBSBErrorRef error) +{ + SBProcess *unwrapped = reinterpret_cast(instance); + return unwrapped->ReadUnsignedFromMemory(addr, byte_size, *reinterpret_cast(error)); +} + +unsigned long long +LLDBSBProcessReadPointerFromMemory(LLDBSBProcessRef instance, lldb::addr_t addr, LLDBSBErrorRef error) +{ + SBProcess *unwrapped = reinterpret_cast(instance); + return unwrapped->ReadPointerFromMemory(addr, *reinterpret_cast(error)); +} + +LLDBStateType +LLDBSBProcessGetStateFromEvent(LLDBSBEventRef event) +{ + return lldb::SBProcess::GetStateFromEvent(*reinterpret_cast(event)); +} + +bool +LLDBSBProcessGetRestartedFromEvent(LLDBSBEventRef event) +{ + return lldb::SBProcess::GetRestartedFromEvent(*reinterpret_cast(event)); +} + +unsigned int +LLDBSBProcessGetNumRestartedReasonsFromEvent(LLDBSBEventRef event) +{ + return lldb::SBProcess::GetNumRestartedReasonsFromEvent(*reinterpret_cast(event)); +} + +const char * +LLDBSBProcessGetRestartedReasonAtIndexFromEvent(LLDBSBEventRef event, size_t idx) +{ + return lldb::SBProcess::GetRestartedReasonAtIndexFromEvent(*reinterpret_cast(event), idx); +} + +LLDBSBProcessRef +LLDBSBProcessGetProcessFromEvent(LLDBSBEventRef event) +{ + return reinterpret_cast( + new SBProcess(lldb::SBProcess::GetProcessFromEvent(*reinterpret_cast(event)))); +} + +bool +LLDBSBProcessEventIsProcessEvent(LLDBSBEventRef event) +{ + return lldb::SBProcess::EventIsProcessEvent(*reinterpret_cast(event)); +} + +LLDBSBBroadcasterRef +LLDBSBProcessGetBroadcaster(LLDBSBProcessRef instance) +{ + SBProcess *unwrapped = reinterpret_cast(instance); + return reinterpret_cast(new SBBroadcaster(unwrapped->GetBroadcaster())); +} + +const char * +LLDBSBProcessGetBroadcasterClass() +{ + return lldb::SBProcess::GetBroadcasterClass(); +} + +bool +LLDBSBProcessGetDescription(LLDBSBProcessRef instance, LLDBSBStreamRef description) +{ + SBProcess *unwrapped = reinterpret_cast(instance); + return unwrapped->GetDescription(*reinterpret_cast(description)); +} + +unsigned int +LLDBSBProcessGetNumSupportedHardwareWatchpoints(LLDBSBProcessRef instance, LLDBSBErrorRef error) +{ + SBProcess *unwrapped = reinterpret_cast(instance); + return unwrapped->GetNumSupportedHardwareWatchpoints(*reinterpret_cast(error)); +} + +unsigned int +LLDBSBProcessLoadImage(LLDBSBProcessRef instance, LLDBSBFileSpecRef image_spec, LLDBSBErrorRef error) +{ + SBProcess *unwrapped = reinterpret_cast(instance); + return unwrapped->LoadImage(*reinterpret_cast(image_spec), *reinterpret_cast(error)); +} + +LLDBSBErrorRef +LLDBSBProcessUnloadImage(LLDBSBProcessRef instance, uint32_t image_token) +{ + SBProcess *unwrapped = reinterpret_cast(instance); + return reinterpret_cast(new SBError(unwrapped->UnloadImage(image_token))); +} + +LLDBSBErrorRef +LLDBSBProcessSendEventData(LLDBSBProcessRef instance, const char *data) +{ + SBProcess *unwrapped = reinterpret_cast(instance); + return reinterpret_cast(new SBError(unwrapped->SendEventData(data))); +} + +unsigned int +LLDBSBProcessGetNumExtendedBacktraceTypes(LLDBSBProcessRef instance) +{ + SBProcess *unwrapped = reinterpret_cast(instance); + return unwrapped->GetNumExtendedBacktraceTypes(); +} + +const char * +LLDBSBProcessGetExtendedBacktraceTypeAtIndex(LLDBSBProcessRef instance, uint32_t idx) +{ + SBProcess *unwrapped = reinterpret_cast(instance); + return unwrapped->GetExtendedBacktraceTypeAtIndex(idx); +} + +LLDBSBThreadCollectionRef +LLDBSBProcessGetHistoryThreads(LLDBSBProcessRef instance, lldb::addr_t addr) +{ + SBProcess *unwrapped = reinterpret_cast(instance); + return reinterpret_cast(new SBThreadCollection(unwrapped->GetHistoryThreads(addr))); +} + +bool +LLDBSBProcessIsInstrumentationRuntimePresent(LLDBSBProcessRef instance, enum lldb::InstrumentationRuntimeType type) +{ + SBProcess *unwrapped = reinterpret_cast(instance); + return unwrapped->IsInstrumentationRuntimePresent(type); +} + +#ifdef __cplusplus +} +#endif Index: source/API/Bindings/SBQueueBinding.cpp =================================================================== --- source/API/Bindings/SBQueueBinding.cpp +++ source/API/Bindings/SBQueueBinding.cpp @@ -0,0 +1,117 @@ +//===-- SBQueueBinding.cpp --------------------------------------*- C++ -*-===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +#include "lldb/Bindings/LLDBBinding.h" +#include "lldb/API/LLDB.h" + +using namespace lldb; + +#ifdef __cplusplus +extern "C" { +#endif + +LLDBSBQueueRef +LLDBCreateSBQueue() +{ + return reinterpret_cast(new SBQueue()); +} + +void +LLDBDisposeSBQueue(LLDBSBQueueRef instance) +{ + delete reinterpret_cast(instance); +} + +bool +LLDBSBQueueIsValid(LLDBSBQueueRef instance) +{ + SBQueue *unwrapped = reinterpret_cast(instance); + return unwrapped->IsValid(); +} + +void +LLDBSBQueueClear(LLDBSBQueueRef instance) +{ + SBQueue *unwrapped = reinterpret_cast(instance); + unwrapped->Clear(); +} + +LLDBSBProcessRef +LLDBSBQueueGetProcess(LLDBSBQueueRef instance) +{ + SBQueue *unwrapped = reinterpret_cast(instance); + return reinterpret_cast(new SBProcess(unwrapped->GetProcess())); +} + +unsigned long long +LLDBSBQueueGetQueueID(LLDBSBQueueRef instance) +{ + SBQueue *unwrapped = reinterpret_cast(instance); + return unwrapped->GetQueueID(); +} + +const char * +LLDBSBQueueGetName(LLDBSBQueueRef instance) +{ + SBQueue *unwrapped = reinterpret_cast(instance); + return unwrapped->GetName(); +} + +unsigned int +LLDBSBQueueGetIndexID(LLDBSBQueueRef instance) +{ + SBQueue *unwrapped = reinterpret_cast(instance); + return unwrapped->GetIndexID(); +} + +unsigned int +LLDBSBQueueGetNumThreads(LLDBSBQueueRef instance) +{ + SBQueue *unwrapped = reinterpret_cast(instance); + return unwrapped->GetNumThreads(); +} + +LLDBSBThreadRef +LLDBSBQueueGetThreadAtIndex(LLDBSBQueueRef instance, uint32_t var0) +{ + SBQueue *unwrapped = reinterpret_cast(instance); + return reinterpret_cast(new SBThread(unwrapped->GetThreadAtIndex(var0))); +} + +unsigned int +LLDBSBQueueGetNumPendingItems(LLDBSBQueueRef instance) +{ + SBQueue *unwrapped = reinterpret_cast(instance); + return unwrapped->GetNumPendingItems(); +} + +LLDBSBQueueItemRef +LLDBSBQueueGetPendingItemAtIndex(LLDBSBQueueRef instance, uint32_t var0) +{ + SBQueue *unwrapped = reinterpret_cast(instance); + return reinterpret_cast(new SBQueueItem(unwrapped->GetPendingItemAtIndex(var0))); +} + +unsigned int +LLDBSBQueueGetNumRunningItems(LLDBSBQueueRef instance) +{ + SBQueue *unwrapped = reinterpret_cast(instance); + return unwrapped->GetNumRunningItems(); +} + +enum lldb::QueueKind +LLDBSBQueueGetKind(LLDBSBQueueRef instance) +{ + SBQueue *unwrapped = reinterpret_cast(instance); + return unwrapped->GetKind(); +} + +#ifdef __cplusplus +} +#endif Index: source/API/Bindings/SBQueueItemBinding.cpp =================================================================== --- source/API/Bindings/SBQueueItemBinding.cpp +++ source/API/Bindings/SBQueueItemBinding.cpp @@ -0,0 +1,82 @@ +//===-- SBQueueItemBinding.cpp ----------------------------------*- C++ -*-===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +#include "lldb/Bindings/LLDBBinding.h" +#include "lldb/API/LLDB.h" + +using namespace lldb; + +#ifdef __cplusplus +extern "C" { +#endif + +LLDBSBQueueItemRef +LLDBCreateSBQueueItem() +{ + return reinterpret_cast(new SBQueueItem()); +} + +void +LLDBDisposeSBQueueItem(LLDBSBQueueItemRef instance) +{ + delete reinterpret_cast(instance); +} + +bool +LLDBSBQueueItemIsValid(LLDBSBQueueItemRef instance) +{ + SBQueueItem *unwrapped = reinterpret_cast(instance); + return unwrapped->IsValid(); +} + +void +LLDBSBQueueItemClear(LLDBSBQueueItemRef instance) +{ + SBQueueItem *unwrapped = reinterpret_cast(instance); + unwrapped->Clear(); +} + +enum lldb::QueueItemKind +LLDBSBQueueItemGetKind(LLDBSBQueueItemRef instance) +{ + SBQueueItem *unwrapped = reinterpret_cast(instance); + return unwrapped->GetKind(); +} + +void +LLDBSBQueueItemSetKind(LLDBSBQueueItemRef instance, lldb::QueueItemKind kind) +{ + SBQueueItem *unwrapped = reinterpret_cast(instance); + unwrapped->SetKind(kind); +} + +LLDBSBAddressRef +LLDBSBQueueItemGetAddress(LLDBSBQueueItemRef instance) +{ + SBQueueItem *unwrapped = reinterpret_cast(instance); + return reinterpret_cast(new SBAddress(unwrapped->GetAddress())); +} + +void +LLDBSBQueueItemSetAddress(LLDBSBQueueItemRef instance, LLDBSBAddressRef addr) +{ + SBQueueItem *unwrapped = reinterpret_cast(instance); + unwrapped->SetAddress(*reinterpret_cast(addr)); +} + +LLDBSBThreadRef +LLDBSBQueueItemGetExtendedBacktraceThread(LLDBSBQueueItemRef instance, const char *type) +{ + SBQueueItem *unwrapped = reinterpret_cast(instance); + return reinterpret_cast(new SBThread(unwrapped->GetExtendedBacktraceThread(type))); +} + +#ifdef __cplusplus +} +#endif Index: source/API/Bindings/SBSectionBinding.cpp =================================================================== --- source/API/Bindings/SBSectionBinding.cpp +++ source/API/Bindings/SBSectionBinding.cpp @@ -0,0 +1,145 @@ +//===-- SBSectionBinding.cpp ------------------------------------*- C++ -*-===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +#include "lldb/Bindings/LLDBBinding.h" +#include "lldb/API/LLDB.h" + +using namespace lldb; + +#ifdef __cplusplus +extern "C" { +#endif + +LLDBSBSectionRef +LLDBCreateSBSection() +{ + return reinterpret_cast(new SBSection()); +} + +void +LLDBDisposeSBSection(LLDBSBSectionRef instance) +{ + delete reinterpret_cast(instance); +} + +bool +LLDBSBSectionIsValid(LLDBSBSectionRef instance) +{ + SBSection *unwrapped = reinterpret_cast(instance); + return unwrapped->IsValid(); +} + +const char * +LLDBSBSectionGetName(LLDBSBSectionRef instance) +{ + SBSection *unwrapped = reinterpret_cast(instance); + return unwrapped->GetName(); +} + +LLDBSBSectionRef +LLDBSBSectionGetParent(LLDBSBSectionRef instance) +{ + SBSection *unwrapped = reinterpret_cast(instance); + return reinterpret_cast(new SBSection(unwrapped->GetParent())); +} + +LLDBSBSectionRef +LLDBSBSectionFindSubSection(LLDBSBSectionRef instance, const char *sect_name) +{ + SBSection *unwrapped = reinterpret_cast(instance); + return reinterpret_cast(new SBSection(unwrapped->FindSubSection(sect_name))); +} + +unsigned int +LLDBSBSectionGetNumSubSections(LLDBSBSectionRef instance) +{ + SBSection *unwrapped = reinterpret_cast(instance); + return unwrapped->GetNumSubSections(); +} + +LLDBSBSectionRef +LLDBSBSectionGetSubSectionAtIndex(LLDBSBSectionRef instance, size_t idx) +{ + SBSection *unwrapped = reinterpret_cast(instance); + return reinterpret_cast(new SBSection(unwrapped->GetSubSectionAtIndex(idx))); +} + +unsigned long long +LLDBSBSectionGetFileAddress(LLDBSBSectionRef instance) +{ + SBSection *unwrapped = reinterpret_cast(instance); + return unwrapped->GetFileAddress(); +} + +unsigned long long +LLDBSBSectionGetLoadAddress(LLDBSBSectionRef instance, LLDBSBTargetRef target) +{ + SBSection *unwrapped = reinterpret_cast(instance); + return unwrapped->GetLoadAddress(*reinterpret_cast(target)); +} + +unsigned long long +LLDBSBSectionGetByteSize(LLDBSBSectionRef instance) +{ + SBSection *unwrapped = reinterpret_cast(instance); + return unwrapped->GetByteSize(); +} + +unsigned long long +LLDBSBSectionGetFileOffset(LLDBSBSectionRef instance) +{ + SBSection *unwrapped = reinterpret_cast(instance); + return unwrapped->GetFileOffset(); +} + +unsigned long long +LLDBSBSectionGetFileByteSize(LLDBSBSectionRef instance) +{ + SBSection *unwrapped = reinterpret_cast(instance); + return unwrapped->GetFileByteSize(); +} + +LLDBSBDataRef +LLDBSBSectionGetSectionData(LLDBSBSectionRef instance) +{ + SBSection *unwrapped = reinterpret_cast(instance); + return reinterpret_cast(new SBData(unwrapped->GetSectionData())); +} + +LLDBSBDataRef +LLDBSBSectionGetSectionData2(LLDBSBSectionRef instance, uint64_t offset, uint64_t size) +{ + SBSection *unwrapped = reinterpret_cast(instance); + return reinterpret_cast(new SBData(unwrapped->GetSectionData(offset, size))); +} + +enum lldb::SectionType +LLDBSBSectionGetSectionType(LLDBSBSectionRef instance) +{ + SBSection *unwrapped = reinterpret_cast(instance); + return unwrapped->GetSectionType(); +} + +unsigned int +LLDBSBSectionGetTargetByteSize(LLDBSBSectionRef instance) +{ + SBSection *unwrapped = reinterpret_cast(instance); + return unwrapped->GetTargetByteSize(); +} + +bool +LLDBSBSectionGetDescription(LLDBSBSectionRef instance, LLDBSBStreamRef description) +{ + SBSection *unwrapped = reinterpret_cast(instance); + return unwrapped->GetDescription(*reinterpret_cast(description)); +} + +#ifdef __cplusplus +} +#endif Index: source/API/Bindings/SBSourceManagerBinding.cpp =================================================================== --- source/API/Bindings/SBSourceManagerBinding.cpp +++ source/API/Bindings/SBSourceManagerBinding.cpp @@ -0,0 +1,50 @@ +//===-- SBSourceManagerBinding.cpp ------------------------------*- C++ -*-===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +#include "lldb/Bindings/LLDBBinding.h" +#include "lldb/API/LLDB.h" + +using namespace lldb; + +#ifdef __cplusplus +extern "C" { +#endif + +LLDBSBSourceManagerRef +LLDBCreateSBSourceManager(LLDBSBDebuggerRef debugger) +{ + return reinterpret_cast(new SBSourceManager(*reinterpret_cast(debugger))); +} + +LLDBSBSourceManagerRef +LLDBCreateSBSourceManager2(LLDBSBTargetRef target) +{ + return reinterpret_cast(new SBSourceManager(*reinterpret_cast(target))); +} + +void +LLDBDisposeSBSourceManager(LLDBSBSourceManagerRef instance) +{ + delete reinterpret_cast(instance); +} + +unsigned int +LLDBSBSourceManagerDisplaySourceLinesWithLineNumbers(LLDBSBSourceManagerRef instance, LLDBSBFileSpecRef file, + uint32_t line, uint32_t context_before, uint32_t context_after, + const char *current_line_cstr, LLDBSBStreamRef s) +{ + SBSourceManager *unwrapped = reinterpret_cast(instance); + return unwrapped->DisplaySourceLinesWithLineNumbers(*reinterpret_cast(file), line, context_before, + context_after, current_line_cstr, + *reinterpret_cast(s)); +} + +#ifdef __cplusplus +} +#endif Index: source/API/Bindings/SBStreamBinding.cpp =================================================================== --- source/API/Bindings/SBStreamBinding.cpp +++ source/API/Bindings/SBStreamBinding.cpp @@ -0,0 +1,96 @@ +//===-- SBStreamBinding.cpp -------------------------------------*- C++ -*-===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +#include "lldb/Bindings/LLDBBinding.h" +#include "lldb/API/LLDB.h" +#include "stdarg.h" + +using namespace lldb; + +#ifdef __cplusplus +extern "C" { +#endif + +LLDBSBStreamRef +LLDBCreateSBStream() +{ + return reinterpret_cast(new SBStream()); +} + +void +LLDBDisposeSBStream(LLDBSBStreamRef instance) +{ + delete reinterpret_cast(instance); +} + +bool +LLDBSBStreamIsValid(LLDBSBStreamRef instance) +{ + SBStream *unwrapped = reinterpret_cast(instance); + return unwrapped->IsValid(); +} + +const char * +LLDBSBStreamGetData(LLDBSBStreamRef instance) +{ + SBStream *unwrapped = reinterpret_cast(instance); + return unwrapped->GetData(); +} + +unsigned int +LLDBSBStreamGetSize(LLDBSBStreamRef instance) +{ + SBStream *unwrapped = reinterpret_cast(instance); + return unwrapped->GetSize(); +} + +void +LLDBSBStreamPrintf(LLDBSBStreamRef instance, const char *format, ...) +{ + if (!format) + return; + + SBStream *unwrapped = reinterpret_cast(instance); + va_list args; + va_start(args, format); + unwrapped->Printf(format, args); + va_end(args); +} + +void +LLDBSBStreamRedirectToFile(LLDBSBStreamRef instance, const char *path, bool append) +{ + SBStream *unwrapped = reinterpret_cast(instance); + unwrapped->RedirectToFile(path, append); +} + +void +LLDBSBStreamRedirectToFileHandle(LLDBSBStreamRef instance, FILE *fh, bool transfer_fh_ownership) +{ + SBStream *unwrapped = reinterpret_cast(instance); + unwrapped->RedirectToFileHandle(reinterpret_cast(fh), transfer_fh_ownership); +} + +void +LLDBSBStreamRedirectToFileDescriptor(LLDBSBStreamRef instance, int fd, bool transfer_fh_ownership) +{ + SBStream *unwrapped = reinterpret_cast(instance); + unwrapped->RedirectToFileDescriptor(fd, transfer_fh_ownership); +} + +void +LLDBSBStreamClear(LLDBSBStreamRef instance) +{ + SBStream *unwrapped = reinterpret_cast(instance); + unwrapped->Clear(); +} + +#ifdef __cplusplus +} +#endif Index: source/API/Bindings/SBStringListBinding.cpp =================================================================== --- source/API/Bindings/SBStringListBinding.cpp +++ source/API/Bindings/SBStringListBinding.cpp @@ -0,0 +1,82 @@ +//===-- SBStringListBinding.cpp ---------------------------------*- C++ -*-===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +#include "lldb/Bindings/LLDBBinding.h" +#include "lldb/API/LLDB.h" + +using namespace lldb; + +#ifdef __cplusplus +extern "C" { +#endif + +LLDBSBStringListRef +LLDBCreateSBStringList() +{ + return reinterpret_cast(new SBStringList()); +} + +void +LLDBDisposeSBStringList(LLDBSBStringListRef instance) +{ + delete reinterpret_cast(instance); +} + +bool +LLDBSBStringListIsValid(LLDBSBStringListRef instance) +{ + SBStringList *unwrapped = reinterpret_cast(instance); + return unwrapped->IsValid(); +} + +void +LLDBSBStringListAppendString(LLDBSBStringListRef instance, const char *str) +{ + SBStringList *unwrapped = reinterpret_cast(instance); + unwrapped->AppendString(str); +} + +void +LLDBSBStringListAppendList(LLDBSBStringListRef instance, const char **strv, int strc) +{ + SBStringList *unwrapped = reinterpret_cast(instance); + unwrapped->AppendList(strv, strc); +} + +void +LLDBSBStringListAppendList2(LLDBSBStringListRef instance, LLDBSBStringListRef strings) +{ + SBStringList *unwrapped = reinterpret_cast(instance); + unwrapped->AppendList(*reinterpret_cast(strings)); +} + +unsigned int +LLDBSBStringListGetSize(LLDBSBStringListRef instance) +{ + SBStringList *unwrapped = reinterpret_cast(instance); + return unwrapped->GetSize(); +} + +const char * +LLDBSBStringListGetStringAtIndex(LLDBSBStringListRef instance, size_t idx) +{ + SBStringList *unwrapped = reinterpret_cast(instance); + return unwrapped->GetStringAtIndex(idx); +} + +void +LLDBSBStringListClear(LLDBSBStringListRef instance) +{ + SBStringList *unwrapped = reinterpret_cast(instance); + unwrapped->Clear(); +} + +#ifdef __cplusplus +} +#endif Index: source/API/Bindings/SBSymbolBinding.cpp =================================================================== --- source/API/Bindings/SBSymbolBinding.cpp +++ source/API/Bindings/SBSymbolBinding.cpp @@ -0,0 +1,119 @@ +//===-- SBSymbolBinding.cpp -------------------------------------*- C++ -*-===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +#include "lldb/Bindings/LLDBBinding.h" +#include "lldb/API/LLDB.h" + +using namespace lldb; + +#ifdef __cplusplus +extern "C" { +#endif + +LLDBSBSymbolRef +LLDBCreateSBSymbol() +{ + return reinterpret_cast(new SBSymbol()); +} + +void +LLDBDisposeSBSymbol(LLDBSBSymbolRef instance) +{ + delete reinterpret_cast(instance); +} + +bool +LLDBSBSymbolIsValid(LLDBSBSymbolRef instance) +{ + SBSymbol *unwrapped = reinterpret_cast(instance); + return unwrapped->IsValid(); +} + +const char * +LLDBSBSymbolGetName(LLDBSBSymbolRef instance) +{ + SBSymbol *unwrapped = reinterpret_cast(instance); + return unwrapped->GetName(); +} + +const char * +LLDBSBSymbolGetMangledName(LLDBSBSymbolRef instance) +{ + SBSymbol *unwrapped = reinterpret_cast(instance); + return unwrapped->GetMangledName(); +} + +LLDBSBInstructionListRef +LLDBSBSymbolGetInstructions(LLDBSBSymbolRef instance, LLDBSBTargetRef target) +{ + SBSymbol *unwrapped = reinterpret_cast(instance); + return reinterpret_cast( + new SBInstructionList(unwrapped->GetInstructions(*reinterpret_cast(target)))); +} + +LLDBSBInstructionListRef +LLDBSBSymbolGetInstructions2(LLDBSBSymbolRef instance, LLDBSBTargetRef target, const char *flavor_string) +{ + SBSymbol *unwrapped = reinterpret_cast(instance); + return reinterpret_cast( + new SBInstructionList(unwrapped->GetInstructions(*reinterpret_cast(target), flavor_string))); +} + +LLDBSBAddressRef +LLDBSBSymbolGetStartAddress(LLDBSBSymbolRef instance) +{ + SBSymbol *unwrapped = reinterpret_cast(instance); + return reinterpret_cast(new SBAddress(unwrapped->GetStartAddress())); +} + +LLDBSBAddressRef +LLDBSBSymbolGetEndAddress(LLDBSBSymbolRef instance) +{ + SBSymbol *unwrapped = reinterpret_cast(instance); + return reinterpret_cast(new SBAddress(unwrapped->GetEndAddress())); +} + +unsigned int +LLDBSBSymbolGetPrologueByteSize(LLDBSBSymbolRef instance) +{ + SBSymbol *unwrapped = reinterpret_cast(instance); + return unwrapped->GetPrologueByteSize(); +} + +enum lldb::SymbolType +LLDBSBSymbolGetType(LLDBSBSymbolRef instance) +{ + SBSymbol *unwrapped = reinterpret_cast(instance); + return unwrapped->GetType(); +} + +bool +LLDBSBSymbolGetDescription(LLDBSBSymbolRef instance, LLDBSBStreamRef description) +{ + SBSymbol *unwrapped = reinterpret_cast(instance); + return unwrapped->GetDescription(*reinterpret_cast(description)); +} + +bool +LLDBSBSymbolIsExternal(LLDBSBSymbolRef instance) +{ + SBSymbol *unwrapped = reinterpret_cast(instance); + return unwrapped->IsExternal(); +} + +bool +LLDBSBSymbolIsSynthetic(LLDBSBSymbolRef instance) +{ + SBSymbol *unwrapped = reinterpret_cast(instance); + return unwrapped->IsSynthetic(); +} + +#ifdef __cplusplus +} +#endif Index: source/API/Bindings/SBSymbolContextBinding.cpp =================================================================== --- source/API/Bindings/SBSymbolContextBinding.cpp +++ source/API/Bindings/SBSymbolContextBinding.cpp @@ -0,0 +1,140 @@ +//===-- SBSymbolContextBinding.cpp ------------------------------*- C++ -*-===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +#include "lldb/Bindings/LLDBBinding.h" +#include "lldb/API/LLDB.h" + +using namespace lldb; + +#ifdef __cplusplus +extern "C" { +#endif + +LLDBSBSymbolContextRef +LLDBCreateSBSymbolContext() +{ + return reinterpret_cast(new SBSymbolContext()); +} + +void +LLDBDisposeSBSymbolContext(LLDBSBSymbolContextRef instance) +{ + delete reinterpret_cast(instance); +} + +bool +LLDBSBSymbolContextIsValid(LLDBSBSymbolContextRef instance) +{ + SBSymbolContext *unwrapped = reinterpret_cast(instance); + return unwrapped->IsValid(); +} + +LLDBSBModuleRef +LLDBSBSymbolContextGetModule(LLDBSBSymbolContextRef instance) +{ + SBSymbolContext *unwrapped = reinterpret_cast(instance); + return reinterpret_cast(new SBModule(unwrapped->GetModule())); +} + +LLDBSBCompileUnitRef +LLDBSBSymbolContextGetCompileUnit(LLDBSBSymbolContextRef instance) +{ + SBSymbolContext *unwrapped = reinterpret_cast(instance); + return reinterpret_cast(new SBCompileUnit(unwrapped->GetCompileUnit())); +} + +LLDBSBFunctionRef +LLDBSBSymbolContextGetFunction(LLDBSBSymbolContextRef instance) +{ + SBSymbolContext *unwrapped = reinterpret_cast(instance); + return reinterpret_cast(new SBFunction(unwrapped->GetFunction())); +} + +LLDBSBBlockRef +LLDBSBSymbolContextGetBlock(LLDBSBSymbolContextRef instance) +{ + SBSymbolContext *unwrapped = reinterpret_cast(instance); + return reinterpret_cast(new SBBlock(unwrapped->GetBlock())); +} + +LLDBSBLineEntryRef +LLDBSBSymbolContextGetLineEntry(LLDBSBSymbolContextRef instance) +{ + SBSymbolContext *unwrapped = reinterpret_cast(instance); + return reinterpret_cast(new SBLineEntry(unwrapped->GetLineEntry())); +} + +LLDBSBSymbolRef +LLDBSBSymbolContextGetSymbol(LLDBSBSymbolContextRef instance) +{ + SBSymbolContext *unwrapped = reinterpret_cast(instance); + return reinterpret_cast(new SBSymbol(unwrapped->GetSymbol())); +} + +void +LLDBSBSymbolContextSetModule(LLDBSBSymbolContextRef instance, LLDBSBModuleRef module) +{ + SBSymbolContext *unwrapped = reinterpret_cast(instance); + unwrapped->SetModule(*reinterpret_cast(module)); +} + +void +LLDBSBSymbolContextSetCompileUnit(LLDBSBSymbolContextRef instance, LLDBSBCompileUnitRef compile_unit) +{ + SBSymbolContext *unwrapped = reinterpret_cast(instance); + unwrapped->SetCompileUnit(*reinterpret_cast(compile_unit)); +} + +void +LLDBSBSymbolContextSetFunction(LLDBSBSymbolContextRef instance, LLDBSBFunctionRef function) +{ + SBSymbolContext *unwrapped = reinterpret_cast(instance); + unwrapped->SetFunction(*reinterpret_cast(function)); +} + +void +LLDBSBSymbolContextSetBlock(LLDBSBSymbolContextRef instance, LLDBSBBlockRef block) +{ + SBSymbolContext *unwrapped = reinterpret_cast(instance); + unwrapped->SetBlock(*reinterpret_cast(block)); +} + +void +LLDBSBSymbolContextSetLineEntry(LLDBSBSymbolContextRef instance, LLDBSBLineEntryRef line_entry) +{ + SBSymbolContext *unwrapped = reinterpret_cast(instance); + unwrapped->SetLineEntry(*reinterpret_cast(line_entry)); +} + +void +LLDBSBSymbolContextSetSymbol(LLDBSBSymbolContextRef instance, LLDBSBSymbolRef symbol) +{ + SBSymbolContext *unwrapped = reinterpret_cast(instance); + unwrapped->SetSymbol(*reinterpret_cast(symbol)); +} + +LLDBSBSymbolContextRef +LLDBSBSymbolContextGetParentOfInlinedScope(LLDBSBSymbolContextRef instance, LLDBSBAddressRef curr_frame_pc, + LLDBSBAddressRef parent_frame_addr) +{ + SBSymbolContext *unwrapped = reinterpret_cast(instance); + return reinterpret_cast(new SBSymbolContext(unwrapped->GetParentOfInlinedScope( + *reinterpret_cast(curr_frame_pc), *reinterpret_cast(parent_frame_addr)))); +} + +bool +LLDBSBSymbolContextGetDescription(LLDBSBSymbolContextRef instance, LLDBSBStreamRef description) +{ + SBSymbolContext *unwrapped = reinterpret_cast(instance); + return unwrapped->GetDescription(*reinterpret_cast(description)); +} + +#ifdef __cplusplus +} +#endif Index: source/API/Bindings/SBSymbolContextListBinding.cpp =================================================================== --- source/API/Bindings/SBSymbolContextListBinding.cpp +++ source/API/Bindings/SBSymbolContextListBinding.cpp @@ -0,0 +1,82 @@ +//===-- SBSymbolContextListBinding.cpp --------------------------*- C++ -*-===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +#include "lldb/Bindings/LLDBBinding.h" +#include "lldb/API/LLDB.h" + +using namespace lldb; + +#ifdef __cplusplus +extern "C" { +#endif + +LLDBSBSymbolContextListRef +LLDBCreateSBSymbolContextList() +{ + return reinterpret_cast(new SBSymbolContextList()); +} + +void +LLDBDisposeSBSymbolContextList(LLDBSBSymbolContextListRef instance) +{ + delete reinterpret_cast(instance); +} + +bool +LLDBSBSymbolContextListIsValid(LLDBSBSymbolContextListRef instance) +{ + SBSymbolContextList *unwrapped = reinterpret_cast(instance); + return unwrapped->IsValid(); +} + +unsigned int +LLDBSBSymbolContextListGetSize(LLDBSBSymbolContextListRef instance) +{ + SBSymbolContextList *unwrapped = reinterpret_cast(instance); + return unwrapped->GetSize(); +} + +LLDBSBSymbolContextRef +LLDBSBSymbolContextListGetContextAtIndex(LLDBSBSymbolContextListRef instance, uint32_t idx) +{ + SBSymbolContextList *unwrapped = reinterpret_cast(instance); + return reinterpret_cast(new SBSymbolContext(unwrapped->GetContextAtIndex(idx))); +} + +bool +LLDBSBSymbolContextListGetDescription(LLDBSBSymbolContextListRef instance, LLDBSBStreamRef description) +{ + SBSymbolContextList *unwrapped = reinterpret_cast(instance); + return unwrapped->GetDescription(*reinterpret_cast(description)); +} + +void +LLDBSBSymbolContextListAppend(LLDBSBSymbolContextListRef instance, LLDBSBSymbolContextRef sc) +{ + SBSymbolContextList *unwrapped = reinterpret_cast(instance); + unwrapped->Append(*reinterpret_cast(sc)); +} + +void +LLDBSBSymbolContextListAppend2(LLDBSBSymbolContextListRef instance, LLDBSBSymbolContextListRef sc_list) +{ + SBSymbolContextList *unwrapped = reinterpret_cast(instance); + unwrapped->Append(*reinterpret_cast(sc_list)); +} + +void +LLDBSBSymbolContextListClear(LLDBSBSymbolContextListRef instance) +{ + SBSymbolContextList *unwrapped = reinterpret_cast(instance); + unwrapped->Clear(); +} + +#ifdef __cplusplus +} +#endif Index: source/API/Bindings/SBTargetBinding.cpp =================================================================== --- source/API/Bindings/SBTargetBinding.cpp +++ source/API/Bindings/SBTargetBinding.cpp @@ -0,0 +1,752 @@ +//===-- SBTargetBinding.cpp -------------------------------------*- C++ -*-===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +#include "lldb/Bindings/LLDBBinding.h" +#include "lldb/API/LLDB.h" + +using namespace lldb; + +#ifdef __cplusplus +extern "C" { +#endif + +LLDBSBTargetRef +LLDBCreateSBTarget() +{ + return reinterpret_cast(new SBTarget()); +} + +void +LLDBDisposeSBTarget(LLDBSBTargetRef instance) +{ + delete reinterpret_cast(instance); +} + +bool +LLDBSBTargetIsValid(LLDBSBTargetRef instance) +{ + SBTarget *unwrapped = reinterpret_cast(instance); + return unwrapped->IsValid(); +} + +bool +LLDBSBTargetEventIsTargetEvent(LLDBSBEventRef event) +{ + return lldb::SBTarget::EventIsTargetEvent(*reinterpret_cast(event)); +} + +LLDBSBTargetRef +LLDBSBTargetGetTargetFromEvent(LLDBSBEventRef event) +{ + return reinterpret_cast( + new SBTarget(lldb::SBTarget::GetTargetFromEvent(*reinterpret_cast(event)))); +} + +unsigned int +LLDBSBTargetGetNumModulesFromEvent(LLDBSBEventRef event) +{ + return lldb::SBTarget::GetNumModulesFromEvent(*reinterpret_cast(event)); +} + +LLDBSBModuleRef +LLDBSBTargetGetModuleAtIndexFromEvent(const uint32_t idx, LLDBSBEventRef event) +{ + return reinterpret_cast( + new SBModule(lldb::SBTarget::GetModuleAtIndexFromEvent(idx, *reinterpret_cast(event)))); +} + +const char * +LLDBSBTargetGetBroadcasterClassName() +{ + return lldb::SBTarget::GetBroadcasterClassName(); +} + +LLDBSBProcessRef +LLDBSBTargetGetProcess(LLDBSBTargetRef instance) +{ + SBTarget *unwrapped = reinterpret_cast(instance); + return reinterpret_cast(new SBProcess(unwrapped->GetProcess())); +} + +LLDBSBPlatformRef +LLDBSBTargetGetPlatform(LLDBSBTargetRef instance) +{ + SBTarget *unwrapped = reinterpret_cast(instance); + return reinterpret_cast(new SBPlatform(unwrapped->GetPlatform())); +} + +LLDBSBErrorRef +LLDBSBTargetInstall(LLDBSBTargetRef instance) +{ + SBTarget *unwrapped = reinterpret_cast(instance); + return reinterpret_cast(new SBError(unwrapped->Install())); +} + +LLDBSBProcessRef +LLDBSBTargetLaunch(LLDBSBTargetRef instance, LLDBSBListenerRef listener, const char **argv, const char **envp, + const char *stdin_path, const char *stdout_path, const char *stderr_path, + const char *working_directory, uint32_t launch_flags, bool stop_at_entry, LLDBSBErrorRef error) +{ + SBTarget *unwrapped = reinterpret_cast(instance); + return reinterpret_cast(new SBProcess( + unwrapped->Launch(*reinterpret_cast(listener), argv, envp, stdin_path, stdout_path, stderr_path, + working_directory, launch_flags, stop_at_entry, *reinterpret_cast(error)))); +} + +LLDBSBProcessRef +LLDBSBTargetLaunchSimple(LLDBSBTargetRef instance, const char **argv, const char **envp, const char *working_directory) +{ + SBTarget *unwrapped = reinterpret_cast(instance); + return reinterpret_cast(new SBProcess(unwrapped->LaunchSimple(argv, envp, working_directory))); +} + +LLDBSBProcessRef +LLDBSBTargetLaunch2(LLDBSBTargetRef instance, LLDBSBLaunchInfoRef launch_info, LLDBSBErrorRef error) +{ + SBTarget *unwrapped = reinterpret_cast(instance); + return reinterpret_cast(new SBProcess( + unwrapped->Launch(*reinterpret_cast(launch_info), *reinterpret_cast(error)))); +} + +LLDBSBProcessRef +LLDBSBTargetLoadCore(LLDBSBTargetRef instance, const char *core_file) +{ + SBTarget *unwrapped = reinterpret_cast(instance); + return reinterpret_cast(new SBProcess(unwrapped->LoadCore(core_file))); +} + +LLDBSBProcessRef +LLDBSBTargetAttach(LLDBSBTargetRef instance, LLDBSBAttachInfoRef attach_info, LLDBSBErrorRef error) +{ + SBTarget *unwrapped = reinterpret_cast(instance); + return reinterpret_cast(new SBProcess( + unwrapped->Attach(*reinterpret_cast(attach_info), *reinterpret_cast(error)))); +} + +LLDBSBProcessRef +LLDBSBTargetAttachToProcessWithID(LLDBSBTargetRef instance, LLDBSBListenerRef listener, lldb::pid_t pid, + LLDBSBErrorRef error) +{ + SBTarget *unwrapped = reinterpret_cast(instance); + return reinterpret_cast(new SBProcess(unwrapped->AttachToProcessWithID( + *reinterpret_cast(listener), pid, *reinterpret_cast(error)))); +} + +LLDBSBProcessRef +LLDBSBTargetAttachToProcessWithName(LLDBSBTargetRef instance, LLDBSBListenerRef listener, const char *name, + bool wait_for, LLDBSBErrorRef error) +{ + SBTarget *unwrapped = reinterpret_cast(instance); + return reinterpret_cast(new SBProcess(unwrapped->AttachToProcessWithName( + *reinterpret_cast(listener), name, wait_for, *reinterpret_cast(error)))); +} + +LLDBSBProcessRef +LLDBSBTargetConnectRemote(LLDBSBTargetRef instance, LLDBSBListenerRef listener, const char *url, + const char *plugin_name, LLDBSBErrorRef error) +{ + SBTarget *unwrapped = reinterpret_cast(instance); + return reinterpret_cast(new SBProcess(unwrapped->ConnectRemote( + *reinterpret_cast(listener), url, plugin_name, *reinterpret_cast(error)))); +} + +LLDBSBFileSpecRef +LLDBSBTargetGetExecutable(LLDBSBTargetRef instance) +{ + SBTarget *unwrapped = reinterpret_cast(instance); + return reinterpret_cast(new SBFileSpec(unwrapped->GetExecutable())); +} + +bool +LLDBSBTargetAddModule(LLDBSBTargetRef instance, LLDBSBModuleRef module) +{ + SBTarget *unwrapped = reinterpret_cast(instance); + return unwrapped->AddModule(*reinterpret_cast(module)); +} + +LLDBSBModuleRef +LLDBSBTargetAddModule2(LLDBSBTargetRef instance, const char *path, const char *triple, const char *uuid) +{ + SBTarget *unwrapped = reinterpret_cast(instance); + return reinterpret_cast(new SBModule(unwrapped->AddModule(path, triple, uuid))); +} + +LLDBSBModuleRef +LLDBSBTargetAddModule3(LLDBSBTargetRef instance, const char *path, const char *triple, const char *uuid_cstr, + const char *symfile) +{ + SBTarget *unwrapped = reinterpret_cast(instance); + return reinterpret_cast(new SBModule(unwrapped->AddModule(path, triple, uuid_cstr, symfile))); +} + +LLDBSBModuleRef +LLDBSBTargetAddModule4(LLDBSBTargetRef instance, LLDBSBModuleSpecRef module_spec) +{ + SBTarget *unwrapped = reinterpret_cast(instance); + return reinterpret_cast( + new SBModule(unwrapped->AddModule(*reinterpret_cast(module_spec)))); +} + +unsigned int +LLDBSBTargetGetNumModules(LLDBSBTargetRef instance) +{ + SBTarget *unwrapped = reinterpret_cast(instance); + return unwrapped->GetNumModules(); +} + +LLDBSBModuleRef +LLDBSBTargetGetModuleAtIndex(LLDBSBTargetRef instance, uint32_t idx) +{ + SBTarget *unwrapped = reinterpret_cast(instance); + return reinterpret_cast(new SBModule(unwrapped->GetModuleAtIndex(idx))); +} + +bool +LLDBSBTargetRemoveModule(LLDBSBTargetRef instance, LLDBSBModuleRef module) +{ + SBTarget *unwrapped = reinterpret_cast(instance); + return unwrapped->RemoveModule(*reinterpret_cast(module)); +} + +LLDBSBDebuggerRef +LLDBSBTargetGetDebugger(LLDBSBTargetRef instance) +{ + SBTarget *unwrapped = reinterpret_cast(instance); + return reinterpret_cast(new SBDebugger(unwrapped->GetDebugger())); +} + +LLDBSBModuleRef +LLDBSBTargetFindModule(LLDBSBTargetRef instance, LLDBSBFileSpecRef file_spec) +{ + SBTarget *unwrapped = reinterpret_cast(instance); + return reinterpret_cast( + new SBModule(unwrapped->FindModule(*reinterpret_cast(file_spec)))); +} + +enum lldb::ByteOrder +LLDBSBTargetGetByteOrder(LLDBSBTargetRef instance) +{ + SBTarget *unwrapped = reinterpret_cast(instance); + return unwrapped->GetByteOrder(); +} + +unsigned int +LLDBSBTargetGetAddressByteSize(LLDBSBTargetRef instance) +{ + SBTarget *unwrapped = reinterpret_cast(instance); + return unwrapped->GetAddressByteSize(); +} + +const char * +LLDBSBTargetGetTriple(LLDBSBTargetRef instance) +{ + SBTarget *unwrapped = reinterpret_cast(instance); + return unwrapped->GetTriple(); +} + +unsigned int +LLDBSBTargetGetDataByteSize(LLDBSBTargetRef instance) +{ + SBTarget *unwrapped = reinterpret_cast(instance); + return unwrapped->GetDataByteSize(); +} + +unsigned int +LLDBSBTargetGetCodeByteSize(LLDBSBTargetRef instance) +{ + SBTarget *unwrapped = reinterpret_cast(instance); + return unwrapped->GetCodeByteSize(); +} + +LLDBSBErrorRef +LLDBSBTargetSetSectionLoadAddress(LLDBSBTargetRef instance, LLDBSBSectionRef section, lldb::addr_t section_base_addr) +{ + SBTarget *unwrapped = reinterpret_cast(instance); + return reinterpret_cast( + new SBError(unwrapped->SetSectionLoadAddress(*reinterpret_cast(section), section_base_addr))); +} + +LLDBSBErrorRef +LLDBSBTargetClearSectionLoadAddress(LLDBSBTargetRef instance, LLDBSBSectionRef section) +{ + SBTarget *unwrapped = reinterpret_cast(instance); + return reinterpret_cast( + new SBError(unwrapped->ClearSectionLoadAddress(*reinterpret_cast(section)))); +} + +LLDBSBErrorRef +LLDBSBTargetSetModuleLoadAddress(LLDBSBTargetRef instance, LLDBSBModuleRef module, int64_t sections_offset) +{ + SBTarget *unwrapped = reinterpret_cast(instance); + return reinterpret_cast( + new SBError(unwrapped->SetModuleLoadAddress(*reinterpret_cast(module), sections_offset))); +} + +LLDBSBErrorRef +LLDBSBTargetClearModuleLoadAddress(LLDBSBTargetRef instance, LLDBSBModuleRef module) +{ + SBTarget *unwrapped = reinterpret_cast(instance); + return reinterpret_cast( + new SBError(unwrapped->ClearModuleLoadAddress(*reinterpret_cast(module)))); +} + +LLDBSBSymbolContextListRef +LLDBSBTargetFindFunctions(LLDBSBTargetRef instance, const char *name, uint32_t name_type_mask) +{ + SBTarget *unwrapped = reinterpret_cast(instance); + return reinterpret_cast( + new SBSymbolContextList(unwrapped->FindFunctions(name, name_type_mask))); +} + +LLDBSBValueListRef +LLDBSBTargetFindGlobalVariables(LLDBSBTargetRef instance, const char *name, uint32_t max_matches) +{ + SBTarget *unwrapped = reinterpret_cast(instance); + return reinterpret_cast(new SBValueList(unwrapped->FindGlobalVariables(name, max_matches))); +} + +LLDBSBValueRef +LLDBSBTargetFindFirstGlobalVariable(LLDBSBTargetRef instance, const char *name) +{ + SBTarget *unwrapped = reinterpret_cast(instance); + return reinterpret_cast(new SBValue(unwrapped->FindFirstGlobalVariable(name))); +} + +LLDBSBValueListRef +LLDBSBTargetFindGlobalVariables2(LLDBSBTargetRef instance, const char *name, uint32_t max_matches, + LLDBMatchType matchtype) +{ + SBTarget *unwrapped = reinterpret_cast(instance); + return reinterpret_cast( + new SBValueList(unwrapped->FindGlobalVariables(name, max_matches, matchtype))); +} + +LLDBSBSymbolContextListRef +LLDBSBTargetFindGlobalFunctions(LLDBSBTargetRef instance, const char *name, uint32_t max_matches, + enum lldb::MatchType matchtype) +{ + SBTarget *unwrapped = reinterpret_cast(instance); + return reinterpret_cast( + new SBSymbolContextList(unwrapped->FindGlobalFunctions(name, max_matches, matchtype))); +} + +void +LLDBSBTargetClear(LLDBSBTargetRef instance) +{ + SBTarget *unwrapped = reinterpret_cast(instance); + unwrapped->Clear(); +} + +LLDBSBAddressRef +LLDBSBTargetResolveFileAddress(LLDBSBTargetRef instance, lldb::addr_t file_addr) +{ + SBTarget *unwrapped = reinterpret_cast(instance); + return reinterpret_cast(new SBAddress(unwrapped->ResolveFileAddress(file_addr))); +} + +LLDBSBAddressRef +LLDBSBTargetResolveLoadAddress(LLDBSBTargetRef instance, lldb::addr_t vm_addr) +{ + SBTarget *unwrapped = reinterpret_cast(instance); + return reinterpret_cast(new SBAddress(unwrapped->ResolveLoadAddress(vm_addr))); +} + +LLDBSBAddressRef +LLDBSBTargetResolvePastLoadAddress(LLDBSBTargetRef instance, uint32_t stop_id, lldb::addr_t vm_addr) +{ + SBTarget *unwrapped = reinterpret_cast(instance); + return reinterpret_cast(new SBAddress(unwrapped->ResolvePastLoadAddress(stop_id, vm_addr))); +} + +LLDBSBSymbolContextRef +LLDBSBTargetResolveSymbolContextForAddress(LLDBSBTargetRef instance, LLDBSBAddressRef addr, uint32_t resolve_scope) +{ + SBTarget *unwrapped = reinterpret_cast(instance); + return reinterpret_cast(new SBSymbolContext( + unwrapped->ResolveSymbolContextForAddress(*reinterpret_cast(addr), resolve_scope))); +} + +unsigned int +LLDBSBTargetReadMemory(LLDBSBTargetRef instance, LLDBSBAddressRef addr, void *buf, size_t size, LLDBSBErrorRef error) +{ + SBTarget *unwrapped = reinterpret_cast(instance); + return unwrapped->ReadMemory(*reinterpret_cast(addr), buf, size, *reinterpret_cast(error)); +} + +LLDBSBBreakpointRef +LLDBSBTargetBreakpointCreateByLocation(LLDBSBTargetRef instance, const char *file, uint32_t line) +{ + SBTarget *unwrapped = reinterpret_cast(instance); + return reinterpret_cast(new SBBreakpoint(unwrapped->BreakpointCreateByLocation(file, line))); +} + +LLDBSBBreakpointRef +LLDBSBTargetBreakpointCreateByLocation2(LLDBSBTargetRef instance, LLDBSBFileSpecRef file_spec, uint32_t line) +{ + SBTarget *unwrapped = reinterpret_cast(instance); + return reinterpret_cast( + new SBBreakpoint(unwrapped->BreakpointCreateByLocation(*reinterpret_cast(file_spec), line))); +} + +LLDBSBBreakpointRef +LLDBSBTargetBreakpointCreateByName(LLDBSBTargetRef instance, const char *symbol_name, const char *module_name) +{ + SBTarget *unwrapped = reinterpret_cast(instance); + return reinterpret_cast( + new SBBreakpoint(unwrapped->BreakpointCreateByName(symbol_name, module_name))); +} + +LLDBSBBreakpointRef +LLDBSBTargetBreakpointCreateByName2(LLDBSBTargetRef instance, const char *symbol_name, + LLDBSBFileSpecListRef module_list, LLDBSBFileSpecListRef comp_unit_list) +{ + SBTarget *unwrapped = reinterpret_cast(instance); + return reinterpret_cast(new SBBreakpoint( + unwrapped->BreakpointCreateByName(symbol_name, *reinterpret_cast(module_list), + *reinterpret_cast(comp_unit_list)))); +} + +LLDBSBBreakpointRef +LLDBSBTargetBreakpointCreateByName3(LLDBSBTargetRef instance, const char *symbol_name, uint32_t name_type_mask, + LLDBSBFileSpecListRef module_list, LLDBSBFileSpecListRef comp_unit_list) +{ + SBTarget *unwrapped = reinterpret_cast(instance); + return reinterpret_cast(new SBBreakpoint( + unwrapped->BreakpointCreateByName(symbol_name, name_type_mask, *reinterpret_cast(module_list), + *reinterpret_cast(comp_unit_list)))); +} + +LLDBSBBreakpointRef +LLDBSBTargetBreakpointCreateByNames(LLDBSBTargetRef instance, const char **symbol_name, uint32_t num_names, + uint32_t name_type_mask, LLDBSBFileSpecListRef module_list, + LLDBSBFileSpecListRef comp_unit_list) +{ + SBTarget *unwrapped = reinterpret_cast(instance); + return reinterpret_cast(new SBBreakpoint(unwrapped->BreakpointCreateByNames( + symbol_name, num_names, name_type_mask, *reinterpret_cast(module_list), + *reinterpret_cast(comp_unit_list)))); +} + +LLDBSBBreakpointRef +LLDBSBTargetBreakpointCreateByRegex(LLDBSBTargetRef instance, const char *symbol_name_regex, const char *module_name) +{ + SBTarget *unwrapped = reinterpret_cast(instance); + return reinterpret_cast( + new SBBreakpoint(unwrapped->BreakpointCreateByRegex(symbol_name_regex, module_name))); +} + +LLDBSBBreakpointRef +LLDBSBTargetBreakpointCreateByRegex2(LLDBSBTargetRef instance, const char *symbol_name_regex, + LLDBSBFileSpecListRef module_list, LLDBSBFileSpecListRef comp_unit_list) +{ + SBTarget *unwrapped = reinterpret_cast(instance); + return reinterpret_cast(new SBBreakpoint( + unwrapped->BreakpointCreateByRegex(symbol_name_regex, *reinterpret_cast(module_list), + *reinterpret_cast(comp_unit_list)))); +} + +LLDBSBBreakpointRef +LLDBSBTargetBreakpointCreateBySourceRegex(LLDBSBTargetRef instance, const char *source_regex, + LLDBSBFileSpecRef source_file, const char *module_name) +{ + SBTarget *unwrapped = reinterpret_cast(instance); + return reinterpret_cast(new SBBreakpoint(unwrapped->BreakpointCreateBySourceRegex( + source_regex, *reinterpret_cast(source_file), module_name))); +} + +LLDBSBBreakpointRef +LLDBSBTargetBreakpointCreateBySourceRegex2(LLDBSBTargetRef instance, const char *source_regex, + LLDBSBFileSpecListRef module_list, LLDBSBFileSpecListRef source_file) +{ + SBTarget *unwrapped = reinterpret_cast(instance); + return reinterpret_cast(new SBBreakpoint( + unwrapped->BreakpointCreateBySourceRegex(source_regex, *reinterpret_cast(module_list), + *reinterpret_cast(source_file)))); +} + +LLDBSBBreakpointRef +LLDBSBTargetBreakpointCreateForException(LLDBSBTargetRef instance, lldb::LanguageType language, bool catch_bp, + bool throw_bp) +{ + SBTarget *unwrapped = reinterpret_cast(instance); + return reinterpret_cast( + new SBBreakpoint(unwrapped->BreakpointCreateForException(language, catch_bp, throw_bp))); +} + +LLDBSBBreakpointRef +LLDBSBTargetBreakpointCreateByAddress(LLDBSBTargetRef instance, lldb::addr_t address) +{ + SBTarget *unwrapped = reinterpret_cast(instance); + return reinterpret_cast(new SBBreakpoint(unwrapped->BreakpointCreateByAddress(address))); +} + +unsigned int +LLDBSBTargetGetNumBreakpoints(LLDBSBTargetRef instance) +{ + SBTarget *unwrapped = reinterpret_cast(instance); + return unwrapped->GetNumBreakpoints(); +} + +LLDBSBBreakpointRef +LLDBSBTargetGetBreakpointAtIndex(LLDBSBTargetRef instance, uint32_t idx) +{ + SBTarget *unwrapped = reinterpret_cast(instance); + return reinterpret_cast(new SBBreakpoint(unwrapped->GetBreakpointAtIndex(idx))); +} + +bool +LLDBSBTargetBreakpointDelete(LLDBSBTargetRef instance, int break_id) +{ + SBTarget *unwrapped = reinterpret_cast(instance); + return unwrapped->BreakpointDelete(break_id); +} + +LLDBSBBreakpointRef +LLDBSBTargetFindBreakpointByID(LLDBSBTargetRef instance, int break_id) +{ + SBTarget *unwrapped = reinterpret_cast(instance); + return reinterpret_cast(new SBBreakpoint(unwrapped->FindBreakpointByID(break_id))); +} + +bool +LLDBSBTargetEnableAllBreakpoints(LLDBSBTargetRef instance) +{ + SBTarget *unwrapped = reinterpret_cast(instance); + return unwrapped->EnableAllBreakpoints(); +} + +bool +LLDBSBTargetDisableAllBreakpoints(LLDBSBTargetRef instance) +{ + SBTarget *unwrapped = reinterpret_cast(instance); + return unwrapped->DisableAllBreakpoints(); +} + +bool +LLDBSBTargetDeleteAllBreakpoints(LLDBSBTargetRef instance) +{ + SBTarget *unwrapped = reinterpret_cast(instance); + return unwrapped->DeleteAllBreakpoints(); +} + +unsigned int +LLDBSBTargetGetNumWatchpoints(LLDBSBTargetRef instance) +{ + SBTarget *unwrapped = reinterpret_cast(instance); + return unwrapped->GetNumWatchpoints(); +} + +LLDBSBWatchpointRef +LLDBSBTargetGetWatchpointAtIndex(LLDBSBTargetRef instance, uint32_t idx) +{ + SBTarget *unwrapped = reinterpret_cast(instance); + return reinterpret_cast(new SBWatchpoint(unwrapped->GetWatchpointAtIndex(idx))); +} + +bool +LLDBSBTargetDeleteWatchpoint(LLDBSBTargetRef instance, int watch_id) +{ + SBTarget *unwrapped = reinterpret_cast(instance); + return unwrapped->DeleteWatchpoint(watch_id); +} + +LLDBSBWatchpointRef +LLDBSBTargetFindWatchpointByID(LLDBSBTargetRef instance, int watch_id) +{ + SBTarget *unwrapped = reinterpret_cast(instance); + return reinterpret_cast(new SBWatchpoint(unwrapped->FindWatchpointByID(watch_id))); +} + +LLDBSBWatchpointRef +LLDBSBTargetWatchAddress(LLDBSBTargetRef instance, lldb::addr_t addr, size_t size, bool read, bool write, + LLDBSBErrorRef error) +{ + SBTarget *unwrapped = reinterpret_cast(instance); + return reinterpret_cast( + new SBWatchpoint(unwrapped->WatchAddress(addr, size, read, write, *reinterpret_cast(error)))); +} + +bool +LLDBSBTargetEnableAllWatchpoints(LLDBSBTargetRef instance) +{ + SBTarget *unwrapped = reinterpret_cast(instance); + return unwrapped->EnableAllWatchpoints(); +} + +bool +LLDBSBTargetDisableAllWatchpoints(LLDBSBTargetRef instance) +{ + SBTarget *unwrapped = reinterpret_cast(instance); + return unwrapped->DisableAllWatchpoints(); +} + +bool +LLDBSBTargetDeleteAllWatchpoints(LLDBSBTargetRef instance) +{ + SBTarget *unwrapped = reinterpret_cast(instance); + return unwrapped->DeleteAllWatchpoints(); +} + +LLDBSBBroadcasterRef +LLDBSBTargetGetBroadcaster(LLDBSBTargetRef instance) +{ + SBTarget *unwrapped = reinterpret_cast(instance); + return reinterpret_cast(new SBBroadcaster(unwrapped->GetBroadcaster())); +} + +LLDBSBTypeRef +LLDBSBTargetFindFirstType(LLDBSBTargetRef instance, const char *type) +{ + SBTarget *unwrapped = reinterpret_cast(instance); + return reinterpret_cast(new SBType(unwrapped->FindFirstType(type))); +} + +LLDBSBTypeListRef +LLDBSBTargetFindTypes(LLDBSBTargetRef instance, const char *type) +{ + SBTarget *unwrapped = reinterpret_cast(instance); + return reinterpret_cast(new SBTypeList(unwrapped->FindTypes(type))); +} + +LLDBSBTypeRef +LLDBSBTargetGetBasicType(LLDBSBTargetRef instance, lldb::BasicType type) +{ + SBTarget *unwrapped = reinterpret_cast(instance); + return reinterpret_cast(new SBType(unwrapped->GetBasicType(type))); +} + +LLDBSBValueRef +LLDBSBTargetCreateValueFromAddress(LLDBSBTargetRef instance, const char *name, LLDBSBAddressRef addr, + LLDBSBTypeRef type) +{ + SBTarget *unwrapped = reinterpret_cast(instance); + return reinterpret_cast(new SBValue(unwrapped->CreateValueFromAddress( + name, *reinterpret_cast(addr), *reinterpret_cast(type)))); +} + +LLDBSBValueRef +LLDBSBTargetCreateValueFromData(LLDBSBTargetRef instance, const char *name, LLDBSBDataRef data, LLDBSBTypeRef type) +{ + SBTarget *unwrapped = reinterpret_cast(instance); + return reinterpret_cast(new SBValue( + unwrapped->CreateValueFromData(name, *reinterpret_cast(data), *reinterpret_cast(type)))); +} + +LLDBSBValueRef +LLDBSBTargetCreateValueFromExpression(LLDBSBTargetRef instance, const char *name, const char *expr) +{ + SBTarget *unwrapped = reinterpret_cast(instance); + return reinterpret_cast(new SBValue(unwrapped->CreateValueFromExpression(name, expr))); +} + +LLDBSBSourceManagerRef +LLDBSBTargetGetSourceManager(LLDBSBTargetRef instance) +{ + SBTarget *unwrapped = reinterpret_cast(instance); + return reinterpret_cast(new SBSourceManager(unwrapped->GetSourceManager())); +} + +LLDBSBInstructionListRef +LLDBSBTargetReadInstructions(LLDBSBTargetRef instance, LLDBSBAddressRef base_addr, uint32_t count) +{ + SBTarget *unwrapped = reinterpret_cast(instance); + return reinterpret_cast( + new SBInstructionList(unwrapped->ReadInstructions(*reinterpret_cast(base_addr), count))); +} + +LLDBSBInstructionListRef +LLDBSBTargetReadInstructions2(LLDBSBTargetRef instance, LLDBSBAddressRef base_addr, uint32_t count, + const char *flavor_string) +{ + SBTarget *unwrapped = reinterpret_cast(instance); + return reinterpret_cast(new SBInstructionList( + unwrapped->ReadInstructions(*reinterpret_cast(base_addr), count, flavor_string))); +} + +LLDBSBInstructionListRef +LLDBSBTargetGetInstructions(LLDBSBTargetRef instance, LLDBSBAddressRef base_addr, void *buf, size_t size) +{ + SBTarget *unwrapped = reinterpret_cast(instance); + return reinterpret_cast( + new SBInstructionList(unwrapped->GetInstructions(*reinterpret_cast(base_addr), buf, size))); +} + +LLDBSBInstructionListRef +LLDBSBTargetGetInstructionsWithFlavor(LLDBSBTargetRef instance, LLDBSBAddressRef base_addr, const char *flavor_string, + void *buf, size_t size) +{ + SBTarget *unwrapped = reinterpret_cast(instance); + return reinterpret_cast(new SBInstructionList( + unwrapped->GetInstructionsWithFlavor(*reinterpret_cast(base_addr), flavor_string, buf, size))); +} + +LLDBSBInstructionListRef +LLDBSBTargetGetInstructions2(LLDBSBTargetRef instance, lldb::addr_t base_addr, void *buf, size_t size) +{ + SBTarget *unwrapped = reinterpret_cast(instance); + return reinterpret_cast( + new SBInstructionList(unwrapped->GetInstructions(base_addr, buf, size))); +} + +LLDBSBInstructionListRef +LLDBSBTargetGetInstructionsWithFlavor2(LLDBSBTargetRef instance, lldb::addr_t base_addr, const char *flavor_string, + void *buf, size_t size) +{ + SBTarget *unwrapped = reinterpret_cast(instance); + return reinterpret_cast( + new SBInstructionList(unwrapped->GetInstructionsWithFlavor(base_addr, flavor_string, buf, size))); +} + +LLDBSBSymbolContextListRef +LLDBSBTargetFindSymbols(LLDBSBTargetRef instance, const char *name, lldb::SymbolType type) +{ + SBTarget *unwrapped = reinterpret_cast(instance); + return reinterpret_cast(new SBSymbolContextList(unwrapped->FindSymbols(name, type))); +} + +bool +LLDBSBTargetGetDescription(LLDBSBTargetRef instance, LLDBSBStreamRef description, + lldb::DescriptionLevel description_level) +{ + SBTarget *unwrapped = reinterpret_cast(instance); + return unwrapped->GetDescription(*reinterpret_cast(description), description_level); +} + +LLDBSBValueRef +LLDBSBTargetEvaluateExpression(LLDBSBTargetRef instance, const char *expr, LLDBSBExpressionOptionsRef options) +{ + SBTarget *unwrapped = reinterpret_cast(instance); + return reinterpret_cast( + new SBValue(unwrapped->EvaluateExpression(expr, *reinterpret_cast(options)))); +} + +unsigned long long +LLDBSBTargetGetStackRedZoneSize(LLDBSBTargetRef instance) +{ + SBTarget *unwrapped = reinterpret_cast(instance); + return unwrapped->GetStackRedZoneSize(); +} + +LLDBSBLaunchInfoRef +LLDBSBTargetGetLaunchInfo(LLDBSBTargetRef instance) +{ + SBTarget *unwrapped = reinterpret_cast(instance); + return reinterpret_cast(new SBLaunchInfo(unwrapped->GetLaunchInfo())); +} + +void +LLDBSBTargetSetLaunchInfo(LLDBSBTargetRef instance, LLDBSBLaunchInfoRef launch_info) +{ + SBTarget *unwrapped = reinterpret_cast(instance); + unwrapped->SetLaunchInfo(*reinterpret_cast(launch_info)); +} + +#ifdef __cplusplus +} +#endif Index: source/API/Bindings/SBThreadBinding.cpp =================================================================== --- source/API/Bindings/SBThreadBinding.cpp +++ source/API/Bindings/SBThreadBinding.cpp @@ -0,0 +1,348 @@ +//===-- SBThreadBinding.cpp -------------------------------------*- C++ -*-===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +#include "lldb/Bindings/LLDBBinding.h" +#include "lldb/API/LLDB.h" + +using namespace lldb; + +#ifdef __cplusplus +extern "C" { +#endif + +const char * +LLDBSBThreadGetBroadcasterClassName() +{ + return lldb::SBThread::GetBroadcasterClassName(); +} + +LLDBSBThreadRef +LLDBCreateSBThread() +{ + return reinterpret_cast(new SBThread()); +} + +LLDBSBThreadRef +LLDBCreateSBThread2(LLDBSBThreadRef thread) +{ + return reinterpret_cast(new SBThread(*reinterpret_cast(thread))); +} + +void +LLDBDisposeSBThread(LLDBSBThreadRef instance) +{ + delete reinterpret_cast(instance); +} + +LLDBSBQueueRef +LLDBSBThreadGetQueue(LLDBSBThreadRef instance) +{ + SBThread *unwrapped = reinterpret_cast(instance); + return reinterpret_cast(new SBQueue(unwrapped->GetQueue())); +} + +bool +LLDBSBThreadIsValid(LLDBSBThreadRef instance) +{ + SBThread *unwrapped = reinterpret_cast(instance); + return unwrapped->IsValid(); +} + +void +LLDBSBThreadClear(LLDBSBThreadRef instance) +{ + SBThread *unwrapped = reinterpret_cast(instance); + unwrapped->Clear(); +} + +enum lldb::StopReason +LLDBSBThreadGetStopReason(LLDBSBThreadRef instance) +{ + SBThread *unwrapped = reinterpret_cast(instance); + return unwrapped->GetStopReason(); +} + +unsigned int +LLDBSBThreadGetStopReasonDataCount(LLDBSBThreadRef instance) +{ + SBThread *unwrapped = reinterpret_cast(instance); + return unwrapped->GetStopReasonDataCount(); +} + +unsigned long long +LLDBSBThreadGetStopReasonDataAtIndex(LLDBSBThreadRef instance, uint32_t idx) +{ + SBThread *unwrapped = reinterpret_cast(instance); + return unwrapped->GetStopReasonDataAtIndex(idx); +} + +bool +LLDBSBThreadGetStopReasonExtendedInfoAsJSON(LLDBSBThreadRef instance, LLDBSBStreamRef stream) +{ + SBThread *unwrapped = reinterpret_cast(instance); + return unwrapped->GetStopReasonExtendedInfoAsJSON(*reinterpret_cast(stream)); +} + +unsigned int +LLDBSBThreadGetStopDescription(LLDBSBThreadRef instance, char *dst, size_t dst_len) +{ + SBThread *unwrapped = reinterpret_cast(instance); + return unwrapped->GetStopDescription(dst, dst_len); +} + +LLDBSBValueRef +LLDBSBThreadGetStopReturnValue(LLDBSBThreadRef instance) +{ + SBThread *unwrapped = reinterpret_cast(instance); + return reinterpret_cast(new SBValue(unwrapped->GetStopReturnValue())); +} + +unsigned long long +LLDBSBThreadGetThreadID(LLDBSBThreadRef instance) +{ + SBThread *unwrapped = reinterpret_cast(instance); + return unwrapped->GetThreadID(); +} + +unsigned int +LLDBSBThreadGetIndexID(LLDBSBThreadRef instance) +{ + SBThread *unwrapped = reinterpret_cast(instance); + return unwrapped->GetIndexID(); +} + +const char * +LLDBSBThreadGetName(LLDBSBThreadRef instance) +{ + SBThread *unwrapped = reinterpret_cast(instance); + return unwrapped->GetName(); +} + +const char * +LLDBSBThreadGetQueueName(LLDBSBThreadRef instance) +{ + SBThread *unwrapped = reinterpret_cast(instance); + return unwrapped->GetQueueName(); +} + +unsigned long long +LLDBSBThreadGetQueueID(LLDBSBThreadRef instance) +{ + SBThread *unwrapped = reinterpret_cast(instance); + return unwrapped->GetQueueID(); +} + +bool +LLDBSBThreadGetInfoItemByPathAsString(LLDBSBThreadRef instance, const char *path, LLDBSBStreamRef strm) +{ + SBThread *unwrapped = reinterpret_cast(instance); + return unwrapped->GetInfoItemByPathAsString(path, *reinterpret_cast(strm)); +} + +void +LLDBSBThreadStepOver(LLDBSBThreadRef instance, lldb::RunMode stop_other_threads) +{ + SBThread *unwrapped = reinterpret_cast(instance); + unwrapped->StepOver(stop_other_threads); +} + +void +LLDBSBThreadStepInto(LLDBSBThreadRef instance, lldb::RunMode stop_other_threads) +{ + SBThread *unwrapped = reinterpret_cast(instance); + unwrapped->StepInto(stop_other_threads); +} + +void +LLDBSBThreadStepInto2(LLDBSBThreadRef instance, const char *target_name, lldb::RunMode stop_other_threads) +{ + SBThread *unwrapped = reinterpret_cast(instance); + unwrapped->StepInto(target_name, stop_other_threads); +} + +void +LLDBSBThreadStepOut(LLDBSBThreadRef instance) +{ + SBThread *unwrapped = reinterpret_cast(instance); + unwrapped->StepOut(); +} + +void +LLDBSBThreadStepOutOfFrame(LLDBSBThreadRef instance, LLDBSBFrameRef frame) +{ + SBThread *unwrapped = reinterpret_cast(instance); + unwrapped->StepOutOfFrame(*reinterpret_cast(frame)); +} + +void +LLDBSBThreadStepInstruction(LLDBSBThreadRef instance, bool step_over) +{ + SBThread *unwrapped = reinterpret_cast(instance); + unwrapped->StepInstruction(step_over); +} + +LLDBSBErrorRef +LLDBSBThreadStepOverUntil(LLDBSBThreadRef instance, LLDBSBFrameRef frame, LLDBSBFileSpecRef file_spec, uint32_t line) +{ + SBThread *unwrapped = reinterpret_cast(instance); + return reinterpret_cast(new SBError(unwrapped->StepOverUntil( + *reinterpret_cast(frame), *reinterpret_cast(file_spec), line))); +} + +LLDBSBErrorRef +LLDBSBThreadStepUsingScriptedThreadPlan(LLDBSBThreadRef instance, const char *script_class_name) +{ + SBThread *unwrapped = reinterpret_cast(instance); + return reinterpret_cast(new SBError(unwrapped->StepUsingScriptedThreadPlan(script_class_name))); +} + +LLDBSBErrorRef +LLDBSBThreadJumpToLine(LLDBSBThreadRef instance, LLDBSBFileSpecRef file_spec, uint32_t line) +{ + SBThread *unwrapped = reinterpret_cast(instance); + return reinterpret_cast( + new SBError(unwrapped->JumpToLine(*reinterpret_cast(file_spec), line))); +} + +void +LLDBSBThreadRunToAddress(LLDBSBThreadRef instance, lldb::addr_t addr) +{ + SBThread *unwrapped = reinterpret_cast(instance); + unwrapped->RunToAddress(addr); +} + +LLDBSBErrorRef +LLDBSBThreadReturnFromFrame(LLDBSBThreadRef instance, LLDBSBFrameRef frame, LLDBSBValueRef return_value) +{ + SBThread *unwrapped = reinterpret_cast(instance); + return reinterpret_cast(new SBError( + unwrapped->ReturnFromFrame(*reinterpret_cast(frame), *reinterpret_cast(return_value)))); +} + +bool +LLDBSBThreadSuspend(LLDBSBThreadRef instance) +{ + SBThread *unwrapped = reinterpret_cast(instance); + return unwrapped->Suspend(); +} + +bool +LLDBSBThreadResume(LLDBSBThreadRef instance) +{ + SBThread *unwrapped = reinterpret_cast(instance); + return unwrapped->Resume(); +} + +bool +LLDBSBThreadIsSuspended(LLDBSBThreadRef instance) +{ + SBThread *unwrapped = reinterpret_cast(instance); + return unwrapped->IsSuspended(); +} + +bool +LLDBSBThreadIsStopped(LLDBSBThreadRef instance) +{ + SBThread *unwrapped = reinterpret_cast(instance); + return unwrapped->IsStopped(); +} + +unsigned int +LLDBSBThreadGetNumFrames(LLDBSBThreadRef instance) +{ + SBThread *unwrapped = reinterpret_cast(instance); + return unwrapped->GetNumFrames(); +} + +LLDBSBFrameRef +LLDBSBThreadGetFrameAtIndex(LLDBSBThreadRef instance, uint32_t idx) +{ + SBThread *unwrapped = reinterpret_cast(instance); + return reinterpret_cast(new SBFrame(unwrapped->GetFrameAtIndex(idx))); +} + +LLDBSBFrameRef +LLDBSBThreadGetSelectedFrame(LLDBSBThreadRef instance) +{ + SBThread *unwrapped = reinterpret_cast(instance); + return reinterpret_cast(new SBFrame(unwrapped->GetSelectedFrame())); +} + +LLDBSBFrameRef +LLDBSBThreadSetSelectedFrame(LLDBSBThreadRef instance, uint32_t frame_idx) +{ + SBThread *unwrapped = reinterpret_cast(instance); + return reinterpret_cast(new SBFrame(unwrapped->SetSelectedFrame(frame_idx))); +} + +bool +LLDBSBThreadEventIsThreadEvent(LLDBSBEventRef event) +{ + return lldb::SBThread::EventIsThreadEvent(*reinterpret_cast(event)); +} + +LLDBSBFrameRef +LLDBSBThreadGetStackFrameFromEvent(LLDBSBEventRef event) +{ + return reinterpret_cast( + new SBFrame(lldb::SBThread::GetStackFrameFromEvent(*reinterpret_cast(event)))); +} + +LLDBSBThreadRef +LLDBSBThreadGetThreadFromEvent(LLDBSBEventRef event) +{ + return reinterpret_cast( + new SBThread(lldb::SBThread::GetThreadFromEvent(*reinterpret_cast(event)))); +} + +LLDBSBProcessRef +LLDBSBThreadGetProcess(LLDBSBThreadRef instance) +{ + SBThread *unwrapped = reinterpret_cast(instance); + return reinterpret_cast(new SBProcess(unwrapped->GetProcess())); +} + +bool +LLDBSBThreadGetDescription(LLDBSBThreadRef instance, LLDBSBStreamRef description) +{ + SBThread *unwrapped = reinterpret_cast(instance); + return unwrapped->GetDescription(*reinterpret_cast(description)); +} + +bool +LLDBSBThreadGetStatus(LLDBSBThreadRef instance, LLDBSBStreamRef status) +{ + SBThread *unwrapped = reinterpret_cast(instance); + return unwrapped->GetStatus(*reinterpret_cast(status)); +} + +LLDBSBThreadRef +LLDBSBThreadGetExtendedBacktraceThread(LLDBSBThreadRef instance, const char *type) +{ + SBThread *unwrapped = reinterpret_cast(instance); + return reinterpret_cast(new SBThread(unwrapped->GetExtendedBacktraceThread(type))); +} + +unsigned int +LLDBSBThreadGetExtendedBacktraceOriginatingIndexID(LLDBSBThreadRef instance) +{ + SBThread *unwrapped = reinterpret_cast(instance); + return unwrapped->GetExtendedBacktraceOriginatingIndexID(); +} + +bool +LLDBSBThreadSafeToCallFunctions(LLDBSBThreadRef instance) +{ + SBThread *unwrapped = reinterpret_cast(instance); + return unwrapped->SafeToCallFunctions(); +} + +#ifdef __cplusplus +} +#endif Index: source/API/Bindings/SBThreadCollectionBinding.cpp =================================================================== --- source/API/Bindings/SBThreadCollectionBinding.cpp +++ source/API/Bindings/SBThreadCollectionBinding.cpp @@ -0,0 +1,55 @@ +//===-- SBThreadCollectionBinding.cpp ---------------------------*- C++ -*-===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +#include "lldb/Bindings/LLDBBinding.h" +#include "lldb/API/LLDB.h" +#include "lldb/API/SBThreadCollection.h" + +using namespace lldb; + +#ifdef __cplusplus +extern "C" { +#endif + +LLDBSBThreadCollectionRef +LLDBCreateSBThreadCollection() +{ + return reinterpret_cast(new SBThreadCollection()); +} + +void +LLDBDisposeSBThreadCollection(LLDBSBThreadCollectionRef instance) +{ + delete reinterpret_cast(instance); +} + +bool +LLDBSBThreadCollectionIsValid(LLDBSBThreadCollectionRef instance) +{ + SBThreadCollection *unwrapped = reinterpret_cast(instance); + return unwrapped->IsValid(); +} + +unsigned int +LLDBSBThreadCollectionGetSize(LLDBSBThreadCollectionRef instance) +{ + SBThreadCollection *unwrapped = reinterpret_cast(instance); + return unwrapped->GetSize(); +} + +LLDBSBThreadRef +LLDBSBThreadCollectionGetThreadAtIndex(LLDBSBThreadCollectionRef instance, size_t idx) +{ + SBThreadCollection *unwrapped = reinterpret_cast(instance); + return reinterpret_cast(new SBThread(unwrapped->GetThreadAtIndex(idx))); +} + +#ifdef __cplusplus +} +#endif Index: source/API/Bindings/SBThreadPlanBinding.cpp =================================================================== --- source/API/Bindings/SBThreadPlanBinding.cpp +++ source/API/Bindings/SBThreadPlanBinding.cpp @@ -0,0 +1,143 @@ +//===-- SBThreadPlanBinding.cpp ---------------------------------*- C++ -*-===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +#include "lldb/Bindings/LLDBBinding.h" +#include "lldb/API/LLDB.h" +#include "lldb/API/SBThreadPlan.h" + +using namespace lldb; + +#ifdef __cplusplus +extern "C" { +#endif + +LLDBSBThreadPlanRef +LLDBCreateSBThreadPlan() +{ + return reinterpret_cast(new SBThreadPlan()); +} + +LLDBSBThreadPlanRef +LLDBCreateSBThreadPlan2(LLDBSBThreadPlanRef threadPlan) +{ + return reinterpret_cast(new SBThreadPlan(*reinterpret_cast(threadPlan))); +} + +LLDBSBThreadPlanRef +LLDBCreateSBThreadPlan3(LLDBSBThreadRef thread, const char *class_name) +{ + return reinterpret_cast(new SBThreadPlan(*reinterpret_cast(thread), class_name)); +} + +void +LLDBDisposeSBThreadPlan(LLDBSBThreadPlanRef instance) +{ + delete reinterpret_cast(instance); +} + +bool +LLDBSBThreadPlanIsValid(LLDBSBThreadPlanRef instance) +{ + SBThreadPlan *unwrapped = reinterpret_cast(instance); + return unwrapped->IsValid(); +} + +void +LLDBSBThreadPlanClear(LLDBSBThreadPlanRef instance) +{ + SBThreadPlan *unwrapped = reinterpret_cast(instance); + unwrapped->Clear(); +} + +enum lldb::StopReason +LLDBSBThreadPlanGetStopReason(LLDBSBThreadPlanRef instance) +{ + SBThreadPlan *unwrapped = reinterpret_cast(instance); + return unwrapped->GetStopReason(); +} + +unsigned int +LLDBSBThreadPlanGetStopReasonDataCount(LLDBSBThreadPlanRef instance) +{ + SBThreadPlan *unwrapped = reinterpret_cast(instance); + return unwrapped->GetStopReasonDataCount(); +} + +unsigned long long +LLDBSBThreadPlanGetStopReasonDataAtIndex(LLDBSBThreadPlanRef instance, uint32_t idx) +{ + SBThreadPlan *unwrapped = reinterpret_cast(instance); + return unwrapped->GetStopReasonDataAtIndex(idx); +} + +LLDBSBThreadRef +LLDBSBThreadPlanGetThread(LLDBSBThreadPlanRef instance) +{ + SBThreadPlan *unwrapped = reinterpret_cast(instance); + return reinterpret_cast(new SBThread(unwrapped->GetThread())); +} + +bool +LLDBSBThreadPlanGetDescription(LLDBSBThreadPlanRef instance, LLDBSBStreamRef description) +{ + SBThreadPlan *unwrapped = reinterpret_cast(instance); + return unwrapped->GetDescription(*reinterpret_cast(description)); +} + +void +LLDBSBThreadPlanSetPlanComplete(LLDBSBThreadPlanRef instance, bool success) +{ + SBThreadPlan *unwrapped = reinterpret_cast(instance); + unwrapped->SetPlanComplete(success); +} + +bool +LLDBSBThreadPlanIsPlanComplete(LLDBSBThreadPlanRef instance) +{ + SBThreadPlan *unwrapped = reinterpret_cast(instance); + return unwrapped->IsPlanComplete(); +} + +LLDBSBThreadPlanRef +LLDBSBThreadPlanQueueThreadPlanForStepOverRange(LLDBSBThreadPlanRef instance, LLDBSBAddressRef start_address, + lldb::addr_t range_size) +{ + SBThreadPlan *unwrapped = reinterpret_cast(instance); + return reinterpret_cast(new SBThreadPlan( + unwrapped->QueueThreadPlanForStepOverRange(*reinterpret_cast(start_address), range_size))); +} + +LLDBSBThreadPlanRef +LLDBSBThreadPlanQueueThreadPlanForStepInRange(LLDBSBThreadPlanRef instance, LLDBSBAddressRef start_address, + lldb::addr_t range_size) +{ + SBThreadPlan *unwrapped = reinterpret_cast(instance); + return reinterpret_cast(new SBThreadPlan( + unwrapped->QueueThreadPlanForStepInRange(*reinterpret_cast(start_address), range_size))); +} + +LLDBSBThreadPlanRef +LLDBSBThreadPlanQueueThreadPlanForStepOut(LLDBSBThreadPlanRef instance, uint32_t frame_idx_to_step_to, bool first_insn) +{ + SBThreadPlan *unwrapped = reinterpret_cast(instance); + return reinterpret_cast( + new SBThreadPlan(unwrapped->QueueThreadPlanForStepOut(frame_idx_to_step_to, first_insn))); +} + +LLDBSBThreadPlanRef +LLDBSBThreadPlanQueueThreadPlanForRunToAddress(LLDBSBThreadPlanRef instance, LLDBSBAddressRef address) +{ + SBThreadPlan *unwrapped = reinterpret_cast(instance); + return reinterpret_cast( + new SBThreadPlan(unwrapped->QueueThreadPlanForRunToAddress(*reinterpret_cast(address)))); +} + +#ifdef __cplusplus +} +#endif Index: source/API/Bindings/SBTypeBinding.cpp =================================================================== --- source/API/Bindings/SBTypeBinding.cpp +++ source/API/Bindings/SBTypeBinding.cpp @@ -0,0 +1,493 @@ +//===-- SBTypeBinding.cpp ---------------------------------------*- C++ -*-===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +#include "lldb/Bindings/LLDBBinding.h" +#include "lldb/API/LLDB.h" +#include "lldb/API/SBTypeEnumMember.h" + +using namespace lldb; + +#ifdef __cplusplus +extern "C" { +#endif + +LLDBSBTypeMemberRef +LLDBCreateSBTypeMember() +{ + return reinterpret_cast(new SBTypeMember()); +} + +void +LLDBDisposeSBTypeMember(LLDBSBTypeMemberRef instance) +{ + delete reinterpret_cast(instance); +} + +bool +LLDBSBTypeMemberIsValid(LLDBSBTypeMemberRef instance) +{ + SBTypeMember *unwrapped = reinterpret_cast(instance); + return unwrapped->IsValid(); +} + +const char * +LLDBSBTypeMemberGetName(LLDBSBTypeMemberRef instance) +{ + SBTypeMember *unwrapped = reinterpret_cast(instance); + return unwrapped->GetName(); +} + +LLDBSBTypeRef +LLDBSBTypeMemberGetType(LLDBSBTypeMemberRef instance) +{ + SBTypeMember *unwrapped = reinterpret_cast(instance); + return reinterpret_cast(new SBType(unwrapped->GetType())); +} + +unsigned long long +LLDBSBTypeMemberGetOffsetInBytes(LLDBSBTypeMemberRef instance) +{ + SBTypeMember *unwrapped = reinterpret_cast(instance); + return unwrapped->GetOffsetInBytes(); +} + +unsigned long long +LLDBSBTypeMemberGetOffsetInBits(LLDBSBTypeMemberRef instance) +{ + SBTypeMember *unwrapped = reinterpret_cast(instance); + return unwrapped->GetOffsetInBits(); +} + +bool +LLDBSBTypeMemberIsBitfield(LLDBSBTypeMemberRef instance) +{ + SBTypeMember *unwrapped = reinterpret_cast(instance); + return unwrapped->IsBitfield(); +} + +unsigned int +LLDBSBTypeMemberGetBitfieldSizeInBits(LLDBSBTypeMemberRef instance) +{ + SBTypeMember *unwrapped = reinterpret_cast(instance); + return unwrapped->GetBitfieldSizeInBits(); +} + +bool +LLDBSBTypeMemberGetDescription(LLDBSBTypeMemberRef instance, LLDBSBStreamRef description, + lldb::DescriptionLevel description_level) +{ + SBTypeMember *unwrapped = reinterpret_cast(instance); + return unwrapped->GetDescription(*reinterpret_cast(description), description_level); +} + +LLDBSBTypeMemberFunctionRef +LLDBCreateSBTypeMemberFunction() +{ + return reinterpret_cast(new SBTypeMemberFunction()); +} + +void +LLDBDisposeSBTypeMemberFunction(LLDBSBTypeMemberFunctionRef instance) +{ + delete reinterpret_cast(instance); +} + +bool +LLDBSBTypeMemberFunctionIsValid(LLDBSBTypeMemberFunctionRef instance) +{ + SBTypeMemberFunction *unwrapped = reinterpret_cast(instance); + return unwrapped->IsValid(); +} + +const char * +LLDBSBTypeMemberFunctionGetName(LLDBSBTypeMemberFunctionRef instance) +{ + SBTypeMemberFunction *unwrapped = reinterpret_cast(instance); + return unwrapped->GetName(); +} + +LLDBSBTypeRef +LLDBSBTypeMemberFunctionGetType(LLDBSBTypeMemberFunctionRef instance) +{ + SBTypeMemberFunction *unwrapped = reinterpret_cast(instance); + return reinterpret_cast(new SBType(unwrapped->GetType())); +} + +LLDBSBTypeRef +LLDBSBTypeMemberFunctionGetReturnType(LLDBSBTypeMemberFunctionRef instance) +{ + SBTypeMemberFunction *unwrapped = reinterpret_cast(instance); + return reinterpret_cast(new SBType(unwrapped->GetReturnType())); +} + +unsigned int +LLDBSBTypeMemberFunctionGetNumberOfArguments(LLDBSBTypeMemberFunctionRef instance) +{ + SBTypeMemberFunction *unwrapped = reinterpret_cast(instance); + return unwrapped->GetNumberOfArguments(); +} + +LLDBSBTypeRef +LLDBSBTypeMemberFunctionGetArgumentTypeAtIndex(LLDBSBTypeMemberFunctionRef instance, uint32_t var0) +{ + SBTypeMemberFunction *unwrapped = reinterpret_cast(instance); + return reinterpret_cast(new SBType(unwrapped->GetArgumentTypeAtIndex(var0))); +} + +enum lldb::MemberFunctionKind +LLDBSBTypeMemberFunctionGetKind(LLDBSBTypeMemberFunctionRef instance) +{ + SBTypeMemberFunction *unwrapped = reinterpret_cast(instance); + return unwrapped->GetKind(); +} + +bool +LLDBSBTypeMemberFunctionGetDescription(LLDBSBTypeMemberFunctionRef instance, LLDBSBStreamRef description, + lldb::DescriptionLevel description_level) +{ + SBTypeMemberFunction *unwrapped = reinterpret_cast(instance); + return unwrapped->GetDescription(*reinterpret_cast(description), description_level); +} + +LLDBSBTypeRef +LLDBCreateSBType() +{ + return reinterpret_cast(new SBType()); +} + +void +LLDBDisposeSBType(LLDBSBTypeRef instance) +{ + delete reinterpret_cast(instance); +} + +bool +LLDBSBTypeIsValid(LLDBSBTypeRef instance) +{ + SBType *unwrapped = reinterpret_cast(instance); + return unwrapped->IsValid(); +} + +unsigned long long +LLDBSBTypeGetByteSize(LLDBSBTypeRef instance) +{ + SBType *unwrapped = reinterpret_cast(instance); + return unwrapped->GetByteSize(); +} + +bool +LLDBSBTypeIsPointerType(LLDBSBTypeRef instance) +{ + SBType *unwrapped = reinterpret_cast(instance); + return unwrapped->IsPointerType(); +} + +bool +LLDBSBTypeIsReferenceType(LLDBSBTypeRef instance) +{ + SBType *unwrapped = reinterpret_cast(instance); + return unwrapped->IsReferenceType(); +} + +bool +LLDBSBTypeIsFunctionType(LLDBSBTypeRef instance) +{ + SBType *unwrapped = reinterpret_cast(instance); + return unwrapped->IsFunctionType(); +} + +bool +LLDBSBTypeIsPolymorphicClass(LLDBSBTypeRef instance) +{ + SBType *unwrapped = reinterpret_cast(instance); + return unwrapped->IsPolymorphicClass(); +} + +bool +LLDBSBTypeIsArrayType(LLDBSBTypeRef instance) +{ + SBType *unwrapped = reinterpret_cast(instance); + return unwrapped->IsArrayType(); +} + +bool +LLDBSBTypeIsVectorType(LLDBSBTypeRef instance) +{ + SBType *unwrapped = reinterpret_cast(instance); + return unwrapped->IsVectorType(); +} + +bool +LLDBSBTypeIsTypedefType(LLDBSBTypeRef instance) +{ + SBType *unwrapped = reinterpret_cast(instance); + return unwrapped->IsTypedefType(); +} + +LLDBSBTypeRef +LLDBSBTypeGetPointerType(LLDBSBTypeRef instance) +{ + SBType *unwrapped = reinterpret_cast(instance); + return reinterpret_cast(new SBType(unwrapped->GetPointerType())); +} + +LLDBSBTypeRef +LLDBSBTypeGetPointeeType(LLDBSBTypeRef instance) +{ + SBType *unwrapped = reinterpret_cast(instance); + return reinterpret_cast(new SBType(unwrapped->GetPointeeType())); +} + +LLDBSBTypeRef +LLDBSBTypeGetReferenceType(LLDBSBTypeRef instance) +{ + SBType *unwrapped = reinterpret_cast(instance); + return reinterpret_cast(new SBType(unwrapped->GetReferenceType())); +} + +LLDBSBTypeRef +LLDBSBTypeGetTypedefedType(LLDBSBTypeRef instance) +{ + SBType *unwrapped = reinterpret_cast(instance); + return reinterpret_cast(new SBType(unwrapped->GetTypedefedType())); +} + +LLDBSBTypeRef +LLDBSBTypeGetDereferencedType(LLDBSBTypeRef instance) +{ + SBType *unwrapped = reinterpret_cast(instance); + return reinterpret_cast(new SBType(unwrapped->GetDereferencedType())); +} + +LLDBSBTypeRef +LLDBSBTypeGetUnqualifiedType(LLDBSBTypeRef instance) +{ + SBType *unwrapped = reinterpret_cast(instance); + return reinterpret_cast(new SBType(unwrapped->GetUnqualifiedType())); +} + +LLDBSBTypeRef +LLDBSBTypeGetArrayElementType(LLDBSBTypeRef instance) +{ + SBType *unwrapped = reinterpret_cast(instance); + return reinterpret_cast(new SBType(unwrapped->GetArrayElementType())); +} + +LLDBSBTypeRef +LLDBSBTypeGetVectorElementType(LLDBSBTypeRef instance) +{ + SBType *unwrapped = reinterpret_cast(instance); + return reinterpret_cast(new SBType(unwrapped->GetVectorElementType())); +} + +LLDBSBTypeRef +LLDBSBTypeGetCanonicalType(LLDBSBTypeRef instance) +{ + SBType *unwrapped = reinterpret_cast(instance); + return reinterpret_cast(new SBType(unwrapped->GetCanonicalType())); +} + +enum lldb::BasicType +LLDBSBTypeGetBasicType(LLDBSBTypeRef instance) +{ + SBType *unwrapped = reinterpret_cast(instance); + return unwrapped->GetBasicType(); +} + +LLDBSBTypeRef +LLDBSBTypeGetBasicType2(LLDBSBTypeRef instance, lldb::BasicType type) +{ + SBType *unwrapped = reinterpret_cast(instance); + return reinterpret_cast(new SBType(unwrapped->GetBasicType(type))); +} + +unsigned int +LLDBSBTypeGetNumberOfFields(LLDBSBTypeRef instance) +{ + SBType *unwrapped = reinterpret_cast(instance); + return unwrapped->GetNumberOfFields(); +} + +unsigned int +LLDBSBTypeGetNumberOfDirectBaseClasses(LLDBSBTypeRef instance) +{ + SBType *unwrapped = reinterpret_cast(instance); + return unwrapped->GetNumberOfDirectBaseClasses(); +} + +unsigned int +LLDBSBTypeGetNumberOfVirtualBaseClasses(LLDBSBTypeRef instance) +{ + SBType *unwrapped = reinterpret_cast(instance); + return unwrapped->GetNumberOfVirtualBaseClasses(); +} + +LLDBSBTypeMemberRef +LLDBSBTypeGetFieldAtIndex(LLDBSBTypeRef instance, uint32_t idx) +{ + SBType *unwrapped = reinterpret_cast(instance); + return reinterpret_cast(new SBTypeMember(unwrapped->GetFieldAtIndex(idx))); +} + +LLDBSBTypeMemberRef +LLDBSBTypeGetDirectBaseClassAtIndex(LLDBSBTypeRef instance, uint32_t idx) +{ + SBType *unwrapped = reinterpret_cast(instance); + return reinterpret_cast(new SBTypeMember(unwrapped->GetDirectBaseClassAtIndex(idx))); +} + +LLDBSBTypeMemberRef +LLDBSBTypeGetVirtualBaseClassAtIndex(LLDBSBTypeRef instance, uint32_t idx) +{ + SBType *unwrapped = reinterpret_cast(instance); + return reinterpret_cast(new SBTypeMember(unwrapped->GetVirtualBaseClassAtIndex(idx))); +} + +LLDBSBTypeEnumMemberListRef +LLDBSBTypeGetEnumMembers(LLDBSBTypeRef instance) +{ + SBType *unwrapped = reinterpret_cast(instance); + return reinterpret_cast(new SBTypeEnumMemberList(unwrapped->GetEnumMembers())); +} + +unsigned int +LLDBSBTypeGetNumberOfTemplateArguments(LLDBSBTypeRef instance) +{ + SBType *unwrapped = reinterpret_cast(instance); + return unwrapped->GetNumberOfTemplateArguments(); +} + +LLDBSBTypeRef +LLDBSBTypeGetTemplateArgumentType(LLDBSBTypeRef instance, uint32_t idx) +{ + SBType *unwrapped = reinterpret_cast(instance); + return reinterpret_cast(new SBType(unwrapped->GetTemplateArgumentType(idx))); +} + +LLDBTemplateArgumentKind +LLDBSBTypeGetTemplateArgumentKind(LLDBSBTypeRef instance, uint32_t idx) +{ + SBType *unwrapped = reinterpret_cast(instance); + return unwrapped->GetTemplateArgumentKind(idx); +} + +LLDBSBTypeRef +LLDBSBTypeGetFunctionReturnType(LLDBSBTypeRef instance) +{ + SBType *unwrapped = reinterpret_cast(instance); + return reinterpret_cast(new SBType(unwrapped->GetFunctionReturnType())); +} + +LLDBSBTypeListRef +LLDBSBTypeGetFunctionArgumentTypes(LLDBSBTypeRef instance) +{ + SBType *unwrapped = reinterpret_cast(instance); + return reinterpret_cast(new SBTypeList(unwrapped->GetFunctionArgumentTypes())); +} + +unsigned int +LLDBSBTypeGetNumberOfMemberFunctions(LLDBSBTypeRef instance) +{ + SBType *unwrapped = reinterpret_cast(instance); + return unwrapped->GetNumberOfMemberFunctions(); +} + +LLDBSBTypeMemberFunctionRef +LLDBSBTypeGetMemberFunctionAtIndex(LLDBSBTypeRef instance, uint32_t idx) +{ + SBType *unwrapped = reinterpret_cast(instance); + return reinterpret_cast( + new SBTypeMemberFunction(unwrapped->GetMemberFunctionAtIndex(idx))); +} + +const char * +LLDBSBTypeGetName(LLDBSBTypeRef instance) +{ + SBType *unwrapped = reinterpret_cast(instance); + return unwrapped->GetName(); +} + +const char * +LLDBSBTypeGetDisplayTypeName(LLDBSBTypeRef instance) +{ + SBType *unwrapped = reinterpret_cast(instance); + return unwrapped->GetDisplayTypeName(); +} + +LLDBTypeClass +LLDBSBTypeGetTypeClass(LLDBSBTypeRef instance) +{ + SBType *unwrapped = reinterpret_cast(instance); + return unwrapped->GetTypeClass(); +} + +bool +LLDBSBTypeIsTypeComplete(LLDBSBTypeRef instance) +{ + SBType *unwrapped = reinterpret_cast(instance); + return unwrapped->IsTypeComplete(); +} + +unsigned int +LLDBSBTypeGetTypeFlags(LLDBSBTypeRef instance) +{ + SBType *unwrapped = reinterpret_cast(instance); + return unwrapped->GetTypeFlags(); +} + +bool +LLDBSBTypeGetDescription(LLDBSBTypeRef instance, LLDBSBStreamRef description, lldb::DescriptionLevel description_level) +{ + SBType *unwrapped = reinterpret_cast(instance); + return unwrapped->GetDescription(*reinterpret_cast(description), description_level); +} + +LLDBSBTypeListRef +LLDBCreateSBTypeList() +{ + return reinterpret_cast(new SBTypeList()); +} + +void +LLDBDisposeSBTypeList(LLDBSBTypeListRef instance) +{ + delete reinterpret_cast(instance); +} + +bool +LLDBSBTypeListIsValid(LLDBSBTypeListRef instance) +{ + SBTypeList *unwrapped = reinterpret_cast(instance); + return unwrapped->IsValid(); +} + +void +LLDBSBTypeListAppend(LLDBSBTypeListRef instance, LLDBSBTypeRef type) +{ + SBTypeList *unwrapped = reinterpret_cast(instance); + unwrapped->Append(*reinterpret_cast(type)); +} + +LLDBSBTypeRef +LLDBSBTypeListGetTypeAtIndex(LLDBSBTypeListRef instance, uint32_t index) +{ + SBTypeList *unwrapped = reinterpret_cast(instance); + return reinterpret_cast(new SBType(unwrapped->GetTypeAtIndex(index))); +} + +unsigned int +LLDBSBTypeListGetSize(LLDBSBTypeListRef instance) +{ + SBTypeList *unwrapped = reinterpret_cast(instance); + return unwrapped->GetSize(); +} + +#ifdef __cplusplus +} +#endif Index: source/API/Bindings/SBTypeCategoryBinding.cpp =================================================================== --- source/API/Bindings/SBTypeCategoryBinding.cpp +++ source/API/Bindings/SBTypeCategoryBinding.cpp @@ -0,0 +1,259 @@ +//===-- SBTypeCategoryBinding.cpp -------------------------------*- C++ -*-===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +#include "lldb/Bindings/LLDBBinding.h" +#include "lldb/API/LLDB.h" +#include "lldb/API/SBTypeCategory.h" +#include "lldb/API/SBTypeNameSpecifier.h" +#include "lldb/API/SBTypeFilter.h" +#include "lldb/API/SBTypeSynthetic.h" +#include "lldb/API/SBTypeSummary.h" +#include "lldb/API/SBTypeFormat.h" + +using namespace lldb; + +#ifdef __cplusplus +extern "C" { +#endif + +LLDBSBTypeCategoryRef +LLDBCreateSBTypeCategory() +{ + return reinterpret_cast(new SBTypeCategory()); +} + +void +LLDBDisposeSBTypeCategory(LLDBSBTypeCategoryRef instance) +{ + delete reinterpret_cast(instance); +} + +bool +LLDBSBTypeCategoryIsValid(LLDBSBTypeCategoryRef instance) +{ + SBTypeCategory *unwrapped = reinterpret_cast(instance); + return unwrapped->IsValid(); +} + +bool +LLDBSBTypeCategoryGetEnabled(LLDBSBTypeCategoryRef instance) +{ + SBTypeCategory *unwrapped = reinterpret_cast(instance); + return unwrapped->GetEnabled(); +} + +void +LLDBSBTypeCategorySetEnabled(LLDBSBTypeCategoryRef instance, bool var0) +{ + SBTypeCategory *unwrapped = reinterpret_cast(instance); + unwrapped->SetEnabled(var0); +} + +const char * +LLDBSBTypeCategoryGetName(LLDBSBTypeCategoryRef instance) +{ + SBTypeCategory *unwrapped = reinterpret_cast(instance); + return unwrapped->GetName(); +} + +bool +LLDBSBTypeCategoryGetDescription(LLDBSBTypeCategoryRef instance, LLDBSBStreamRef description, + lldb::DescriptionLevel description_level) +{ + SBTypeCategory *unwrapped = reinterpret_cast(instance); + return unwrapped->GetDescription(*reinterpret_cast(description), description_level); +} + +unsigned int +LLDBSBTypeCategoryGetNumFormats(LLDBSBTypeCategoryRef instance) +{ + SBTypeCategory *unwrapped = reinterpret_cast(instance); + return unwrapped->GetNumFormats(); +} + +unsigned int +LLDBSBTypeCategoryGetNumSummaries(LLDBSBTypeCategoryRef instance) +{ + SBTypeCategory *unwrapped = reinterpret_cast(instance); + return unwrapped->GetNumSummaries(); +} + +unsigned int +LLDBSBTypeCategoryGetNumFilters(LLDBSBTypeCategoryRef instance) +{ + SBTypeCategory *unwrapped = reinterpret_cast(instance); + return unwrapped->GetNumFilters(); +} + +unsigned int +LLDBSBTypeCategoryGetNumSynthetics(LLDBSBTypeCategoryRef instance) +{ + SBTypeCategory *unwrapped = reinterpret_cast(instance); + return unwrapped->GetNumSynthetics(); +} + +LLDBSBTypeNameSpecifierRef +LLDBSBTypeCategoryGetTypeNameSpecifierForFilterAtIndex(LLDBSBTypeCategoryRef instance, uint32_t var0) +{ + SBTypeCategory *unwrapped = reinterpret_cast(instance); + return reinterpret_cast( + new SBTypeNameSpecifier(unwrapped->GetTypeNameSpecifierForFilterAtIndex(var0))); +} + +LLDBSBTypeNameSpecifierRef +LLDBSBTypeCategoryGetTypeNameSpecifierForFormatAtIndex(LLDBSBTypeCategoryRef instance, uint32_t var0) +{ + SBTypeCategory *unwrapped = reinterpret_cast(instance); + return reinterpret_cast( + new SBTypeNameSpecifier(unwrapped->GetTypeNameSpecifierForFormatAtIndex(var0))); +} + +LLDBSBTypeNameSpecifierRef +LLDBSBTypeCategoryGetTypeNameSpecifierForSummaryAtIndex(LLDBSBTypeCategoryRef instance, uint32_t var0) +{ + SBTypeCategory *unwrapped = reinterpret_cast(instance); + return reinterpret_cast( + new SBTypeNameSpecifier(unwrapped->GetTypeNameSpecifierForSummaryAtIndex(var0))); +} + +LLDBSBTypeNameSpecifierRef +LLDBSBTypeCategoryGetTypeNameSpecifierForSyntheticAtIndex(LLDBSBTypeCategoryRef instance, uint32_t var0) +{ + SBTypeCategory *unwrapped = reinterpret_cast(instance); + return reinterpret_cast( + new SBTypeNameSpecifier(unwrapped->GetTypeNameSpecifierForSyntheticAtIndex(var0))); +} + +LLDBSBTypeFilterRef +LLDBSBTypeCategoryGetFilterForType(LLDBSBTypeCategoryRef instance, LLDBSBTypeNameSpecifierRef var0) +{ + SBTypeCategory *unwrapped = reinterpret_cast(instance); + return reinterpret_cast( + new SBTypeFilter(unwrapped->GetFilterForType(*reinterpret_cast(var0)))); +} + +LLDBSBTypeFormatRef +LLDBSBTypeCategoryGetFormatForType(LLDBSBTypeCategoryRef instance, LLDBSBTypeNameSpecifierRef var0) +{ + SBTypeCategory *unwrapped = reinterpret_cast(instance); + return reinterpret_cast( + new SBTypeFormat(unwrapped->GetFormatForType(*reinterpret_cast(var0)))); +} + +LLDBSBTypeSummaryRef +LLDBSBTypeCategoryGetSummaryForType(LLDBSBTypeCategoryRef instance, LLDBSBTypeNameSpecifierRef var0) +{ + SBTypeCategory *unwrapped = reinterpret_cast(instance); + return reinterpret_cast( + new SBTypeSummary(unwrapped->GetSummaryForType(*reinterpret_cast(var0)))); +} + +LLDBSBTypeSyntheticRef +LLDBSBTypeCategoryGetSyntheticForType(LLDBSBTypeCategoryRef instance, LLDBSBTypeNameSpecifierRef var0) +{ + SBTypeCategory *unwrapped = reinterpret_cast(instance); + return reinterpret_cast( + new SBTypeSynthetic(unwrapped->GetSyntheticForType(*reinterpret_cast(var0)))); +} + +LLDBSBTypeFilterRef +LLDBSBTypeCategoryGetFilterAtIndex(LLDBSBTypeCategoryRef instance, uint32_t var0) +{ + SBTypeCategory *unwrapped = reinterpret_cast(instance); + return reinterpret_cast(new SBTypeFilter(unwrapped->GetFilterAtIndex(var0))); +} + +LLDBSBTypeFormatRef +LLDBSBTypeCategoryGetFormatAtIndex(LLDBSBTypeCategoryRef instance, uint32_t var0) +{ + SBTypeCategory *unwrapped = reinterpret_cast(instance); + return reinterpret_cast(new SBTypeFormat(unwrapped->GetFormatAtIndex(var0))); +} + +LLDBSBTypeSummaryRef +LLDBSBTypeCategoryGetSummaryAtIndex(LLDBSBTypeCategoryRef instance, uint32_t var0) +{ + SBTypeCategory *unwrapped = reinterpret_cast(instance); + return reinterpret_cast(new SBTypeSummary(unwrapped->GetSummaryAtIndex(var0))); +} + +LLDBSBTypeSyntheticRef +LLDBSBTypeCategoryGetSyntheticAtIndex(LLDBSBTypeCategoryRef instance, uint32_t var0) +{ + SBTypeCategory *unwrapped = reinterpret_cast(instance); + return reinterpret_cast(new SBTypeSynthetic(unwrapped->GetSyntheticAtIndex(var0))); +} + +bool +LLDBSBTypeCategoryAddTypeFormat(LLDBSBTypeCategoryRef instance, LLDBSBTypeNameSpecifierRef var0, + LLDBSBTypeFormatRef var1) +{ + SBTypeCategory *unwrapped = reinterpret_cast(instance); + return unwrapped->AddTypeFormat(*reinterpret_cast(var0), + *reinterpret_cast(var1)); +} + +bool +LLDBSBTypeCategoryDeleteTypeFormat(LLDBSBTypeCategoryRef instance, LLDBSBTypeNameSpecifierRef var0) +{ + SBTypeCategory *unwrapped = reinterpret_cast(instance); + return unwrapped->DeleteTypeFormat(*reinterpret_cast(var0)); +} + +bool +LLDBSBTypeCategoryAddTypeSummary(LLDBSBTypeCategoryRef instance, LLDBSBTypeNameSpecifierRef var0, + LLDBSBTypeSummaryRef var1) +{ + SBTypeCategory *unwrapped = reinterpret_cast(instance); + return unwrapped->AddTypeSummary(*reinterpret_cast(var0), + *reinterpret_cast(var1)); +} + +bool +LLDBSBTypeCategoryDeleteTypeSummary(LLDBSBTypeCategoryRef instance, LLDBSBTypeNameSpecifierRef var0) +{ + SBTypeCategory *unwrapped = reinterpret_cast(instance); + return unwrapped->DeleteTypeSummary(*reinterpret_cast(var0)); +} + +bool +LLDBSBTypeCategoryAddTypeFilter(LLDBSBTypeCategoryRef instance, LLDBSBTypeNameSpecifierRef var0, + LLDBSBTypeFilterRef var1) +{ + SBTypeCategory *unwrapped = reinterpret_cast(instance); + return unwrapped->AddTypeFilter(*reinterpret_cast(var0), + *reinterpret_cast(var1)); +} + +bool +LLDBSBTypeCategoryDeleteTypeFilter(LLDBSBTypeCategoryRef instance, LLDBSBTypeNameSpecifierRef var0) +{ + SBTypeCategory *unwrapped = reinterpret_cast(instance); + return unwrapped->DeleteTypeFilter(*reinterpret_cast(var0)); +} + +bool +LLDBSBTypeCategoryAddTypeSynthetic(LLDBSBTypeCategoryRef instance, LLDBSBTypeNameSpecifierRef var0, + LLDBSBTypeSyntheticRef var1) +{ + SBTypeCategory *unwrapped = reinterpret_cast(instance); + return unwrapped->AddTypeSynthetic(*reinterpret_cast(var0), + *reinterpret_cast(var1)); +} + +bool +LLDBSBTypeCategoryDeleteTypeSynthetic(LLDBSBTypeCategoryRef instance, LLDBSBTypeNameSpecifierRef var0) +{ + SBTypeCategory *unwrapped = reinterpret_cast(instance); + return unwrapped->DeleteTypeSynthetic(*reinterpret_cast(var0)); +} + +#ifdef __cplusplus +} +#endif Index: source/API/Bindings/SBTypeEnumMemberBinding.cpp =================================================================== --- source/API/Bindings/SBTypeEnumMemberBinding.cpp +++ source/API/Bindings/SBTypeEnumMemberBinding.cpp @@ -0,0 +1,117 @@ +//===-- SBTypeEnumMemberBinding.cpp -----------------------------*- C++ -*-===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +#include "lldb/Bindings/LLDBBinding.h" +#include "lldb/API/LLDB.h" +#include "lldb/API/SBTypeEnumMember.h" + +using namespace lldb; + +#ifdef __cplusplus +extern "C" { +#endif + +LLDBSBTypeEnumMemberRef +LLDBCreateSBTypeEnumMember() +{ + return reinterpret_cast(new SBTypeEnumMember()); +} + +void +LLDBDisposeSBTypeEnumMember(LLDBSBTypeEnumMemberRef instance) +{ + delete reinterpret_cast(instance); +} + +bool +LLDBSBTypeEnumMemberIsValid(LLDBSBTypeEnumMemberRef instance) +{ + SBTypeEnumMember *unwrapped = reinterpret_cast(instance); + return unwrapped->IsValid(); +} + +long long +LLDBSBTypeEnumMemberGetValueAsSigned(LLDBSBTypeEnumMemberRef instance) +{ + SBTypeEnumMember *unwrapped = reinterpret_cast(instance); + return unwrapped->GetValueAsSigned(); +} + +unsigned long long +LLDBSBTypeEnumMemberGetValueAsUnsigned(LLDBSBTypeEnumMemberRef instance) +{ + SBTypeEnumMember *unwrapped = reinterpret_cast(instance); + return unwrapped->GetValueAsUnsigned(); +} + +const char * +LLDBSBTypeEnumMemberGetName(LLDBSBTypeEnumMemberRef instance) +{ + SBTypeEnumMember *unwrapped = reinterpret_cast(instance); + return unwrapped->GetName(); +} + +LLDBSBTypeRef +LLDBSBTypeEnumMemberGetType(LLDBSBTypeEnumMemberRef instance) +{ + SBTypeEnumMember *unwrapped = reinterpret_cast(instance); + return reinterpret_cast(new SBType(unwrapped->GetType())); +} + +bool +LLDBSBTypeEnumMemberGetDescription(LLDBSBTypeEnumMemberRef instance, LLDBSBStreamRef description, + lldb::DescriptionLevel description_level) +{ + SBTypeEnumMember *unwrapped = reinterpret_cast(instance); + return unwrapped->GetDescription(*reinterpret_cast(description), description_level); +} + +LLDBSBTypeEnumMemberListRef +LLDBCreateSBTypeEnumMemberList() +{ + return reinterpret_cast(new SBTypeEnumMemberList()); +} + +void +LLDBDisposeSBTypeEnumMemberList(LLDBSBTypeEnumMemberListRef instance) +{ + delete reinterpret_cast(instance); +} + +bool +LLDBSBTypeEnumMemberListIsValid(LLDBSBTypeEnumMemberListRef instance) +{ + SBTypeEnumMemberList *unwrapped = reinterpret_cast(instance); + return unwrapped->IsValid(); +} + +void +LLDBSBTypeEnumMemberListAppend(LLDBSBTypeEnumMemberListRef instance, LLDBSBTypeEnumMemberRef entry) +{ + SBTypeEnumMemberList *unwrapped = reinterpret_cast(instance); + unwrapped->Append(*reinterpret_cast(entry)); +} + +LLDBSBTypeEnumMemberRef +LLDBSBTypeEnumMemberListGetTypeEnumMemberAtIndex(LLDBSBTypeEnumMemberListRef instance, uint32_t index) +{ + SBTypeEnumMemberList *unwrapped = reinterpret_cast(instance); + return reinterpret_cast(new SBTypeEnumMember(unwrapped->GetTypeEnumMemberAtIndex(index))); +} + +unsigned int +LLDBSBTypeEnumMemberListGetSize(LLDBSBTypeEnumMemberListRef instance) +{ + SBTypeEnumMemberList *unwrapped = reinterpret_cast(instance); + return unwrapped->GetSize(); +} + +#ifdef __cplusplus +} +#endif Index: source/API/Bindings/SBTypeFilterBinding.cpp =================================================================== --- source/API/Bindings/SBTypeFilterBinding.cpp +++ source/API/Bindings/SBTypeFilterBinding.cpp @@ -0,0 +1,111 @@ +//===-- SBTypeFilterBinding.cpp ---------------------------------*- C++ -*-===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +#include "lldb/Bindings/LLDBBinding.h" +#include "lldb/API/LLDB.h" +#include "lldb/API/SBTypeFilter.h" + +using namespace lldb; + +#ifdef __cplusplus +extern "C" { +#endif + +LLDBSBTypeFilterRef +LLDBCreateSBTypeFilter() +{ + return reinterpret_cast(new SBTypeFilter()); +} + +LLDBSBTypeFilterRef +LLDBCreateSBTypeFilter2(uint32_t options) +{ + return reinterpret_cast(new SBTypeFilter(options)); +} + +void +LLDBDisposeSBTypeFilter(LLDBSBTypeFilterRef instance) +{ + delete reinterpret_cast(instance); +} + +bool +LLDBSBTypeFilterIsValid(LLDBSBTypeFilterRef instance) +{ + SBTypeFilter *unwrapped = reinterpret_cast(instance); + return unwrapped->IsValid(); +} + +unsigned int +LLDBSBTypeFilterGetNumberOfExpressionPaths(LLDBSBTypeFilterRef instance) +{ + SBTypeFilter *unwrapped = reinterpret_cast(instance); + return unwrapped->GetNumberOfExpressionPaths(); +} + +const char * +LLDBSBTypeFilterGetExpressionPathAtIndex(LLDBSBTypeFilterRef instance, uint32_t i) +{ + SBTypeFilter *unwrapped = reinterpret_cast(instance); + return unwrapped->GetExpressionPathAtIndex(i); +} + +bool +LLDBSBTypeFilterReplaceExpressionPathAtIndex(LLDBSBTypeFilterRef instance, uint32_t i, const char *item) +{ + SBTypeFilter *unwrapped = reinterpret_cast(instance); + return unwrapped->ReplaceExpressionPathAtIndex(i, item); +} + +void +LLDBSBTypeFilterAppendExpressionPath(LLDBSBTypeFilterRef instance, const char *item) +{ + SBTypeFilter *unwrapped = reinterpret_cast(instance); + unwrapped->AppendExpressionPath(item); +} + +void +LLDBSBTypeFilterClear(LLDBSBTypeFilterRef instance) +{ + SBTypeFilter *unwrapped = reinterpret_cast(instance); + unwrapped->Clear(); +} + +unsigned int +LLDBSBTypeFilterGetOptions(LLDBSBTypeFilterRef instance) +{ + SBTypeFilter *unwrapped = reinterpret_cast(instance); + return unwrapped->GetOptions(); +} + +void +LLDBSBTypeFilterSetOptions(LLDBSBTypeFilterRef instance, uint32_t var0) +{ + SBTypeFilter *unwrapped = reinterpret_cast(instance); + unwrapped->SetOptions(var0); +} + +bool +LLDBSBTypeFilterGetDescription(LLDBSBTypeFilterRef instance, LLDBSBStreamRef description, + lldb::DescriptionLevel description_level) +{ + SBTypeFilter *unwrapped = reinterpret_cast(instance); + return unwrapped->GetDescription(*reinterpret_cast(description), description_level); +} + +bool +LLDBSBTypeFilterIsEqualTo(LLDBSBTypeFilterRef instance, LLDBSBTypeFilterRef rhs) +{ + SBTypeFilter *unwrapped = reinterpret_cast(instance); + return unwrapped->IsEqualTo(*reinterpret_cast(rhs)); +} + +#ifdef __cplusplus +} +#endif Index: source/API/Bindings/SBTypeFormatBinding.cpp =================================================================== --- source/API/Bindings/SBTypeFormatBinding.cpp +++ source/API/Bindings/SBTypeFormatBinding.cpp @@ -0,0 +1,110 @@ +//===-- SBTypeFormatBinding.cpp ---------------------------------*- C++ -*-===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +#include "lldb/Bindings/LLDBBinding.h" +#include "lldb/API/LLDB.h" +#include "lldb/API/SBTypeFormat.h" + +using namespace lldb; + +#ifdef __cplusplus +extern "C" { +#endif + +LLDBSBTypeFormatRef +LLDBCreateSBTypeFormat() +{ + return reinterpret_cast(new SBTypeFormat()); +} + +LLDBSBTypeFormatRef +LLDBCreateSBTypeFormat2(lldb::Format format, uint32_t options) +{ + return reinterpret_cast(new SBTypeFormat(format, options)); +} + +LLDBSBTypeFormatRef +LLDBCreateSBTypeFormat3(const char *type, uint32_t options) +{ + return reinterpret_cast(new SBTypeFormat(type, options)); +} + +void +LLDBDisposeSBTypeFormat(LLDBSBTypeFormatRef instance) +{ + delete reinterpret_cast(instance); +} + +bool +LLDBSBTypeFormatIsValid(LLDBSBTypeFormatRef instance) +{ + SBTypeFormat *unwrapped = reinterpret_cast(instance); + return unwrapped->IsValid(); +} + +enum lldb::Format +LLDBSBTypeFormatGetFormat(LLDBSBTypeFormatRef instance) +{ + SBTypeFormat *unwrapped = reinterpret_cast(instance); + return unwrapped->GetFormat(); +} + +const char * +LLDBSBTypeFormatGetTypeName(LLDBSBTypeFormatRef instance) +{ + SBTypeFormat *unwrapped = reinterpret_cast(instance); + return unwrapped->GetTypeName(); +} + +unsigned int +LLDBSBTypeFormatGetOptions(LLDBSBTypeFormatRef instance) +{ + SBTypeFormat *unwrapped = reinterpret_cast(instance); + return unwrapped->GetOptions(); +} + +void +LLDBSBTypeFormatSetFormat(LLDBSBTypeFormatRef instance, LLDBFormat var0) +{ + SBTypeFormat *unwrapped = reinterpret_cast(instance); + unwrapped->SetFormat(var0); +} + +void +LLDBSBTypeFormatSetTypeName(LLDBSBTypeFormatRef instance, const char *var0) +{ + SBTypeFormat *unwrapped = reinterpret_cast(instance); + unwrapped->SetTypeName(var0); +} + +void +LLDBSBTypeFormatSetOptions(LLDBSBTypeFormatRef instance, uint32_t var0) +{ + SBTypeFormat *unwrapped = reinterpret_cast(instance); + unwrapped->SetOptions(var0); +} + +bool +LLDBSBTypeFormatGetDescription(LLDBSBTypeFormatRef instance, LLDBSBStreamRef description, + lldb::DescriptionLevel description_level) +{ + SBTypeFormat *unwrapped = reinterpret_cast(instance); + return unwrapped->GetDescription(*reinterpret_cast(description), description_level); +} + +bool +LLDBSBTypeFormatIsEqualTo(LLDBSBTypeFormatRef instance, LLDBSBTypeFormatRef rhs) +{ + SBTypeFormat *unwrapped = reinterpret_cast(instance); + return unwrapped->IsEqualTo(*reinterpret_cast(rhs)); +} + +#ifdef __cplusplus +} +#endif Index: source/API/Bindings/SBTypeNameSpecifierBinding.cpp =================================================================== --- source/API/Bindings/SBTypeNameSpecifierBinding.cpp +++ source/API/Bindings/SBTypeNameSpecifierBinding.cpp @@ -0,0 +1,89 @@ +//===-- SBTypeNameSpecifierBinding.cpp --------------------------*- C++ -*-===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +#include "lldb/Bindings/LLDBBinding.h" +#include "lldb/API/LLDB.h" +#include "lldb/API/SBTypeNameSpecifier.h" + +using namespace lldb; + +#ifdef __cplusplus +extern "C" { +#endif + +LLDBSBTypeNameSpecifierRef +LLDBCreateSBTypeNameSpecifier() +{ + return reinterpret_cast(new SBTypeNameSpecifier()); +} + +LLDBSBTypeNameSpecifierRef +LLDBCreateSBTypeNameSpecifier2(const char *name, bool is_regex) +{ + return reinterpret_cast(new SBTypeNameSpecifier(name, is_regex)); +} + +LLDBSBTypeNameSpecifierRef +LLDBCreateSBTypeNameSpecifier3(LLDBSBTypeRef type) +{ + return reinterpret_cast(new SBTypeNameSpecifier(*reinterpret_cast(type))); +} + +void +LLDBDisposeSBTypeNameSpecifier(LLDBSBTypeNameSpecifierRef instance) +{ + delete reinterpret_cast(instance); +} + +bool +LLDBSBTypeNameSpecifierIsValid(LLDBSBTypeNameSpecifierRef instance) +{ + SBTypeNameSpecifier *unwrapped = reinterpret_cast(instance); + return unwrapped->IsValid(); +} + +const char * +LLDBSBTypeNameSpecifierGetName(LLDBSBTypeNameSpecifierRef instance) +{ + SBTypeNameSpecifier *unwrapped = reinterpret_cast(instance); + return unwrapped->GetName(); +} + +LLDBSBTypeRef +LLDBSBTypeNameSpecifierGetType(LLDBSBTypeNameSpecifierRef instance) +{ + SBTypeNameSpecifier *unwrapped = reinterpret_cast(instance); + return reinterpret_cast(new SBType(unwrapped->GetType())); +} + +bool +LLDBSBTypeNameSpecifierIsRegex(LLDBSBTypeNameSpecifierRef instance) +{ + SBTypeNameSpecifier *unwrapped = reinterpret_cast(instance); + return unwrapped->IsRegex(); +} + +bool +LLDBSBTypeNameSpecifierGetDescription(LLDBSBTypeNameSpecifierRef instance, LLDBSBStreamRef description, + lldb::DescriptionLevel description_level) +{ + SBTypeNameSpecifier *unwrapped = reinterpret_cast(instance); + return unwrapped->GetDescription(*reinterpret_cast(description), description_level); +} + +bool +LLDBSBTypeNameSpecifierIsEqualTo(LLDBSBTypeNameSpecifierRef instance, LLDBSBTypeNameSpecifierRef rhs) +{ + SBTypeNameSpecifier *unwrapped = reinterpret_cast(instance); + return unwrapped->IsEqualTo(*reinterpret_cast(rhs)); +} + +#ifdef __cplusplus +} +#endif Index: source/API/Bindings/SBTypeSummaryBinding.cpp =================================================================== --- source/API/Bindings/SBTypeSummaryBinding.cpp +++ source/API/Bindings/SBTypeSummaryBinding.cpp @@ -0,0 +1,187 @@ +//===-- SBTypeSummaryBinding.cpp --------------------------------*- C++ -*-===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +#include "lldb/Bindings/LLDBBinding.h" +#include "lldb/API/LLDB.h" +#include "lldb/API/SBTypeSummary.h" + +using namespace lldb; + +#ifdef __cplusplus +extern "C" { +#endif + +LLDBSBTypeSummaryOptionsRef +LLDBCreateSBTypeSummaryOptions() +{ + return reinterpret_cast(new SBTypeSummaryOptions()); +} + +void +LLDBDisposeSBTypeSummaryOptions(LLDBSBTypeSummaryOptionsRef instance) +{ + delete reinterpret_cast(instance); +} + +bool +LLDBSBTypeSummaryOptionsIsValid(LLDBSBTypeSummaryOptionsRef instance) +{ + SBTypeSummaryOptions *unwrapped = reinterpret_cast(instance); + return unwrapped->IsValid(); +} + +enum lldb::LanguageType +LLDBSBTypeSummaryOptionsGetLanguage(LLDBSBTypeSummaryOptionsRef instance) +{ + SBTypeSummaryOptions *unwrapped = reinterpret_cast(instance); + return unwrapped->GetLanguage(); +} + +enum lldb::TypeSummaryCapping +LLDBSBTypeSummaryOptionsGetCapping(LLDBSBTypeSummaryOptionsRef instance) +{ + SBTypeSummaryOptions *unwrapped = reinterpret_cast(instance); + return unwrapped->GetCapping(); +} + +void +LLDBSBTypeSummaryOptionsSetLanguage(LLDBSBTypeSummaryOptionsRef instance, LLDBLanguageType var0) +{ + SBTypeSummaryOptions *unwrapped = reinterpret_cast(instance); + unwrapped->SetLanguage(var0); +} + +void +LLDBSBTypeSummaryOptionsSetCapping(LLDBSBTypeSummaryOptionsRef instance, LLDBTypeSummaryCapping var0) +{ + SBTypeSummaryOptions *unwrapped = reinterpret_cast(instance); + unwrapped->SetCapping(var0); +} + +LLDBSBTypeSummaryRef +LLDBCreateSBTypeSummary() +{ + return reinterpret_cast(new SBTypeSummary()); +} + +LLDBSBTypeSummaryRef +LLDBSBTypeSummaryCreateWithSummaryString(const char *data, uint32_t options) +{ + return reinterpret_cast( + new SBTypeSummary(lldb::SBTypeSummary::CreateWithSummaryString(data, options))); +} + +LLDBSBTypeSummaryRef +LLDBSBTypeSummaryCreateWithFunctionName(const char *data, uint32_t options) +{ + return reinterpret_cast( + new SBTypeSummary(lldb::SBTypeSummary::CreateWithFunctionName(data, options))); +} + +LLDBSBTypeSummaryRef +LLDBSBTypeSummaryCreateWithScriptCode(const char *data, uint32_t options) +{ + return reinterpret_cast( + new SBTypeSummary(lldb::SBTypeSummary::CreateWithScriptCode(data, options))); +} + +void +LLDBDisposeSBTypeSummary(LLDBSBTypeSummaryRef instance) +{ + delete reinterpret_cast(instance); +} + +bool +LLDBSBTypeSummaryIsValid(LLDBSBTypeSummaryRef instance) +{ + SBTypeSummary *unwrapped = reinterpret_cast(instance); + return unwrapped->IsValid(); +} + +bool +LLDBSBTypeSummaryIsFunctionCode(LLDBSBTypeSummaryRef instance) +{ + SBTypeSummary *unwrapped = reinterpret_cast(instance); + return unwrapped->IsFunctionCode(); +} + +bool +LLDBSBTypeSummaryIsFunctionName(LLDBSBTypeSummaryRef instance) +{ + SBTypeSummary *unwrapped = reinterpret_cast(instance); + return unwrapped->IsFunctionName(); +} + +bool +LLDBSBTypeSummaryIsSummaryString(LLDBSBTypeSummaryRef instance) +{ + SBTypeSummary *unwrapped = reinterpret_cast(instance); + return unwrapped->IsSummaryString(); +} + +const char * +LLDBSBTypeSummaryGetData(LLDBSBTypeSummaryRef instance) +{ + SBTypeSummary *unwrapped = reinterpret_cast(instance); + return unwrapped->GetData(); +} + +void +LLDBSBTypeSummarySetSummaryString(LLDBSBTypeSummaryRef instance, const char *data) +{ + SBTypeSummary *unwrapped = reinterpret_cast(instance); + unwrapped->SetSummaryString(data); +} + +void +LLDBSBTypeSummarySetFunctionName(LLDBSBTypeSummaryRef instance, const char *data) +{ + SBTypeSummary *unwrapped = reinterpret_cast(instance); + unwrapped->SetFunctionName(data); +} + +void +LLDBSBTypeSummarySetFunctionCode(LLDBSBTypeSummaryRef instance, const char *data) +{ + SBTypeSummary *unwrapped = reinterpret_cast(instance); + unwrapped->SetFunctionCode(data); +} + +unsigned int +LLDBSBTypeSummaryGetOptions(LLDBSBTypeSummaryRef instance) +{ + SBTypeSummary *unwrapped = reinterpret_cast(instance); + return unwrapped->GetOptions(); +} + +void +LLDBSBTypeSummarySetOptions(LLDBSBTypeSummaryRef instance, uint32_t var0) +{ + SBTypeSummary *unwrapped = reinterpret_cast(instance); + unwrapped->SetOptions(var0); +} + +bool +LLDBSBTypeSummaryGetDescription(LLDBSBTypeSummaryRef instance, LLDBSBStreamRef description, + lldb::DescriptionLevel description_level) +{ + SBTypeSummary *unwrapped = reinterpret_cast(instance); + return unwrapped->GetDescription(*reinterpret_cast(description), description_level); +} + +bool +LLDBSBTypeSummaryIsEqualTo(LLDBSBTypeSummaryRef instance, LLDBSBTypeSummaryRef rhs) +{ + SBTypeSummary *unwrapped = reinterpret_cast(instance); + return unwrapped->IsEqualTo(*reinterpret_cast(rhs)); +} + +#ifdef __cplusplus +} +#endif Index: source/API/Bindings/SBTypeSyntheticBinding.cpp =================================================================== --- source/API/Bindings/SBTypeSyntheticBinding.cpp +++ source/API/Bindings/SBTypeSyntheticBinding.cpp @@ -0,0 +1,119 @@ +//===-- SBTypeSyntheticBinding.cpp ------------------------------*- C++ -*-===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +#include "lldb/Bindings/LLDBBinding.h" +#include "lldb/API/LLDB.h" +#include "lldb/API/SBTypeSynthetic.h" + +using namespace lldb; + +#ifdef __cplusplus +extern "C" { +#endif + +LLDBSBTypeSyntheticRef +LLDBCreateSBTypeSynthetic() +{ + return reinterpret_cast(new SBTypeSynthetic()); +} + +LLDBSBTypeSyntheticRef +LLDBSBTypeSyntheticCreateWithClassName(const char *data, uint32_t options) +{ + return reinterpret_cast( + new SBTypeSynthetic(lldb::SBTypeSynthetic::CreateWithClassName(data, options))); +} + +LLDBSBTypeSyntheticRef +LLDBSBTypeSyntheticCreateWithScriptCode(const char *data, uint32_t options) +{ + return reinterpret_cast( + new SBTypeSynthetic(lldb::SBTypeSynthetic::CreateWithScriptCode(data, options))); +} + +void +LLDBDisposeSBTypeSynthetic(LLDBSBTypeSyntheticRef instance) +{ + delete reinterpret_cast(instance); +} + +bool +LLDBSBTypeSyntheticIsValid(LLDBSBTypeSyntheticRef instance) +{ + SBTypeSynthetic *unwrapped = reinterpret_cast(instance); + return unwrapped->IsValid(); +} + +bool +LLDBSBTypeSyntheticIsClassCode(LLDBSBTypeSyntheticRef instance) +{ + SBTypeSynthetic *unwrapped = reinterpret_cast(instance); + return unwrapped->IsClassCode(); +} + +bool +LLDBSBTypeSyntheticIsClassName(LLDBSBTypeSyntheticRef instance) +{ + SBTypeSynthetic *unwrapped = reinterpret_cast(instance); + return unwrapped->IsClassName(); +} + +const char * +LLDBSBTypeSyntheticGetData(LLDBSBTypeSyntheticRef instance) +{ + SBTypeSynthetic *unwrapped = reinterpret_cast(instance); + return unwrapped->GetData(); +} + +void +LLDBSBTypeSyntheticSetClassName(LLDBSBTypeSyntheticRef instance, const char *data) +{ + SBTypeSynthetic *unwrapped = reinterpret_cast(instance); + unwrapped->SetClassName(data); +} + +void +LLDBSBTypeSyntheticSetClassCode(LLDBSBTypeSyntheticRef instance, const char *data) +{ + SBTypeSynthetic *unwrapped = reinterpret_cast(instance); + unwrapped->SetClassCode(data); +} + +unsigned int +LLDBSBTypeSyntheticGetOptions(LLDBSBTypeSyntheticRef instance) +{ + SBTypeSynthetic *unwrapped = reinterpret_cast(instance); + return unwrapped->GetOptions(); +} + +void +LLDBSBTypeSyntheticSetOptions(LLDBSBTypeSyntheticRef instance, uint32_t var0) +{ + SBTypeSynthetic *unwrapped = reinterpret_cast(instance); + unwrapped->SetOptions(var0); +} + +bool +LLDBSBTypeSyntheticGetDescription(LLDBSBTypeSyntheticRef instance, LLDBSBStreamRef description, + lldb::DescriptionLevel description_level) +{ + SBTypeSynthetic *unwrapped = reinterpret_cast(instance); + return unwrapped->GetDescription(*reinterpret_cast(description), description_level); +} + +bool +LLDBSBTypeSyntheticIsEqualTo(LLDBSBTypeSyntheticRef instance, LLDBSBTypeSyntheticRef rhs) +{ + SBTypeSynthetic *unwrapped = reinterpret_cast(instance); + return unwrapped->IsEqualTo(*reinterpret_cast(rhs)); +} + +#ifdef __cplusplus +} +#endif Index: source/API/Bindings/SBUnixSignalsBinding.cpp =================================================================== --- source/API/Bindings/SBUnixSignalsBinding.cpp +++ source/API/Bindings/SBUnixSignalsBinding.cpp @@ -0,0 +1,118 @@ +//===-- SBUnixSignalsBinding.cpp --------------------------------*- C++ -*-===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +#include "lldb/Bindings/LLDBBinding.h" +#include "lldb/API/LLDB.h" +#include "lldb/API/SBUnixSignals.h" + +using namespace lldb; + +#ifdef __cplusplus +extern "C" { +#endif + +LLDBSBUnixSignalsRef +LLDBCreateSBUnixSignals() +{ + return reinterpret_cast(new SBUnixSignals()); +} + +void +LLDBDisposeSBUnixSignals(LLDBSBUnixSignalsRef instance) +{ + delete reinterpret_cast(instance); +} + +void +LLDBSBUnixSignalsClear(LLDBSBUnixSignalsRef instance) +{ + SBUnixSignals *unwrapped = reinterpret_cast(instance); + unwrapped->Clear(); +} + +bool +LLDBSBUnixSignalsIsValid(LLDBSBUnixSignalsRef instance) +{ + SBUnixSignals *unwrapped = reinterpret_cast(instance); + return unwrapped->IsValid(); +} + +const char * +LLDBSBUnixSignalsGetSignalAsCString(LLDBSBUnixSignalsRef instance, int signo) +{ + SBUnixSignals *unwrapped = reinterpret_cast(instance); + return unwrapped->GetSignalAsCString(signo); +} + +int +LLDBSBUnixSignalsGetSignalNumberFromName(LLDBSBUnixSignalsRef instance, const char *name) +{ + SBUnixSignals *unwrapped = reinterpret_cast(instance); + return unwrapped->GetSignalNumberFromName(name); +} + +bool +LLDBSBUnixSignalsGetShouldSuppress(LLDBSBUnixSignalsRef instance, int signo) +{ + SBUnixSignals *unwrapped = reinterpret_cast(instance); + return unwrapped->GetShouldSuppress(signo); +} + +bool +LLDBSBUnixSignalsSetShouldSuppress(LLDBSBUnixSignalsRef instance, int signo, bool value) +{ + SBUnixSignals *unwrapped = reinterpret_cast(instance); + return unwrapped->SetShouldSuppress(signo, value); +} + +bool +LLDBSBUnixSignalsGetShouldStop(LLDBSBUnixSignalsRef instance, int signo) +{ + SBUnixSignals *unwrapped = reinterpret_cast(instance); + return unwrapped->GetShouldStop(signo); +} + +bool +LLDBSBUnixSignalsSetShouldStop(LLDBSBUnixSignalsRef instance, int signo, bool value) +{ + SBUnixSignals *unwrapped = reinterpret_cast(instance); + return unwrapped->SetShouldStop(signo, value); +} + +bool +LLDBSBUnixSignalsGetShouldNotify(LLDBSBUnixSignalsRef instance, int signo) +{ + SBUnixSignals *unwrapped = reinterpret_cast(instance); + return unwrapped->GetShouldNotify(signo); +} + +bool +LLDBSBUnixSignalsSetShouldNotify(LLDBSBUnixSignalsRef instance, int signo, bool value) +{ + SBUnixSignals *unwrapped = reinterpret_cast(instance); + return unwrapped->SetShouldNotify(signo, value); +} + +int +LLDBSBUnixSignalsGetNumSignals(LLDBSBUnixSignalsRef instance) +{ + SBUnixSignals *unwrapped = reinterpret_cast(instance); + return unwrapped->GetNumSignals(); +} + +int +LLDBSBUnixSignalsGetSignalAtIndex(LLDBSBUnixSignalsRef instance, int index) +{ + SBUnixSignals *unwrapped = reinterpret_cast(instance); + return unwrapped->GetSignalAtIndex(index); +} + +#ifdef __cplusplus +} +#endif Index: source/API/Bindings/SBValueBinding.cpp =================================================================== --- source/API/Bindings/SBValueBinding.cpp +++ source/API/Bindings/SBValueBinding.cpp @@ -0,0 +1,572 @@ +//===-- SBValueBinding.cpp --------------------------------------*- C++ -*-===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +#include "lldb/Bindings/LLDBBinding.h" +#include "lldb/API/LLDB.h" +#include "lldb/API/SBTypeFilter.h" +#include "lldb/API/SBTypeSynthetic.h" +#include "lldb/API/SBTypeFormat.h" +#include "lldb/API/SBTypeSummary.h" + +using namespace lldb; + +#ifdef __cplusplus +extern "C" { +#endif + +LLDBSBValueRef +LLDBCreateSBValue() +{ + return reinterpret_cast(new SBValue()); +} + +void +LLDBDisposeSBValue(LLDBSBValueRef instance) +{ + delete reinterpret_cast(instance); +} + +bool +LLDBSBValueIsValid(LLDBSBValueRef instance) +{ + SBValue *unwrapped = reinterpret_cast(instance); + return unwrapped->IsValid(); +} + +void +LLDBSBValueClear(LLDBSBValueRef instance) +{ + SBValue *unwrapped = reinterpret_cast(instance); + unwrapped->Clear(); +} + +LLDBSBErrorRef +LLDBSBValueGetError(LLDBSBValueRef instance) +{ + SBValue *unwrapped = reinterpret_cast(instance); + return reinterpret_cast(new SBError(unwrapped->GetError())); +} + +unsigned long long +LLDBSBValueGetID(LLDBSBValueRef instance) +{ + SBValue *unwrapped = reinterpret_cast(instance); + return unwrapped->GetID(); +} + +const char * +LLDBSBValueGetName(LLDBSBValueRef instance) +{ + SBValue *unwrapped = reinterpret_cast(instance); + return unwrapped->GetName(); +} + +const char * +LLDBSBValueGetTypeName(LLDBSBValueRef instance) +{ + SBValue *unwrapped = reinterpret_cast(instance); + return unwrapped->GetTypeName(); +} + +const char * +LLDBSBValueGetDisplayTypeName(LLDBSBValueRef instance) +{ + SBValue *unwrapped = reinterpret_cast(instance); + return unwrapped->GetDisplayTypeName(); +} + +unsigned int +LLDBSBValueGetByteSize(LLDBSBValueRef instance) +{ + SBValue *unwrapped = reinterpret_cast(instance); + return unwrapped->GetByteSize(); +} + +bool +LLDBSBValueIsInScope(LLDBSBValueRef instance) +{ + SBValue *unwrapped = reinterpret_cast(instance); + return unwrapped->IsInScope(); +} + +enum lldb::Format +LLDBSBValueGetFormat(LLDBSBValueRef instance) +{ + SBValue *unwrapped = reinterpret_cast(instance); + return unwrapped->GetFormat(); +} + +void +LLDBSBValueSetFormat(LLDBSBValueRef instance, lldb::Format format) +{ + SBValue *unwrapped = reinterpret_cast(instance); + unwrapped->SetFormat(format); +} + +const char * +LLDBSBValueGetValue(LLDBSBValueRef instance) +{ + SBValue *unwrapped = reinterpret_cast(instance); + return unwrapped->GetValue(); +} + +long long +LLDBSBValueGetValueAsSigned(LLDBSBValueRef instance, LLDBSBErrorRef error, int64_t fail_value) +{ + SBValue *unwrapped = reinterpret_cast(instance); + return unwrapped->GetValueAsSigned(*reinterpret_cast(error), fail_value); +} + +unsigned long long +LLDBSBValueGetValueAsUnsigned(LLDBSBValueRef instance, LLDBSBErrorRef error, uint64_t fail_value) +{ + SBValue *unwrapped = reinterpret_cast(instance); + return unwrapped->GetValueAsUnsigned(*reinterpret_cast(error), fail_value); +} + +long long +LLDBSBValueGetValueAsSigned2(LLDBSBValueRef instance, int64_t fail_value) +{ + SBValue *unwrapped = reinterpret_cast(instance); + return unwrapped->GetValueAsSigned(fail_value); +} + +unsigned long long +LLDBSBValueGetValueAsUnsigned2(LLDBSBValueRef instance, uint64_t fail_value) +{ + SBValue *unwrapped = reinterpret_cast(instance); + return unwrapped->GetValueAsUnsigned(fail_value); +} + +enum lldb::ValueType +LLDBSBValueGetValueType(LLDBSBValueRef instance) +{ + SBValue *unwrapped = reinterpret_cast(instance); + return unwrapped->GetValueType(); +} + +bool +LLDBSBValueGetValueDidChange(LLDBSBValueRef instance) +{ + SBValue *unwrapped = reinterpret_cast(instance); + return unwrapped->GetValueDidChange(); +} + +const char * +LLDBSBValueGetSummary(LLDBSBValueRef instance) +{ + SBValue *unwrapped = reinterpret_cast(instance); + return unwrapped->GetSummary(); +} + +const char * +LLDBSBValueGetSummary2(LLDBSBValueRef instance, LLDBSBStreamRef stream, LLDBSBTypeSummaryOptionsRef options) +{ + SBValue *unwrapped = reinterpret_cast(instance); + return unwrapped->GetSummary(*reinterpret_cast(stream), + *reinterpret_cast(options)); +} + +const char * +LLDBSBValueGetObjectDescription(LLDBSBValueRef instance) +{ + SBValue *unwrapped = reinterpret_cast(instance); + return unwrapped->GetObjectDescription(); +} + +const char * +LLDBSBValueGetTypeValidatorResult(LLDBSBValueRef instance) +{ + SBValue *unwrapped = reinterpret_cast(instance); + return unwrapped->GetTypeValidatorResult(); +} + +LLDBSBValueRef +LLDBSBValueGetDynamicValue(LLDBSBValueRef instance, lldb::DynamicValueType use_dynamic) +{ + SBValue *unwrapped = reinterpret_cast(instance); + return reinterpret_cast(new SBValue(unwrapped->GetDynamicValue(use_dynamic))); +} + +LLDBSBValueRef +LLDBSBValueGetStaticValue(LLDBSBValueRef instance) +{ + SBValue *unwrapped = reinterpret_cast(instance); + return reinterpret_cast(new SBValue(unwrapped->GetStaticValue())); +} + +LLDBSBValueRef +LLDBSBValueGetNonSyntheticValue(LLDBSBValueRef instance) +{ + SBValue *unwrapped = reinterpret_cast(instance); + return reinterpret_cast(new SBValue(unwrapped->GetNonSyntheticValue())); +} + +enum lldb::DynamicValueType +LLDBSBValueGetPreferDynamicValue(LLDBSBValueRef instance) +{ + SBValue *unwrapped = reinterpret_cast(instance); + return unwrapped->GetPreferDynamicValue(); +} + +void +LLDBSBValueSetPreferDynamicValue(LLDBSBValueRef instance, lldb::DynamicValueType use_dynamic) +{ + SBValue *unwrapped = reinterpret_cast(instance); + unwrapped->SetPreferDynamicValue(use_dynamic); +} + +bool +LLDBSBValueGetPreferSyntheticValue(LLDBSBValueRef instance) +{ + SBValue *unwrapped = reinterpret_cast(instance); + return unwrapped->GetPreferSyntheticValue(); +} + +void +LLDBSBValueSetPreferSyntheticValue(LLDBSBValueRef instance, bool use_synthetic) +{ + SBValue *unwrapped = reinterpret_cast(instance); + unwrapped->SetPreferSyntheticValue(use_synthetic); +} + +bool +LLDBSBValueIsDynamic(LLDBSBValueRef instance) +{ + SBValue *unwrapped = reinterpret_cast(instance); + return unwrapped->IsDynamic(); +} + +bool +LLDBSBValueIsSynthetic(LLDBSBValueRef instance) +{ + SBValue *unwrapped = reinterpret_cast(instance); + return unwrapped->IsSynthetic(); +} + +const char * +LLDBSBValueGetLocation(LLDBSBValueRef instance) +{ + SBValue *unwrapped = reinterpret_cast(instance); + return unwrapped->GetLocation(); +} + +bool +LLDBSBValueSetValueFromCString(LLDBSBValueRef instance, const char *value_str) +{ + SBValue *unwrapped = reinterpret_cast(instance); + return unwrapped->SetValueFromCString(value_str); +} + +bool +LLDBSBValueSetValueFromCString2(LLDBSBValueRef instance, const char *value_str, LLDBSBErrorRef error) +{ + SBValue *unwrapped = reinterpret_cast(instance); + return unwrapped->SetValueFromCString(value_str, *reinterpret_cast(error)); +} + +LLDBSBTypeFormatRef +LLDBSBValueGetTypeFormat(LLDBSBValueRef instance) +{ + SBValue *unwrapped = reinterpret_cast(instance); + return reinterpret_cast(new SBTypeFormat(unwrapped->GetTypeFormat())); +} + +LLDBSBTypeSummaryRef +LLDBSBValueGetTypeSummary(LLDBSBValueRef instance) +{ + SBValue *unwrapped = reinterpret_cast(instance); + return reinterpret_cast(new SBTypeSummary(unwrapped->GetTypeSummary())); +} + +LLDBSBTypeFilterRef +LLDBSBValueGetTypeFilter(LLDBSBValueRef instance) +{ + SBValue *unwrapped = reinterpret_cast(instance); + return reinterpret_cast(new SBTypeFilter(unwrapped->GetTypeFilter())); +} + +LLDBSBTypeSyntheticRef +LLDBSBValueGetTypeSynthetic(LLDBSBValueRef instance) +{ + SBValue *unwrapped = reinterpret_cast(instance); + return reinterpret_cast(new SBTypeSynthetic(unwrapped->GetTypeSynthetic())); +} + +LLDBSBValueRef +LLDBSBValueGetChildAtIndex(LLDBSBValueRef instance, uint32_t idx) +{ + SBValue *unwrapped = reinterpret_cast(instance); + return reinterpret_cast(new SBValue(unwrapped->GetChildAtIndex(idx))); +} + +LLDBSBValueRef +LLDBSBValueCreateChildAtOffset(LLDBSBValueRef instance, const char *name, uint32_t offset, LLDBSBTypeRef type) +{ + SBValue *unwrapped = reinterpret_cast(instance); + return reinterpret_cast( + new SBValue(unwrapped->CreateChildAtOffset(name, offset, *reinterpret_cast(type)))); +} + +LLDBSBValueRef +LLDBSBValueCast(LLDBSBValueRef instance, LLDBSBTypeRef type) +{ + SBValue *unwrapped = reinterpret_cast(instance); + return reinterpret_cast(new SBValue(unwrapped->Cast(*reinterpret_cast(type)))); +} + +LLDBSBValueRef +LLDBSBValueCreateValueFromExpression(LLDBSBValueRef instance, const char *name, const char *expression) +{ + SBValue *unwrapped = reinterpret_cast(instance); + return reinterpret_cast(new SBValue(unwrapped->CreateValueFromExpression(name, expression))); +} + +LLDBSBValueRef +LLDBSBValueCreateValueFromExpression2(LLDBSBValueRef instance, const char *name, const char *expression, + LLDBSBExpressionOptionsRef options) +{ + SBValue *unwrapped = reinterpret_cast(instance); + return reinterpret_cast(new SBValue( + unwrapped->CreateValueFromExpression(name, expression, *reinterpret_cast(options)))); +} + +LLDBSBValueRef +LLDBSBValueCreateValueFromAddress(LLDBSBValueRef instance, const char *name, lldb::addr_t address, LLDBSBTypeRef type) +{ + SBValue *unwrapped = reinterpret_cast(instance); + return reinterpret_cast( + new SBValue(unwrapped->CreateValueFromAddress(name, address, *reinterpret_cast(type)))); +} + +LLDBSBValueRef +LLDBSBValueCreateValueFromData(LLDBSBValueRef instance, const char *name, LLDBSBDataRef data, LLDBSBTypeRef type) +{ + SBValue *unwrapped = reinterpret_cast(instance); + return reinterpret_cast(new SBValue( + unwrapped->CreateValueFromData(name, *reinterpret_cast(data), *reinterpret_cast(type)))); +} + +LLDBSBValueRef +LLDBSBValueGetChildAtIndex2(LLDBSBValueRef instance, uint32_t idx, lldb::DynamicValueType use_dynamic, + bool can_create_synthetic) +{ + SBValue *unwrapped = reinterpret_cast(instance); + return reinterpret_cast( + new SBValue(unwrapped->GetChildAtIndex(idx, use_dynamic, can_create_synthetic))); +} + +unsigned int +LLDBSBValueGetIndexOfChildWithName(LLDBSBValueRef instance, const char *name) +{ + SBValue *unwrapped = reinterpret_cast(instance); + return unwrapped->GetIndexOfChildWithName(name); +} + +LLDBSBValueRef +LLDBSBValueGetChildMemberWithName(LLDBSBValueRef instance, const char *name) +{ + SBValue *unwrapped = reinterpret_cast(instance); + return reinterpret_cast(new SBValue(unwrapped->GetChildMemberWithName(name))); +} + +LLDBSBValueRef +LLDBSBValueGetChildMemberWithName2(LLDBSBValueRef instance, const char *name, lldb::DynamicValueType use_dynamic) +{ + SBValue *unwrapped = reinterpret_cast(instance); + return reinterpret_cast(new SBValue(unwrapped->GetChildMemberWithName(name, use_dynamic))); +} + +LLDBSBValueRef +LLDBSBValueGetValueForExpressionPath(LLDBSBValueRef instance, const char *expr_path) +{ + SBValue *unwrapped = reinterpret_cast(instance); + return reinterpret_cast(new SBValue(unwrapped->GetValueForExpressionPath(expr_path))); +} + +LLDBSBValueRef +LLDBSBValueAddressOf(LLDBSBValueRef instance) +{ + SBValue *unwrapped = reinterpret_cast(instance); + return reinterpret_cast(new SBValue(unwrapped->AddressOf())); +} + +unsigned long long +LLDBSBValueGetLoadAddress(LLDBSBValueRef instance) +{ + SBValue *unwrapped = reinterpret_cast(instance); + return unwrapped->GetLoadAddress(); +} + +LLDBSBAddressRef +LLDBSBValueGetAddress(LLDBSBValueRef instance) +{ + SBValue *unwrapped = reinterpret_cast(instance); + return reinterpret_cast(new SBAddress(unwrapped->GetAddress())); +} + +LLDBSBDataRef +LLDBSBValueGetPointeeData(LLDBSBValueRef instance, uint32_t item_idx, uint32_t item_count) +{ + SBValue *unwrapped = reinterpret_cast(instance); + return reinterpret_cast(new SBData(unwrapped->GetPointeeData(item_idx, item_count))); +} + +LLDBSBDataRef +LLDBSBValueGetData(LLDBSBValueRef instance) +{ + SBValue *unwrapped = reinterpret_cast(instance); + return reinterpret_cast(new SBData(unwrapped->GetData())); +} + +bool +LLDBSBValueSetData(LLDBSBValueRef instance, LLDBSBDataRef data, LLDBSBErrorRef error) +{ + SBValue *unwrapped = reinterpret_cast(instance); + return unwrapped->SetData(*reinterpret_cast(data), *reinterpret_cast(error)); +} + +LLDBSBDeclarationRef +LLDBSBValueGetDeclaration(LLDBSBValueRef instance) +{ + SBValue *unwrapped = reinterpret_cast(instance); + return reinterpret_cast(new SBDeclaration(unwrapped->GetDeclaration())); +} + +bool +LLDBSBValueMightHaveChildren(LLDBSBValueRef instance) +{ + SBValue *unwrapped = reinterpret_cast(instance); + return unwrapped->MightHaveChildren(); +} + +bool +LLDBSBValueIsRuntimeSupportValue(LLDBSBValueRef instance) +{ + SBValue *unwrapped = reinterpret_cast(instance); + return unwrapped->IsRuntimeSupportValue(); +} + +unsigned int +LLDBSBValueGetNumChildren(LLDBSBValueRef instance) +{ + SBValue *unwrapped = reinterpret_cast(instance); + return unwrapped->GetNumChildren(); +} + +void * +LLDBSBValueGetOpaqueType(LLDBSBValueRef instance) +{ + SBValue *unwrapped = reinterpret_cast(instance); + return unwrapped->GetOpaqueType(); +} + +LLDBSBTargetRef +LLDBSBValueGetTarget(LLDBSBValueRef instance) +{ + SBValue *unwrapped = reinterpret_cast(instance); + return reinterpret_cast(new SBTarget(unwrapped->GetTarget())); +} + +LLDBSBProcessRef +LLDBSBValueGetProcess(LLDBSBValueRef instance) +{ + SBValue *unwrapped = reinterpret_cast(instance); + return reinterpret_cast(new SBProcess(unwrapped->GetProcess())); +} + +LLDBSBThreadRef +LLDBSBValueGetThread(LLDBSBValueRef instance) +{ + SBValue *unwrapped = reinterpret_cast(instance); + return reinterpret_cast(new SBThread(unwrapped->GetThread())); +} + +LLDBSBFrameRef +LLDBSBValueGetFrame(LLDBSBValueRef instance) +{ + SBValue *unwrapped = reinterpret_cast(instance); + return reinterpret_cast(new SBFrame(unwrapped->GetFrame())); +} + +LLDBSBValueRef +LLDBSBValueDereference(LLDBSBValueRef instance) +{ + SBValue *unwrapped = reinterpret_cast(instance); + return reinterpret_cast(new SBValue(unwrapped->Dereference())); +} + +bool +LLDBSBValueTypeIsPointerType(LLDBSBValueRef instance) +{ + SBValue *unwrapped = reinterpret_cast(instance); + return unwrapped->TypeIsPointerType(); +} + +LLDBSBTypeRef +LLDBSBValueGetType(LLDBSBValueRef instance) +{ + SBValue *unwrapped = reinterpret_cast(instance); + return reinterpret_cast(new SBType(unwrapped->GetType())); +} + +LLDBSBValueRef +LLDBSBValuePersist(LLDBSBValueRef instance) +{ + SBValue *unwrapped = reinterpret_cast(instance); + return reinterpret_cast(new SBValue(unwrapped->Persist())); +} + +bool +LLDBSBValueGetDescription(LLDBSBValueRef instance, LLDBSBStreamRef description) +{ + SBValue *unwrapped = reinterpret_cast(instance); + return unwrapped->GetDescription(*reinterpret_cast(description)); +} + +bool +LLDBSBValueGetExpressionPath(LLDBSBValueRef instance, LLDBSBStreamRef description) +{ + SBValue *unwrapped = reinterpret_cast(instance); + return unwrapped->GetExpressionPath(*reinterpret_cast(description)); +} + +bool +LLDBSBValueGetExpressionPath2(LLDBSBValueRef instance, LLDBSBStreamRef description, bool qualify_cxx_base_classes) +{ + SBValue *unwrapped = reinterpret_cast(instance); + return unwrapped->GetExpressionPath(*reinterpret_cast(description), qualify_cxx_base_classes); +} + +LLDBSBWatchpointRef +LLDBSBValueWatch(LLDBSBValueRef instance, bool resolve_location, bool read, bool write, LLDBSBErrorRef error) +{ + SBValue *unwrapped = reinterpret_cast(instance); + return reinterpret_cast( + new SBWatchpoint(unwrapped->Watch(resolve_location, read, write, *reinterpret_cast(error)))); +} + +LLDBSBWatchpointRef +LLDBSBValueWatch2(LLDBSBValueRef instance, bool resolve_location, bool read, bool write) +{ + SBValue *unwrapped = reinterpret_cast(instance); + return reinterpret_cast(new SBWatchpoint(unwrapped->Watch(resolve_location, read, write))); +} + +LLDBSBWatchpointRef +LLDBSBValueWatchPointee(LLDBSBValueRef instance, bool resolve_location, bool read, bool write, LLDBSBErrorRef error) +{ + SBValue *unwrapped = reinterpret_cast(instance); + return reinterpret_cast( + new SBWatchpoint(unwrapped->WatchPointee(resolve_location, read, write, *reinterpret_cast(error)))); +} + +#ifdef __cplusplus +} +#endif Index: source/API/Bindings/SBValueListBinding.cpp =================================================================== --- source/API/Bindings/SBValueListBinding.cpp +++ source/API/Bindings/SBValueListBinding.cpp @@ -0,0 +1,89 @@ +//===-- SBValueListBinding.cpp ----------------------------------*- C++ -*-===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +#include "lldb/Bindings/LLDBBinding.h" +#include "lldb/API/LLDB.h" + +using namespace lldb; + +#ifdef __cplusplus +extern "C" { +#endif + +LLDBSBValueListRef +LLDBCreateSBValueList() +{ + return reinterpret_cast(new SBValueList()); +} + +void +LLDBDisposeSBValueList(LLDBSBValueListRef instance) +{ + delete reinterpret_cast(instance); +} + +bool +LLDBSBValueListIsValid(LLDBSBValueListRef instance) +{ + SBValueList *unwrapped = reinterpret_cast(instance); + return unwrapped->IsValid(); +} + +void +LLDBSBValueListClear(LLDBSBValueListRef instance) +{ + SBValueList *unwrapped = reinterpret_cast(instance); + unwrapped->Clear(); +} + +void +LLDBSBValueListAppend(LLDBSBValueListRef instance, LLDBSBValueRef val_obj) +{ + SBValueList *unwrapped = reinterpret_cast(instance); + unwrapped->Append(*reinterpret_cast(val_obj)); +} + +void +LLDBSBValueListAppend2(LLDBSBValueListRef instance, LLDBSBValueListRef value_list) +{ + SBValueList *unwrapped = reinterpret_cast(instance); + unwrapped->Append(*reinterpret_cast(value_list)); +} + +unsigned int +LLDBSBValueListGetSize(LLDBSBValueListRef instance) +{ + SBValueList *unwrapped = reinterpret_cast(instance); + return unwrapped->GetSize(); +} + +LLDBSBValueRef +LLDBSBValueListGetValueAtIndex(LLDBSBValueListRef instance, uint32_t idx) +{ + SBValueList *unwrapped = reinterpret_cast(instance); + return reinterpret_cast(new SBValue(unwrapped->GetValueAtIndex(idx))); +} + +LLDBSBValueRef +LLDBSBValueListGetFirstValueByName(LLDBSBValueListRef instance, const char *name) +{ + SBValueList *unwrapped = reinterpret_cast(instance); + return reinterpret_cast(new SBValue(unwrapped->GetFirstValueByName(name))); +} + +LLDBSBValueRef +LLDBSBValueListFindValueObjectByUID(LLDBSBValueListRef instance, lldb::user_id_t uid) +{ + SBValueList *unwrapped = reinterpret_cast(instance); + return reinterpret_cast(new SBValue(unwrapped->FindValueObjectByUID(uid))); +} + +#ifdef __cplusplus +} +#endif Index: source/API/Bindings/SBVariablesOptionsBinding.cpp =================================================================== --- source/API/Bindings/SBVariablesOptionsBinding.cpp +++ source/API/Bindings/SBVariablesOptionsBinding.cpp @@ -0,0 +1,131 @@ +//===-- SBVariablesOptionsBinding.cpp ---------------------------*- C++ -*-===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +#include "lldb/Bindings/LLDBBinding.h" +#include "lldb/API/LLDB.h" + +using namespace lldb; + +#ifdef __cplusplus +extern "C" { +#endif + +LLDBSBVariablesOptionsRef +LLDBCreateSBVariablesOptions() +{ + return reinterpret_cast(new SBVariablesOptions()); +} + +LLDBSBVariablesOptionsRef +LLDBCreateSBVariablesOptions2(LLDBSBVariablesOptionsRef options) +{ + return reinterpret_cast( + new SBVariablesOptions(*reinterpret_cast(options))); +} + +void +LLDBDisposeSBVariablesOptions(LLDBSBVariablesOptionsRef instance) +{ + delete reinterpret_cast(instance); +} + +bool +LLDBSBVariablesOptionsIsValid(LLDBSBVariablesOptionsRef instance) +{ + SBVariablesOptions *unwrapped = reinterpret_cast(instance); + return unwrapped->IsValid(); +} + +bool +LLDBSBVariablesOptionsGetIncludeArguments(LLDBSBVariablesOptionsRef instance) +{ + SBVariablesOptions *unwrapped = reinterpret_cast(instance); + return unwrapped->GetIncludeArguments(); +} + +void +LLDBSBVariablesOptionsSetIncludeArguments(LLDBSBVariablesOptionsRef instance, bool var0) +{ + SBVariablesOptions *unwrapped = reinterpret_cast(instance); + unwrapped->SetIncludeArguments(var0); +} + +bool +LLDBSBVariablesOptionsGetIncludeLocals(LLDBSBVariablesOptionsRef instance) +{ + SBVariablesOptions *unwrapped = reinterpret_cast(instance); + return unwrapped->GetIncludeLocals(); +} + +void +LLDBSBVariablesOptionsSetIncludeLocals(LLDBSBVariablesOptionsRef instance, bool var0) +{ + SBVariablesOptions *unwrapped = reinterpret_cast(instance); + unwrapped->SetIncludeLocals(var0); +} + +bool +LLDBSBVariablesOptionsGetIncludeStatics(LLDBSBVariablesOptionsRef instance) +{ + SBVariablesOptions *unwrapped = reinterpret_cast(instance); + return unwrapped->GetIncludeStatics(); +} + +void +LLDBSBVariablesOptionsSetIncludeStatics(LLDBSBVariablesOptionsRef instance, bool var0) +{ + SBVariablesOptions *unwrapped = reinterpret_cast(instance); + unwrapped->SetIncludeStatics(var0); +} + +bool +LLDBSBVariablesOptionsGetInScopeOnly(LLDBSBVariablesOptionsRef instance) +{ + SBVariablesOptions *unwrapped = reinterpret_cast(instance); + return unwrapped->GetInScopeOnly(); +} + +void +LLDBSBVariablesOptionsSetInScopeOnly(LLDBSBVariablesOptionsRef instance, bool var0) +{ + SBVariablesOptions *unwrapped = reinterpret_cast(instance); + unwrapped->SetInScopeOnly(var0); +} + +bool +LLDBSBVariablesOptionsGetIncludeRuntimeSupportValues(LLDBSBVariablesOptionsRef instance) +{ + SBVariablesOptions *unwrapped = reinterpret_cast(instance); + return unwrapped->GetIncludeRuntimeSupportValues(); +} + +void +LLDBSBVariablesOptionsSetIncludeRuntimeSupportValues(LLDBSBVariablesOptionsRef instance, bool var0) +{ + SBVariablesOptions *unwrapped = reinterpret_cast(instance); + unwrapped->SetIncludeRuntimeSupportValues(var0); +} + +enum lldb::DynamicValueType +LLDBSBVariablesOptionsGetUseDynamic(LLDBSBVariablesOptionsRef instance) +{ + SBVariablesOptions *unwrapped = reinterpret_cast(instance); + return unwrapped->GetUseDynamic(); +} + +void +LLDBSBVariablesOptionsSetUseDynamic(LLDBSBVariablesOptionsRef instance, lldb::DynamicValueType var0) +{ + SBVariablesOptions *unwrapped = reinterpret_cast(instance); + unwrapped->SetUseDynamic(var0); +} + +#ifdef __cplusplus +} +#endif Index: source/API/Bindings/SBWatchpointBinding.cpp =================================================================== --- source/API/Bindings/SBWatchpointBinding.cpp +++ source/API/Bindings/SBWatchpointBinding.cpp @@ -0,0 +1,157 @@ +//===-- SBWatchpointBinding.cpp ---------------------------------*- C++ -*-===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +#include "lldb/Bindings/LLDBBinding.h" +#include "lldb/API/LLDB.h" + +using namespace lldb; + +#ifdef __cplusplus +extern "C" { +#endif + +LLDBSBWatchpointRef +LLDBCreateSBWatchpoint() +{ + return reinterpret_cast(new SBWatchpoint()); +} + +void +LLDBDisposeSBWatchpoint(LLDBSBWatchpointRef instance) +{ + delete reinterpret_cast(instance); +} + +bool +LLDBSBWatchpointIsValid(LLDBSBWatchpointRef instance) +{ + SBWatchpoint *unwrapped = reinterpret_cast(instance); + return unwrapped->IsValid(); +} + +LLDBSBErrorRef +LLDBSBWatchpointGetError(LLDBSBWatchpointRef instance) +{ + SBWatchpoint *unwrapped = reinterpret_cast(instance); + return reinterpret_cast(new SBError(unwrapped->GetError())); +} + +int +LLDBSBWatchpointGetID(LLDBSBWatchpointRef instance) +{ + SBWatchpoint *unwrapped = reinterpret_cast(instance); + return unwrapped->GetID(); +} + +int +LLDBSBWatchpointGetHardwareIndex(LLDBSBWatchpointRef instance) +{ + SBWatchpoint *unwrapped = reinterpret_cast(instance); + return unwrapped->GetHardwareIndex(); +} + +unsigned long long +LLDBSBWatchpointGetWatchAddress(LLDBSBWatchpointRef instance) +{ + SBWatchpoint *unwrapped = reinterpret_cast(instance); + return unwrapped->GetWatchAddress(); +} + +unsigned int +LLDBSBWatchpointGetWatchSize(LLDBSBWatchpointRef instance) +{ + SBWatchpoint *unwrapped = reinterpret_cast(instance); + return unwrapped->GetWatchSize(); +} + +void +LLDBSBWatchpointSetEnabled(LLDBSBWatchpointRef instance, bool enabled) +{ + SBWatchpoint *unwrapped = reinterpret_cast(instance); + unwrapped->SetEnabled(enabled); +} + +bool +LLDBSBWatchpointIsEnabled(LLDBSBWatchpointRef instance) +{ + SBWatchpoint *unwrapped = reinterpret_cast(instance); + return unwrapped->IsEnabled(); +} + +unsigned int +LLDBSBWatchpointGetHitCount(LLDBSBWatchpointRef instance) +{ + SBWatchpoint *unwrapped = reinterpret_cast(instance); + return unwrapped->GetHitCount(); +} + +unsigned int +LLDBSBWatchpointGetIgnoreCount(LLDBSBWatchpointRef instance) +{ + SBWatchpoint *unwrapped = reinterpret_cast(instance); + return unwrapped->GetIgnoreCount(); +} + +void +LLDBSBWatchpointSetIgnoreCount(LLDBSBWatchpointRef instance, uint32_t n) +{ + SBWatchpoint *unwrapped = reinterpret_cast(instance); + unwrapped->SetIgnoreCount(n); +} + +const char * +LLDBSBWatchpointGetCondition(LLDBSBWatchpointRef instance) +{ + SBWatchpoint *unwrapped = reinterpret_cast(instance); + return unwrapped->GetCondition(); +} + +void +LLDBSBWatchpointSetCondition(LLDBSBWatchpointRef instance, const char *condition) +{ + SBWatchpoint *unwrapped = reinterpret_cast(instance); + unwrapped->SetCondition(condition); +} + +bool +LLDBSBWatchpointGetDescription(LLDBSBWatchpointRef instance, LLDBSBStreamRef description, LLDBDescriptionLevel level) +{ + SBWatchpoint *unwrapped = reinterpret_cast(instance); + return unwrapped->GetDescription(*reinterpret_cast(description), level); +} + +void +LLDBSBWatchpointClear(LLDBSBWatchpointRef instance) +{ + SBWatchpoint *unwrapped = reinterpret_cast(instance); + unwrapped->Clear(); +} + +bool +LLDBSBWatchpointEventIsWatchpointEvent(LLDBSBEventRef event) +{ + return lldb::SBWatchpoint::EventIsWatchpointEvent(*reinterpret_cast(event)); +} + +LLDBWatchpointEventType +LLDBSBWatchpointGetWatchpointEventTypeFromEvent(LLDBSBEventRef event) +{ + return lldb::SBWatchpoint::GetWatchpointEventTypeFromEvent(*reinterpret_cast(event)); +} + +LLDBSBWatchpointRef +LLDBSBWatchpointGetWatchpointFromEvent(LLDBSBEventRef event) +{ + return reinterpret_cast( + new SBWatchpoint(lldb::SBWatchpoint::GetWatchpointFromEvent(*reinterpret_cast(event)))); +} + +#ifdef __cplusplus +} +#endif Index: source/API/CMakeLists.txt =================================================================== --- source/API/CMakeLists.txt +++ source/API/CMakeLists.txt @@ -1,96 +1,153 @@ -set(LLVM_NO_RTTI 1) - -if ( CMAKE_SYSTEM_NAME MATCHES "Windows" ) - add_definitions( -DEXPORT_LIBLLDB ) -endif() - -# Include this so that add_lldb_library() has the list of dependencies -# for liblldb to link against -include(${LLDB_PROJECT_ROOT}/cmake/LLDBDependencies.cmake) - -add_lldb_library(liblldb SHARED - SBAddress.cpp - SBAttachInfo.cpp - SBBlock.cpp - SBBreakpoint.cpp - SBBreakpointLocation.cpp - SBBroadcaster.cpp - SBCommandInterpreter.cpp - SBCommandReturnObject.cpp - SBCommunication.cpp - SBCompileUnit.cpp - SBData.cpp - SBDebugger.cpp - SBDeclaration.cpp - SBError.cpp - SBEvent.cpp - SBExecutionContext.cpp - SBExpressionOptions.cpp - SBFileSpec.cpp - SBFileSpecList.cpp - SBFrame.cpp - SBFunction.cpp - SBHostOS.cpp - SBInstruction.cpp - SBInstructionList.cpp - SBLaunchInfo.cpp - SBLineEntry.cpp - SBListener.cpp - SBModule.cpp - SBModuleSpec.cpp - SBPlatform.cpp - SBProcess.cpp - SBQueue.cpp - SBQueueItem.cpp - SBSection.cpp - SBSourceManager.cpp - SBStream.cpp - SBStringList.cpp - SBSymbol.cpp - SBSymbolContext.cpp - SBSymbolContextList.cpp - SBTarget.cpp - SBThread.cpp - SBThreadCollection.cpp - SBThreadPlan.cpp - SBType.cpp - SBTypeCategory.cpp - SBTypeEnumMember.cpp - SBTypeFilter.cpp - SBTypeFormat.cpp - SBTypeNameSpecifier.cpp - SBTypeSummary.cpp - SBTypeSynthetic.cpp - SBValue.cpp - SBValueList.cpp - SBVariablesOptions.cpp - SBWatchpoint.cpp - SBUnixSignals.cpp - SystemInitializerFull.cpp - ${LLDB_WRAP_PYTHON} - ${LLDB_VERS_GENERATED_FILE} - ) - -set_target_properties(liblldb - PROPERTIES - VERSION ${LLDB_VERSION} - ) - -if ( CMAKE_SYSTEM_NAME MATCHES "Windows" ) - # Only MSVC has the ABI compatibility problem and avoids using FindPythonLibs, - # so only it needs to explicitly link against ${PYTHON_LIBRARY} - if (MSVC AND NOT LLDB_DISABLE_PYTHON) - target_link_libraries(liblldb PRIVATE ${PYTHON_LIBRARY}) - endif() -else() - set_target_properties(liblldb - PROPERTIES - OUTPUT_NAME lldb - ) -endif() - -if (LLDB_WRAP_PYTHON OR LLDB_VERS_GENERATED_FILE) - add_dependencies(liblldb swig_wrapper) -endif() -target_link_libraries(liblldb ${cmake_2_8_12_PRIVATE} ${LLDB_SYSTEM_LIBS}) - +set(LLVM_NO_RTTI 1) + +if ( CMAKE_SYSTEM_NAME MATCHES "Windows" ) + add_definitions( -DEXPORT_LIBLLDB ) +endif() + +# Include this so that add_lldb_library() has the list of dependencies +# for liblldb to link against +include(${LLDB_PROJECT_ROOT}/cmake/LLDBDependencies.cmake) + +add_lldb_library(liblldb SHARED + SBAddress.cpp + SBAttachInfo.cpp + SBBlock.cpp + SBBreakpoint.cpp + SBBreakpointLocation.cpp + SBBroadcaster.cpp + SBCommandInterpreter.cpp + SBCommandReturnObject.cpp + SBCommunication.cpp + SBCompileUnit.cpp + SBData.cpp + SBDebugger.cpp + SBDeclaration.cpp + SBError.cpp + SBEvent.cpp + SBExecutionContext.cpp + SBExpressionOptions.cpp + SBFileSpec.cpp + SBFileSpecList.cpp + SBFrame.cpp + SBFunction.cpp + SBHostOS.cpp + SBInstruction.cpp + SBInstructionList.cpp + SBLaunchInfo.cpp + SBLineEntry.cpp + SBListener.cpp + SBModule.cpp + SBModuleSpec.cpp + SBPlatform.cpp + SBProcess.cpp + SBQueue.cpp + SBQueueItem.cpp + SBSection.cpp + SBSourceManager.cpp + SBStream.cpp + SBStringList.cpp + SBSymbol.cpp + SBSymbolContext.cpp + SBSymbolContextList.cpp + SBTarget.cpp + SBThread.cpp + SBThreadCollection.cpp + SBThreadPlan.cpp + SBType.cpp + SBTypeCategory.cpp + SBTypeEnumMember.cpp + SBTypeFilter.cpp + SBTypeFormat.cpp + SBTypeNameSpecifier.cpp + SBTypeSummary.cpp + SBTypeSynthetic.cpp + SBValue.cpp + SBValueList.cpp + SBVariablesOptions.cpp + SBWatchpoint.cpp + SBUnixSignals.cpp + SystemInitializerFull.cpp + Bindings/SBAddressBinding.cpp + Bindings/SBAttachInfoBinding.cpp + Bindings/SBBlockBinding.cpp + Bindings/SBBreakpointBinding.cpp + Bindings/SBBreakpointLocationBinding.cpp + Bindings/SBBroadcasterBinding.cpp + Bindings/SBCommandInterpreterBinding.cpp + Bindings/SBCommandReturnObjectBinding.cpp + Bindings/SBCommunicationBinding.cpp + Bindings/SBCompileUnitBinding.cpp + Bindings/SBDataBinding.cpp + Bindings/SBDebuggerBinding.cpp + Bindings/SBDeclarationBinding.cpp + Bindings/SBErrorBinding.cpp + Bindings/SBEventBinding.cpp + Bindings/SBExecutionContextBinding.cpp + Bindings/SBExpressionOptionsBinding.cpp + Bindings/SBFileSpecBinding.cpp + Bindings/SBFileSpecListBinding.cpp + Bindings/SBFrameBinding.cpp + Bindings/SBFunctionBinding.cpp + Bindings/SBHostOSBinding.cpp + Bindings/SBInstructionBinding.cpp + Bindings/SBInstructionListBinding.cpp + Bindings/SBLaunchInfoBinding.cpp + Bindings/SBLineEntryBinding.cpp + Bindings/SBListenerBinding.cpp + Bindings/SBModuleBinding.cpp + Bindings/SBModuleSpecBinding.cpp + Bindings/SBPlatformBinding.cpp + Bindings/SBProcessBinding.cpp + Bindings/SBQueueBinding.cpp + Bindings/SBQueueItemBinding.cpp + Bindings/SBSectionBinding.cpp + Bindings/SBSourceManagerBinding.cpp + Bindings/SBStreamBinding.cpp + Bindings/SBStringListBinding.cpp + Bindings/SBSymbolBinding.cpp + Bindings/SBSymbolContextBinding.cpp + Bindings/SBSymbolContextListBinding.cpp + Bindings/SBTargetBinding.cpp + Bindings/SBThreadBinding.cpp + Bindings/SBThreadCollectionBinding.cpp + Bindings/SBThreadPlanBinding.cpp + Bindings/SBTypeBinding.cpp + Bindings/SBTypeCategoryBinding.cpp + Bindings/SBTypeEnumMemberBinding.cpp + Bindings/SBTypeFilterBinding.cpp + Bindings/SBTypeFormatBinding.cpp + Bindings/SBTypeNameSpecifierBinding.cpp + Bindings/SBTypeSummaryBinding.cpp + Bindings/SBTypeSyntheticBinding.cpp + Bindings/SBValueBinding.cpp + Bindings/SBValueListBinding.cpp + Bindings/SBVariablesOptionsBinding.cpp + Bindings/SBWatchpointBinding.cpp + Bindings/SBUnixSignalsBinding.cpp + ${LLDB_WRAP_PYTHON} + ${LLDB_VERS_GENERATED_FILE} + ) + +set_target_properties(liblldb + PROPERTIES + VERSION ${LLDB_VERSION} + ) + +if ( CMAKE_SYSTEM_NAME MATCHES "Windows" ) + # Only MSVC has the ABI compatibility problem and avoids using FindPythonLibs, + # so only it needs to explicitly link against ${PYTHON_LIBRARY} + if (MSVC AND NOT LLDB_DISABLE_PYTHON) + target_link_libraries(liblldb PRIVATE ${PYTHON_LIBRARY}) + endif() +else() + set_target_properties(liblldb + PROPERTIES + OUTPUT_NAME lldb + ) +endif() + +if (LLDB_WRAP_PYTHON OR LLDB_VERS_GENERATED_FILE) + add_dependencies(liblldb swig_wrapper) +endif() +target_link_libraries(liblldb ${cmake_2_8_12_PRIVATE} ${LLDB_SYSTEM_LIBS}) +